mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	* types: add types for database abstration layer Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com> * types: fix more type dependent return value cases Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com> * types: make INodeBBDatabaseBackend implement the five major interface set Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com> * update types * update type names * add reverse for options in processSortedSet * add getSortedSetMembersWithScores and getSortedSetsMembersWithScores --------- Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
		
			
				
	
	
		
			36 lines
		
	
	
		
			879 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			879 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { ObjectType, RedisStyleMatchString } from './index'
 | 
						|
 | 
						|
export interface Item {
 | 
						|
  delete(key: string): Promise<void>
 | 
						|
 | 
						|
  deleteAll(keys: string[]): Promise<void>
 | 
						|
 | 
						|
  exists(key: string): Promise<boolean>
 | 
						|
 | 
						|
  exists(key: string[]): Promise<boolean[]>
 | 
						|
 | 
						|
  expire(key: string, seconds: number): Promise<void>
 | 
						|
 | 
						|
  expireAt(key: string, timestampInSeconds: number): Promise<void>
 | 
						|
 | 
						|
  get(key: string): Promise<string | null>
 | 
						|
 | 
						|
  increment(key: string): Promise<number>
 | 
						|
 | 
						|
  pexpire(key: string, ms: number): Promise<void>
 | 
						|
 | 
						|
  pexpireAt(key: string, timestampInMs: number): Promise<void>
 | 
						|
 | 
						|
  pttl(key: string): Promise<number>
 | 
						|
 | 
						|
  rename(oldkey: string, newkey: string): Promise<void>
 | 
						|
 | 
						|
  scan(params: { match: RedisStyleMatchString }): Promise<string[]>
 | 
						|
 | 
						|
  set(key: string, value: string): Promise<void>
 | 
						|
 | 
						|
  ttl(key: string): Promise<number>
 | 
						|
 | 
						|
  type(key: string): Promise<ObjectType | null>
 | 
						|
}
 |