Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Redis

Hierarchy

  • RedisClient
    • Redis

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Promise

Promise: PromiseConstructor

blpop

blpop: OverloadedBlockingListCommand<KeyType, [string, string]>

brpop

brpop: OverloadedBlockingListCommand<KeyType, [string, string]>

bzpopmax

bzpopmax: OverloadedBlockingListCommand<KeyType, [string, string, string]>

bzpopmin

bzpopmin: OverloadedBlockingListCommand<KeyType, [string, string, string]>

client

client: OverloadedSubCommand<ValueType, any>

cluster

cluster: OverloadedSubCommand<ValueType, any>

debug

debug: OverloadedSubCommand<ValueType, any>

del

del: OverloadedListCommand<KeyType, number>

eval

eval: OverloadedEvalCommand<ValueType, any>

evalsha

evalsha: OverloadedEvalCommand<ValueType, any>

geohash

geohash: OverloadedKeyCommand<string, string[]>

geopos

geopos: OverloadedKeyCommand<string, string[]>

hdel

hdel: OverloadedKeyCommand<KeyType, number>

hmget

hmget: OverloadedKeyCommand<KeyType, (null | string)[]>

hmset

hmset: OverloadedKeyedHashCommand<ValueType, "OK">

hscan

hscan: OverloadedKeyCommand<ValueType, [string, string[]]>

hset

hset: OverloadedKeyedHashCommand<ValueType, number>

lpush

lpush: OverloadedKeyCommand<ValueType, number>

lpushBuffer

lpushBuffer: OverloadedKeyCommand<Buffer, number>

lpushx

lpushx: OverloadedKeyCommand<ValueType, number>

mget

mget: OverloadedListCommand<KeyType, (null | string)[]>

migrate

migrate: OverloadedListCommand<ValueType, "OK" | "NOKEY">

mset

mset: OverloadedHashCommand<ValueType, "OK">

msetnx

msetnx: OverloadedHashCommand<ValueType, BooleanResponse>

object

object: OverloadedListCommand<ValueType, any>

options

options: RedisOptions

pfadd

pfadd: OverloadedKeyCommand<string, number>

pfcount

pfcount: OverloadedListCommand<KeyType, number>

pfmerge

pfmerge: OverloadedKeyCommand<KeyType, "OK">

psubscribe

psubscribe: OverloadedListCommand<string, number>

punsubscribe

punsubscribe: OverloadedCommand<string, number>

restore

restore: OverloadedListCommand<ValueType, "OK">

rpush

rpush: OverloadedKeyCommand<ValueType, number>

rpushBuffer

rpushBuffer: OverloadedKeyCommand<Buffer, number>

rpushx

rpushx: OverloadedKeyCommand<ValueType, number>

sadd

sadd: OverloadedKeyCommand<ValueType, number>

script

script: OverloadedSubCommand<ValueType, any>

sdiff

sdiff: OverloadedListCommand<KeyType, string[]>

sdiffstore

sdiffstore: OverloadedKeyCommand<KeyType, number>

sinter

sinter: OverloadedListCommand<KeyType, string[]>

sinterstore

sinterstore: OverloadedKeyCommand<KeyType, number>

sort

sort: OverloadedListCommand<number | KeyType, number | string[]>

srem

srem: OverloadedKeyCommand<ValueType, number>

sscan

sscan: OverloadedKeyCommand<ValueType, [string, string[]]>

Readonly status

status: string

subscribe

subscribe: OverloadedListCommand<string, number>

sunion

sunion: OverloadedListCommand<KeyType, string[]>

sunionstore

sunionstore: OverloadedKeyCommand<KeyType, number>

unlink

unlink: OverloadedListCommand<KeyType, number>

unsubscribe

unsubscribe: OverloadedCommand<string, number>

watch

watch: OverloadedListCommand<KeyType, "OK">

xack

xack: OverloadedKeyCommand<ValueType, number>

xadd

xadd: OverloadedKeyCommand<ValueType, string>

xclaim

xclaim: OverloadedKeyCommand<ValueType, [string, string[]][]>

xdel

xdel: OverloadedKeyCommand<string, number>

xgroup

xgroup: OverloadedSubCommand<ValueType, "OK">

xinfo

xinfo: OverloadedSubCommand<ValueType, any>

xpending

xpending: OverloadedKeyCommand<ValueType, any>

xrange

xrange: OverloadedKeyCommand<ValueType, [string, string[]][]>

xread

xread: OverloadedListCommand<ValueType, [string, [string, string[]][]][]>

xreadgroup

xreadgroup: OverloadedKeyCommand<ValueType, [string, string[]][]>

xrevrange

xrevrange: OverloadedKeyCommand<ValueType, [string, string[]][]>

xtrim

xtrim: OverloadedKeyCommand<ValueType, number>

zadd

zadd: OverloadedKeyCommand<number | KeyType, string | number>

zinterstore

zinterstore: OverloadedKeyCommand<number | KeyType, number>

zrem

zrem: OverloadedKeyCommand<ValueType, number>

zscan

zscan: OverloadedKeyCommand<ValueType, [string, string[]]>

zunionstore

zunionstore: OverloadedKeyCommand<number | KeyType, number>

Static Cluster

Cluster: ClusterStatic

Static Command

Command: typeof Command

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

append

  • append(key: KeyType, value: ValueType, callback: Callback<number>): void
  • append(key: KeyType, value: ValueType): Promise<number>
  • Parameters

    • key: KeyType
    • value: ValueType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType

    Returns Promise<number>

auth

  • auth(username: string, password: string, callback: Callback<string>): void
  • auth(password: string, callback: Callback<string>): void
  • auth(username: string, password: string): Promise<string>
  • auth(password: string): Promise<string>
  • Parameters

    • username: string
    • password: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • password: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • username: string
    • password: string

    Returns Promise<string>

  • Parameters

    • password: string

    Returns Promise<string>

bgrewriteaof

  • bgrewriteaof(callback: Callback<string>): void
  • bgrewriteaof(): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Returns Promise<string>

bgsave

  • bgsave(callback: Callback<string>): void
  • bgsave(): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Returns Promise<string>

bitcount

  • bitcount(key: KeyType, callback: Callback<number>): void
  • bitcount(key: KeyType, start: number, end: number, callback: (err: Error, res: number) => void): void
  • bitcount(key: KeyType): Promise<number>
  • bitcount(key: KeyType, start: number, end: number): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • end: number
    • callback: (err: Error, res: number) => void
        • (err: Error, res: number): void
        • Parameters

          • err: Error
          • res: number

          Returns void

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

  • Parameters

    • key: KeyType
    • start: number
    • end: number

    Returns Promise<number>

brpoplpush

  • brpoplpush(source: string, destination: string, timeout: number, callback: Callback<string>): void
  • brpoplpush(source: string, destination: string, timeout: number): Promise<string>
  • Parameters

    • source: string
    • destination: string
    • timeout: number
    • callback: Callback<string>

    Returns void

  • Parameters

    • source: string
    • destination: string
    • timeout: number

    Returns Promise<string>

config

  • config(op: "GET", cfg: string): Promise<string[]>
  • config(op: "GET", cfg: string, callback: Callback<string[]>): void
  • config(op: "REWRITE" | "RESETSTAT"): Promise<"OK">
  • config(op: "REWRITE" | "RESETSTAT", callback: Callback<"OK">): void
  • config(op: "SET", key: string, value: ValueType): Promise<"OK">
  • config(op: "SET", key: string, value: ValueType, callback: Callback<"OK">): void
  • Parameters

    • op: "GET"
    • cfg: string

    Returns Promise<string[]>

  • Parameters

    • op: "GET"
    • cfg: string
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • op: "REWRITE" | "RESETSTAT"

    Returns Promise<"OK">

  • Parameters

    • op: "REWRITE" | "RESETSTAT"
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • op: "SET"
    • key: string
    • value: ValueType

    Returns Promise<"OK">

  • Parameters

    • op: "SET"
    • key: string
    • value: ValueType
    • callback: Callback<"OK">

    Returns void

connect

  • connect(callback?: () => void): Promise<void>
  • Parameters

    • Optional callback: () => void
        • (): void
        • Returns void

    Returns Promise<void>

createBuiltinCommand

  • createBuiltinCommand(commandName: string): {}
  • Parameters

    • commandName: string

    Returns {}

dbsize

  • dbsize(callback: Callback<number>): void
  • dbsize(): Promise<number>
  • Parameters

    • callback: Callback<number>

    Returns void

  • Returns Promise<number>

decr

  • decr(key: KeyType, callback: Callback<number>): void
  • decr(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

decrby

  • decrby(key: KeyType, decrement: number, callback: Callback<number>): void
  • decrby(key: KeyType, decrement: number): Promise<number>
  • Parameters

    • key: KeyType
    • decrement: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • decrement: number

    Returns Promise<number>

defineCommand

  • defineCommand(name: string, definition: { lua?: string; numberOfKeys?: number }): void
  • Parameters

    • name: string
    • definition: { lua?: string; numberOfKeys?: number }
      • Optional lua?: string
      • Optional numberOfKeys?: number

    Returns void

discard

  • discard(callback: Callback<"OK">): void
  • discard(): Promise<"OK">
  • Parameters

    • callback: Callback<"OK">

    Returns void

  • Returns Promise<"OK">

disconnect

  • disconnect(reconnect?: boolean): void
  • Parameters

    • Optional reconnect: boolean

    Returns void

dump

  • dump(key: KeyType, callback: Callback<string>): void
  • dump(key: KeyType): Promise<string>
  • Parameters

    • key: KeyType
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string>

duplicate

  • duplicate(): Redis
  • Returns Redis

echo

  • echo(message: string, callback: Callback<string>): void
  • echo(message: string): Promise<string>
  • Parameters

    • message: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • message: string

    Returns Promise<string>

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

exec

  • exec(callback: Callback<[null | Error, string][]>): void
  • exec(): Promise<[null | Error, string][]>
  • Parameters

    • callback: Callback<[null | Error, string][]>

    Returns void

  • Returns Promise<[null | Error, string][]>

exists

  • exists(...keys: KeyType[]): Promise<number>
  • exists(key: KeyType, callback: Callback<number>): void
  • Parameters

    • Rest ...keys: KeyType[]

    Returns Promise<number>

  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

expire

  • expire(key: KeyType, seconds: number, callback: Callback<BooleanResponse>): void
  • expire(key: KeyType, seconds: number): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • seconds: number
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • seconds: number

    Returns Promise<BooleanResponse>

expireat

  • expireat(key: KeyType, timestamp: number, callback: Callback<BooleanResponse>): void
  • expireat(key: KeyType, timestamp: number): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • timestamp: number
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • timestamp: number

    Returns Promise<BooleanResponse>

flushall

  • flushall(callback: Callback<"OK">): void
  • flushall(): Promise<"OK">
  • Parameters

    • callback: Callback<"OK">

    Returns void

  • Returns Promise<"OK">

flushdb

  • flushdb(callback: Callback<"OK">): void
  • flushdb(): Promise<"OK">
  • Parameters

    • callback: Callback<"OK">

    Returns void

  • Returns Promise<"OK">

geoadd

  • geoadd(key: KeyType, longitude: number, latitude: number, member: string, callback: Callback<number>): void
  • geoadd(key: KeyType, longitude: number, latitude: number, member: string): Promise<number>
  • Parameters

    • key: KeyType
    • longitude: number
    • latitude: number
    • member: string
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • longitude: number
    • latitude: number
    • member: string

    Returns Promise<number>

geodist

  • geodist(key: KeyType, member1: string, member2: string, unit: "m" | "km" | "ft" | "mi", callback: Callback<null | string>): void
  • geodist(key: KeyType, member1: string, member2: string, unit: "m" | "km" | "ft" | "mi"): Promise<null | string>
  • Parameters

    • key: KeyType
    • member1: string
    • member2: string
    • unit: "m" | "km" | "ft" | "mi"
    • callback: Callback<null | string>

    Returns void

  • Parameters

    • key: KeyType
    • member1: string
    • member2: string
    • unit: "m" | "km" | "ft" | "mi"

    Returns Promise<null | string>

georadius

  • georadius(key: KeyType, longitude: number, latitude: number, radius: number, unit: "m" | "km" | "ft" | "mi", callback: Callback<string[]>): void
  • georadius(key: KeyType, longitude: number, latitude: number, radius: number, unit: "m" | "km" | "ft" | "mi", sort?: "ASC" | "DESC"): Promise<string[]>
  • georadius(key: KeyType, longitude: number, latitude: number, radius: number, unit: "m" | "km" | "ft" | "mi", count: "COUNT", countValue: number, sort?: "ASC" | "DESC"): Promise<string[]>
  • Parameters

    • key: KeyType
    • longitude: number
    • latitude: number
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • longitude: number
    • latitude: number
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"
    • Optional sort: "ASC" | "DESC"

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • longitude: number
    • latitude: number
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"
    • count: "COUNT"
    • countValue: number
    • Optional sort: "ASC" | "DESC"

    Returns Promise<string[]>

georadiusbymember

  • georadiusbymember(key: KeyType, member: string, radius: number, unit: "m" | "km" | "ft" | "mi", callback: Callback<string[]>): void
  • georadiusbymember(key: KeyType, member: string, radius: number, unit: "m" | "km" | "ft" | "mi", count: "COUNT", countValue: number, callback: Callback<string[]>): void
  • georadiusbymember(key: KeyType, member: string, radius: number, unit: "m" | "km" | "ft" | "mi"): Promise<string[]>
  • georadiusbymember(key: KeyType, member: string, radius: number, unit: "m" | "km" | "ft" | "mi", count: "COUNT", countValue: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • member: string
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • member: string
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"
    • count: "COUNT"
    • countValue: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • member: string
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • member: string
    • radius: number
    • unit: "m" | "km" | "ft" | "mi"
    • count: "COUNT"
    • countValue: number

    Returns Promise<string[]>

get

  • get(key: KeyType, callback: Callback<null | string>): void
  • get(key: KeyType): Promise<null | string>
  • Parameters

    • key: KeyType
    • callback: Callback<null | string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<null | string>

getBuffer

  • getBuffer(key: KeyType, callback: Callback<Buffer>): void
  • getBuffer(key: KeyType): Promise<Buffer>
  • Parameters

    • key: KeyType
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<Buffer>

getBuiltinCommands

  • getBuiltinCommands(): string[]
  • Returns string[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getbit

  • getbit(key: KeyType, offset: number, callback: Callback<number>): void
  • getbit(key: KeyType, offset: number): Promise<number>
  • Parameters

    • key: KeyType
    • offset: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • offset: number

    Returns Promise<number>

getrange

  • getrange(key: KeyType, start: number, end: number, callback: Callback<string>): void
  • getrange(key: KeyType, start: number, end: number): Promise<string>
  • Parameters

    • key: KeyType
    • start: number
    • end: number
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • end: number

    Returns Promise<string>

getrangeBuffer

  • getrangeBuffer(key: KeyType, start: number, end: number, callback: Callback<Buffer>): void
  • getrangeBuffer(key: KeyType, start: number, end: number): Promise<Buffer>
  • Parameters

    • key: KeyType
    • start: number
    • end: number
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • end: number

    Returns Promise<Buffer>

getset

  • getset(key: KeyType, value: ValueType, callback: Callback<null | string>): void
  • getset(key: KeyType, value: ValueType): Promise<null | string>
  • Parameters

    • key: KeyType
    • value: ValueType
    • callback: Callback<null | string>

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType

    Returns Promise<null | string>

hexists

  • hexists(key: KeyType, field: string, callback: Callback<BooleanResponse>): void
  • hexists(key: KeyType, field: string): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • field: string
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • field: string

    Returns Promise<BooleanResponse>

hget

  • hget(key: KeyType, field: string, callback: Callback<null | string>): void
  • hget(key: KeyType, field: string): Promise<null | string>
  • Parameters

    • key: KeyType
    • field: string
    • callback: Callback<null | string>

    Returns void

  • Parameters

    • key: KeyType
    • field: string

    Returns Promise<null | string>

hgetBuffer

  • hgetBuffer(key: KeyType, field: string, callback: Callback<Buffer>): void
  • hgetBuffer(key: KeyType, field: string): Promise<Buffer>
  • Parameters

    • key: KeyType
    • field: string
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType
    • field: string

    Returns Promise<Buffer>

hgetall

  • hgetall(key: KeyType, callback: Callback<Record<string, string>>): void
  • hgetall(key: KeyType): Promise<Record<string, string>>
  • Parameters

    • key: KeyType
    • callback: Callback<Record<string, string>>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<Record<string, string>>

hincrby

  • hincrby(key: KeyType, field: string, increment: number, callback: Callback<number>): void
  • hincrby(key: KeyType, field: string, increment: number): Promise<number>
  • Parameters

    • key: KeyType
    • field: string
    • increment: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • field: string
    • increment: number

    Returns Promise<number>

hincrbyfloat

  • hincrbyfloat(key: KeyType, field: string, increment: number, callback: Callback<number>): void
  • hincrbyfloat(key: KeyType, field: string, increment: number): Promise<number>
  • Parameters

    • key: KeyType
    • field: string
    • increment: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • field: string
    • increment: number

    Returns Promise<number>

hkeys

  • hkeys(key: KeyType, callback: Callback<string[]>): void
  • hkeys(key: KeyType): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string[]>

hlen

  • hlen(key: KeyType, callback: Callback<number>): void
  • hlen(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

hscanStream

  • hscanStream(key: KeyType, options?: ScanStreamOption): Readable
  • Parameters

    • key: KeyType
    • Optional options: ScanStreamOption

    Returns Readable

hsetBuffer

  • hsetBuffer(key: KeyType, field: string, value: ValueType, callback: Callback<BooleanResponse>): void
  • hsetBuffer(key: KeyType, field: string, value: ValueType): Promise<Buffer>
  • Parameters

    • key: KeyType
    • field: string
    • value: ValueType
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • field: string
    • value: ValueType

    Returns Promise<Buffer>

hsetnx

  • hsetnx(key: KeyType, field: string, value: ValueType, callback: Callback<BooleanResponse>): void
  • hsetnx(key: KeyType, field: string, value: ValueType): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • field: string
    • value: ValueType
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • field: string
    • value: ValueType

    Returns Promise<BooleanResponse>

hstrlen

  • hstrlen(key: KeyType, field: string, callback: Callback<number>): void
  • hstrlen(key: KeyType, field: string): Promise<number>
  • Parameters

    • key: KeyType
    • field: string
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • field: string

    Returns Promise<number>

hvals

  • hvals(key: KeyType, callback: Callback<string[]>): void
  • hvals(key: KeyType): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string[]>

incr

  • incr(key: KeyType, callback: Callback<number>): void
  • incr(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

incrby

  • incrby(key: KeyType, increment: number, callback: Callback<number>): void
  • incrby(key: KeyType, increment: number): Promise<number>
  • Parameters

    • key: KeyType
    • increment: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • increment: number

    Returns Promise<number>

incrbyfloat

  • incrbyfloat(key: KeyType, increment: number, callback: Callback<number>): void
  • incrbyfloat(key: KeyType, increment: number): Promise<number>
  • Parameters

    • key: KeyType
    • increment: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • increment: number

    Returns Promise<number>

info

  • info(callback: Callback<string>): void
  • info(section: string, callback: Callback<string>): void
  • info(section?: string): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Parameters

    • section: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • Optional section: string

    Returns Promise<string>

keys

  • keys(pattern: string, callback: Callback<string[]>): void
  • keys(pattern: string): Promise<string[]>
  • Parameters

    • pattern: string
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • pattern: string

    Returns Promise<string[]>

lastsave

  • lastsave(callback: Callback<number>): void
  • lastsave(): Promise<number>
  • Parameters

    • callback: Callback<number>

    Returns void

  • Returns Promise<number>

lindex

  • lindex(key: KeyType, index: number, callback: Callback<string>): void
  • lindex(key: KeyType, index: number): Promise<string>
  • Parameters

    • key: KeyType
    • index: number
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType
    • index: number

    Returns Promise<string>

linsert

  • linsert(key: KeyType, direction: "BEFORE" | "AFTER", pivot: string, value: ValueType, callback: Callback<number>): void
  • linsert(key: KeyType, direction: "BEFORE" | "AFTER", pivot: string, value: ValueType): Promise<number>
  • Parameters

    • key: KeyType
    • direction: "BEFORE" | "AFTER"
    • pivot: string
    • value: ValueType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • direction: "BEFORE" | "AFTER"
    • pivot: string
    • value: ValueType

    Returns Promise<number>

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

llen

  • llen(key: KeyType, callback: Callback<number>): void
  • llen(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

lpop

  • lpop(key: KeyType, callback: Callback<string>): void
  • lpop(key: KeyType): Promise<string>
  • lpop(key: KeyType, count: number, callback: Callback<string[]>): void
  • lpop(key: KeyType, count: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string>

  • Parameters

    • key: KeyType
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • count: number

    Returns Promise<string[]>

lpopBuffer

  • lpopBuffer(key: KeyType, callback: Callback<Buffer>): void
  • lpopBuffer(key: KeyType): Promise<Buffer>
  • Parameters

    • key: KeyType
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<Buffer>

lpos

  • lpos(key: KeyType, value: ValueType, rank?: number, count?: number, maxlen?: number): Promise<null | number>
  • Parameters

    • key: KeyType
    • value: ValueType
    • Optional rank: number
    • Optional count: number
    • Optional maxlen: number

    Returns Promise<null | number>

lrange

  • lrange(key: KeyType, start: number, stop: number, callback: Callback<string[]>): void
  • lrange(key: KeyType, start: number, stop: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number

    Returns Promise<string[]>

lrangeBuffer

  • lrangeBuffer(key: KeyType, start: number, stop: number, callback: Callback<Buffer[]>): void
  • lrangeBuffer(key: KeyType, start: number, stop: number): Promise<Buffer[]>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number

    Returns Promise<Buffer[]>

lrem

  • lrem(key: KeyType, count: number, value: ValueType, callback: Callback<number>): void
  • lrem(key: KeyType, count: number, value: ValueType): Promise<number>
  • Parameters

    • key: KeyType
    • count: number
    • value: ValueType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • count: number
    • value: ValueType

    Returns Promise<number>

lset

  • lset(key: KeyType, index: number, value: ValueType, callback: Callback<"OK">): void
  • lset(key: KeyType, index: number, value: ValueType): Promise<"OK">
  • Parameters

    • key: KeyType
    • index: number
    • value: ValueType
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • index: number
    • value: ValueType

    Returns Promise<"OK">

ltrim

  • ltrim(key: KeyType, start: number, stop: number, callback: Callback<"OK">): void
  • ltrim(key: KeyType, start: number, stop: number): Promise<"OK">
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number

    Returns Promise<"OK">

memory

  • memory(argument: "USAGE", key: KeyType, callback?: Callback<number>): Promise<number>
  • Parameters

    • argument: "USAGE"
    • key: KeyType
    • Optional callback: Callback<number>

    Returns Promise<number>

monitor

  • monitor(callback: Callback<EventEmitter>): void
  • monitor(): Promise<EventEmitter>
  • Parameters

    • callback: Callback<EventEmitter>

    Returns void

  • Returns Promise<EventEmitter>

move

  • move(key: KeyType, db: string, callback: Callback<BooleanResponse>): void
  • move(key: KeyType, db: string): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • db: string
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • db: string

    Returns Promise<BooleanResponse>

multi

  • multi(commands?: string[][], options?: MultiOptions): Pipeline
  • multi(options: { pipeline: false }): Promise<"OK">
  • Parameters

    • Optional commands: string[][]
    • Optional options: MultiOptions

    Returns Pipeline

  • Parameters

    • options: { pipeline: false }
      • pipeline: false

    Returns Promise<"OK">

off

  • off(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

on

  • on(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

onChange

  • onChange(key: string, handler: (event: unknown) => void): Redis
  • Subscribe to changes on a key.

    Parameters

    • key: string

      The key.

    • handler: (event: unknown) => void

      Callback function to handle the change event

        • (event: unknown): void
        • Parameters

          • event: unknown

          Returns void

    Returns Redis

    • The subscriber. Use subsriber.unsubscribe((err, result)=>{}) to unsubscribe.

once

  • once(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

persist

  • persist(key: KeyType, callback: Callback<BooleanResponse>): void
  • persist(key: KeyType): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<BooleanResponse>

pexpire

  • pexpire(key: KeyType, milliseconds: number, callback: Callback<BooleanResponse>): void
  • pexpire(key: KeyType, milliseconds: number): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • milliseconds: number
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • milliseconds: number

    Returns Promise<BooleanResponse>

pexpireat

  • pexpireat(key: KeyType, millisecondsTimestamp: number, callback: Callback<BooleanResponse>): void
  • pexpireat(key: KeyType, millisecondsTimestamp: number): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • millisecondsTimestamp: number
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • millisecondsTimestamp: number

    Returns Promise<BooleanResponse>

ping

  • ping(callback: Callback<string>): void
  • ping(message: string, callback: Callback<string>): void
  • ping(message?: string): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Parameters

    • message: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • Optional message: string

    Returns Promise<string>

pipeline

  • pipeline(commands?: string[][]): Pipeline
  • Parameters

    • Optional commands: string[][]

    Returns Pipeline

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

psetex

  • psetex(key: KeyType, milliseconds: number, value: ValueType, callback: Callback<"OK">): void
  • psetex(key: KeyType, milliseconds: number, value: ValueType): Promise<"OK">
  • Parameters

    • key: KeyType
    • milliseconds: number
    • value: ValueType
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • milliseconds: number
    • value: ValueType

    Returns Promise<"OK">

pttl

  • pttl(key: KeyType, callback: Callback<number>): void
  • pttl(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

publish

  • publish(channel: string, message: string, callback: Callback<number>): void
  • publish(channel: string, message: string): Promise<number>
  • Parameters

    • channel: string
    • message: string
    • callback: Callback<number>

    Returns void

  • Parameters

    • channel: string
    • message: string

    Returns Promise<number>

publishBuffer

  • publishBuffer(channel: string, message: Buffer): Promise<number>
  • Parameters

    • channel: string
    • message: Buffer

    Returns Promise<number>

quit

  • quit(callback: Callback<"OK">): void
  • quit(): Promise<"OK">
  • Parameters

    • callback: Callback<"OK">

    Returns void

  • Returns Promise<"OK">

randomkey

  • randomkey(callback: Callback<string>): void
  • randomkey(): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Returns Promise<string>

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): Redis
  • Parameters

    • Optional event: string | symbol

    Returns Redis

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): Redis
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Redis

rename

  • rename(key: KeyType, newkey: KeyType, callback: Callback<"OK">): void
  • rename(key: KeyType, newkey: KeyType): Promise<"OK">
  • Parameters

    • key: KeyType
    • newkey: KeyType
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • newkey: KeyType

    Returns Promise<"OK">

renamenx

  • renamenx(key: KeyType, newkey: KeyType, callback: Callback<BooleanResponse>): void
  • renamenx(key: KeyType, newkey: KeyType): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • newkey: KeyType
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • newkey: KeyType

    Returns Promise<BooleanResponse>

rpop

  • rpop(key: KeyType, callback: Callback<string>): void
  • rpop(key: KeyType): Promise<string>
  • rpop(key: KeyType, count: number, callback: Callback<string[]>): void
  • rpop(key: KeyType, count: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string>

  • Parameters

    • key: KeyType
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • count: number

    Returns Promise<string[]>

rpoplpush

  • rpoplpush(source: string, destination: string, callback: Callback<string>): void
  • rpoplpush(source: string, destination: string): Promise<string>
  • Parameters

    • source: string
    • destination: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • source: string
    • destination: string

    Returns Promise<string>

rpoplpushBuffer

  • rpoplpushBuffer(source: string, destination: string, callback: Callback<Buffer>): void
  • rpoplpushBuffer(source: string, destination: string): Promise<Buffer>
  • Parameters

    • source: string
    • destination: string
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • source: string
    • destination: string

    Returns Promise<Buffer>

save

  • save(callback: Callback<string>): void
  • save(): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Returns Promise<string>

scan

  • scan(cursor: string | number, matchOption: "match" | "MATCH", pattern: string): Promise<[string, string[]]>
  • scan(cursor: string | number, matchOption: "match" | "MATCH", pattern: string, callback: Callback<[string, string[]]>): void
  • scan(cursor: string | number, countOption: "COUNT" | "count", count: number): Promise<[string, string[]]>
  • scan(cursor: string | number, countOption: "COUNT" | "count", count: number, callback: Callback<[string, string[]]>): void
  • scan(cursor: string | number, matchOption: "match" | "MATCH", pattern: string, countOption: "COUNT" | "count", count: number): Promise<[string, string[]]>
  • scan(cursor: string | number, matchOption: "match" | "MATCH", pattern: string, countOption: "COUNT" | "count", count: number, callback: Callback<[string, string[]]>): void
  • scan(cursor: string | number, countOption: "COUNT" | "count", count: number, matchOption: "match" | "MATCH", pattern: string): Promise<[string, string[]]>
  • scan(cursor: string | number, countOption: "COUNT" | "count", count: number, matchOption: "match" | "MATCH", pattern: string, callback: Callback<[string, string[]]>): void
  • Parameters

    • cursor: string | number
    • matchOption: "match" | "MATCH"
    • pattern: string

    Returns Promise<[string, string[]]>

  • Parameters

    • cursor: string | number
    • matchOption: "match" | "MATCH"
    • pattern: string
    • callback: Callback<[string, string[]]>

    Returns void

  • Parameters

    • cursor: string | number
    • countOption: "COUNT" | "count"
    • count: number

    Returns Promise<[string, string[]]>

  • Parameters

    • cursor: string | number
    • countOption: "COUNT" | "count"
    • count: number
    • callback: Callback<[string, string[]]>

    Returns void

  • Parameters

    • cursor: string | number
    • matchOption: "match" | "MATCH"
    • pattern: string
    • countOption: "COUNT" | "count"
    • count: number

    Returns Promise<[string, string[]]>

  • Parameters

    • cursor: string | number
    • matchOption: "match" | "MATCH"
    • pattern: string
    • countOption: "COUNT" | "count"
    • count: number
    • callback: Callback<[string, string[]]>

    Returns void

  • Parameters

    • cursor: string | number
    • countOption: "COUNT" | "count"
    • count: number
    • matchOption: "match" | "MATCH"
    • pattern: string

    Returns Promise<[string, string[]]>

  • Parameters

    • cursor: string | number
    • countOption: "COUNT" | "count"
    • count: number
    • matchOption: "match" | "MATCH"
    • pattern: string
    • callback: Callback<[string, string[]]>

    Returns void

scanStream

  • scanStream(options?: ScanStreamOption): Readable
  • Parameters

    • Optional options: ScanStreamOption

    Returns Readable

scard

  • scard(key: KeyType, callback: Callback<number>): void
  • scard(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

select

  • select(index: number, callback: Callback<"OK">): void
  • select(index: number): Promise<"OK">
  • Parameters

    • index: number
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • index: number

    Returns Promise<"OK">

sendCommand

  • sendCommand(): void
  • Returns void

send_command

  • send_command(command: string, ...args: ValueType[]): Promise<any>
  • Parameters

    • command: string
    • Rest ...args: ValueType[]

    Returns Promise<any>

set

  • set(key: KeyType, value: ValueType, expiryMode?: string | any[], time?: string | number, setMode?: string | number): Promise<null | "OK">
  • set(key: KeyType, value: ValueType, callback: Callback<"OK">): void
  • set(key: KeyType, value: ValueType, setMode: string | any[], callback: Callback<null | "OK">): void
  • set(key: KeyType, value: ValueType, expiryMode: string, time: string | number, callback: Callback<"OK">): void
  • set(key: KeyType, value: ValueType, expiryMode: string, time: string | number, setMode: string | number, callback: Callback<null | "OK">): void
  • Parameters

    • key: KeyType
    • value: ValueType
    • Optional expiryMode: string | any[]
    • Optional time: string | number
    • Optional setMode: string | number

    Returns Promise<null | "OK">

  • Parameters

    • key: KeyType
    • value: ValueType
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType
    • setMode: string | any[]
    • callback: Callback<null | "OK">

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType
    • expiryMode: string
    • time: string | number
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType
    • expiryMode: string
    • time: string | number
    • setMode: string | number
    • callback: Callback<null | "OK">

    Returns void

setBuffer

  • setBuffer(key: KeyType, value: ValueType, expiryMode?: string | any[], time?: string | number, setMode?: string | number): Promise<Buffer>
  • setBuffer(key: KeyType, value: ValueType, callback: Callback<Buffer>): void
  • setBuffer(key: KeyType, value: ValueType, setMode: string, callback: Callback<Buffer>): void
  • setBuffer(key: KeyType, value: ValueType, expiryMode: string, time: number, callback: Callback<Buffer>): void
  • setBuffer(key: KeyType, value: ValueType, expiryMode: string, time: string | number, setMode: string | number, callback: Callback<Buffer>): void
  • Parameters

    • key: KeyType
    • value: ValueType
    • Optional expiryMode: string | any[]
    • Optional time: string | number
    • Optional setMode: string | number

    Returns Promise<Buffer>

  • Parameters

    • key: KeyType
    • value: ValueType
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType
    • setMode: string
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType
    • expiryMode: string
    • time: number
    • callback: Callback<Buffer>

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType
    • expiryMode: string
    • time: string | number
    • setMode: string | number
    • callback: Callback<Buffer>

    Returns void

setMaxListeners

  • setMaxListeners(n: number): Redis
  • Parameters

    • n: number

    Returns Redis

setbit

  • setbit(key: KeyType, offset: number, value: ValueType, callback: Callback<number>): void
  • setbit(key: KeyType, offset: number, value: ValueType): Promise<number>
  • Parameters

    • key: KeyType
    • offset: number
    • value: ValueType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • offset: number
    • value: ValueType

    Returns Promise<number>

setex

  • setex(key: KeyType, seconds: number, value: ValueType, callback: Callback<"OK">): void
  • setex(key: KeyType, seconds: number, value: ValueType): Promise<"OK">
  • Parameters

    • key: KeyType
    • seconds: number
    • value: ValueType
    • callback: Callback<"OK">

    Returns void

  • Parameters

    • key: KeyType
    • seconds: number
    • value: ValueType

    Returns Promise<"OK">

setnx

  • setnx(key: KeyType, value: ValueType, callback: Callback<BooleanResponse>): void
  • setnx(key: KeyType, value: ValueType): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • value: ValueType
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • value: ValueType

    Returns Promise<BooleanResponse>

setrange

  • setrange(key: KeyType, offset: number, value: ValueType, callback: Callback<number>): void
  • setrange(key: KeyType, offset: number, value: ValueType): Promise<number>
  • Parameters

    • key: KeyType
    • offset: number
    • value: ValueType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • offset: number
    • value: ValueType

    Returns Promise<number>

shutdown

  • shutdown(save: "SAVE" | "NOSAVE", callback: Callback<never>): void
  • shutdown(save: "SAVE" | "NOSAVE"): Promise<never>
  • Parameters

    • save: "SAVE" | "NOSAVE"
    • callback: Callback<never>

    Returns void

  • Parameters

    • save: "SAVE" | "NOSAVE"

    Returns Promise<never>

sismember

  • sismember(key: KeyType, member: string, callback: Callback<BooleanResponse>): void
  • sismember(key: KeyType, member: string): Promise<BooleanResponse>
  • Parameters

    • key: KeyType
    • member: string
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • key: KeyType
    • member: string

    Returns Promise<BooleanResponse>

slaveof

  • slaveof(host: string, port: number, callback: Callback<string>): void
  • slaveof(host: string, port: number): Promise<string>
  • Parameters

    • host: string
    • port: number
    • callback: Callback<string>

    Returns void

  • Parameters

    • host: string
    • port: number

    Returns Promise<string>

smembers

  • smembers(key: KeyType, callback: Callback<string[]>): void
  • smembers(key: KeyType): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string[]>

smove

  • smove(source: string, destination: string, member: string, callback: Callback<BooleanResponse>): void
  • smove(source: string, destination: string, member: string): Promise<BooleanResponse>
  • Parameters

    • source: string
    • destination: string
    • member: string
    • callback: Callback<BooleanResponse>

    Returns void

  • Parameters

    • source: string
    • destination: string
    • member: string

    Returns Promise<BooleanResponse>

spop

  • spop(key: KeyType, callback: Callback<null | string>): void
  • spop(key: KeyType): Promise<null | string>
  • spop(key: KeyType, count: number, callback: Callback<string[]>): void
  • spop(key: KeyType, count: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<null | string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<null | string>

  • Parameters

    • key: KeyType
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • count: number

    Returns Promise<string[]>

srandmember

  • srandmember(key: KeyType, callback: Callback<null | string>): void
  • srandmember(key: KeyType): Promise<null | string>
  • srandmember(key: KeyType, count: number, callback: Callback<string[]>): void
  • srandmember(key: KeyType, count: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<null | string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<null | string>

  • Parameters

    • key: KeyType
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • count: number

    Returns Promise<string[]>

sscanStream

  • sscanStream(key: KeyType, options?: ScanStreamOption): Readable
  • Parameters

    • key: KeyType
    • Optional options: ScanStreamOption

    Returns Readable

strlen

  • strlen(key: KeyType, callback: Callback<number>): void
  • strlen(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

substr

  • substr(key: KeyType, start: number, end: number, callback: Callback<string>): void
  • substr(key: KeyType, start: number, end: number): Promise<string>
  • Parameters

    • key: KeyType
    • start: number
    • end: number
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • end: number

    Returns Promise<string>

sync

  • sync(callback: Callback<any>): void
  • sync(): Promise<any>
  • Parameters

    • callback: Callback<any>

    Returns void

  • Returns Promise<any>

time

  • time(callback: Callback<[string, string]>): void
  • time(): Promise<[string, string]>
  • Parameters

    • callback: Callback<[string, string]>

    Returns void

  • Returns Promise<[string, string]>

ttl

  • ttl(key: KeyType, callback: Callback<number>): void
  • ttl(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

type

  • type(key: KeyType, callback: Callback<string>): void
  • type(key: KeyType): Promise<string>
  • Parameters

    • key: KeyType
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<string>

unwatch

  • unwatch(callback: Callback<string>): void
  • unwatch(): Promise<string>
  • Parameters

    • callback: Callback<string>

    Returns void

  • Returns Promise<string>

xlen

  • xlen(key: KeyType): Promise<number>
  • xlen(key: KeyType, callback: Callback<number>): void
  • Parameters

    • key: KeyType

    Returns Promise<number>

  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

zaddBuffer

  • zaddBuffer(key: KeyType, score1: number, member1: Buffer, callback: Callback<string | number>): void
  • zaddBuffer(key: KeyType, score1: number, member1: Buffer): Promise<string | number>
  • Parameters

    • key: KeyType
    • score1: number
    • member1: Buffer
    • callback: Callback<string | number>

    Returns void

  • Parameters

    • key: KeyType
    • score1: number
    • member1: Buffer

    Returns Promise<string | number>

zcard

  • zcard(key: KeyType, callback: Callback<number>): void
  • zcard(key: KeyType): Promise<number>
  • Parameters

    • key: KeyType
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType

    Returns Promise<number>

zcount

  • zcount(key: KeyType, min: string | number, max: string | number, callback: Callback<number>): void
  • zcount(key: KeyType, min: string | number, max: string | number): Promise<number>
  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number

    Returns Promise<number>

zincrby

  • zincrby(key: KeyType, increment: number, member: string, callback: Callback<string>): void
  • zincrby(key: KeyType, increment: number, member: string): Promise<string>
  • Parameters

    • key: KeyType
    • increment: number
    • member: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType
    • increment: number
    • member: string

    Returns Promise<string>

zpopmax

  • zpopmax(key: KeyType, callback: Callback<string[]>): void
  • zpopmax(key: KeyType, count: number, callback: Callback<string[]>): void
  • zpopmax(key: KeyType, count?: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • Optional count: number

    Returns Promise<string[]>

zpopmin

  • zpopmin(key: KeyType, callback: Callback<string[]>): void
  • zpopmin(key: KeyType, count: number, callback: Callback<string[]>): void
  • zpopmin(key: KeyType, count?: number): Promise<string[]>
  • Parameters

    • key: KeyType
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • Optional count: number

    Returns Promise<string[]>

zrange

  • zrange(key: KeyType, start: number, stop: number, callback: Callback<string[]>): void
  • zrange(key: KeyType, start: number, stop: number, withScores: "WITHSCORES", callback: Callback<string[]>): void
  • zrange(key: KeyType, start: number, stop: number, withScores?: "WITHSCORES"): Promise<string[]>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • withScores: "WITHSCORES"
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • Optional withScores: "WITHSCORES"

    Returns Promise<string[]>

zrangeBuffer

  • zrangeBuffer(key: KeyType, start: number, stop: number, callback: Callback<Buffer[]>): void
  • zrangeBuffer(key: KeyType, start: number, stop: number, withScores: "WITHSCORES", callback: Callback<Buffer[]>): void
  • zrangeBuffer(key: KeyType, start: number, stop: number, withScores?: "WITHSCORES"): Promise<Buffer[]>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • withScores: "WITHSCORES"
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • Optional withScores: "WITHSCORES"

    Returns Promise<Buffer[]>

zrangebylex

  • zrangebylex(key: KeyType, min: string, max: string): Promise<string[]>
  • zrangebylex(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number): Promise<string[]>
  • zrangebylex(key: KeyType, min: string, max: string, callback: Callback<string[]>): void
  • zrangebylex(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number, callback: Callback<string[]>): void
  • Parameters

    • key: KeyType
    • min: string
    • max: string

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<string[]>

    Returns void

zrangebylexBuffer

  • zrangebylexBuffer(key: KeyType, min: string, max: string): Promise<Buffer[]>
  • zrangebylexBuffer(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number): Promise<Buffer[]>
  • zrangebylexBuffer(key: KeyType, min: string, max: string, callback: Callback<Buffer[]>): void
  • zrangebylexBuffer(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number, callback: Callback<Buffer[]>): void
  • Parameters

    • key: KeyType
    • min: string
    • max: string

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<Buffer[]>

    Returns void

zrangebyscore

  • zrangebyscore(key: KeyType, min: string | number, max: string | number, withScores?: "WITHSCORES"): Promise<string[]>
  • zrangebyscore(key: KeyType, min: string | number, max: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number): Promise<string[]>
  • zrangebyscore(key: KeyType, min: string | number, max: string | number, limit: "LIMIT", offset: number, count: number): Promise<string[]>
  • zrangebyscore(key: KeyType, min: string | number, max: string | number, callback: Callback<string[]>): void
  • zrangebyscore(key: KeyType, min: string | number, max: string | number, withScores: "WITHSCORES", callback: Callback<string[]>): void
  • zrangebyscore(key: KeyType, min: string | number, max: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number, callback: Callback<string[]>): void
  • zrangebyscore(key: KeyType, min: string | number, max: string | number, limit: "LIMIT", offset: number, count: number, callback: Callback<string[]>): void
  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • Optional withScores: "WITHSCORES"

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • withScores: "WITHSCORES"
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<string[]>

    Returns void

zrangebyscoreBuffer

  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, withScores?: "WITHSCORES"): Promise<Buffer[]>
  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number): Promise<Buffer[]>
  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, limit: "LIMIT", offset: number, count: number): Promise<Buffer[]>
  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, callback: Callback<Buffer[]>): void
  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, withScores: "WITHSCORES", callback: Callback<Buffer[]>): void
  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number, callback: Callback<Buffer[]>): void
  • zrangebyscoreBuffer(key: KeyType, min: string | number, max: string | number, limit: "LIMIT", offset: number, count: number, callback: Callback<Buffer[]>): void
  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • Optional withScores: "WITHSCORES"

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • withScores: "WITHSCORES"
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<Buffer[]>

    Returns void

zrank

  • zrank(key: KeyType, member: string, callback: Callback<null | number>): void
  • zrank(key: KeyType, member: string): Promise<null | number>
  • Parameters

    • key: KeyType
    • member: string
    • callback: Callback<null | number>

    Returns void

  • Parameters

    • key: KeyType
    • member: string

    Returns Promise<null | number>

zremrangebylex

  • zremrangebylex(key: KeyType, min: string, max: string): Promise<number>
  • zremrangebylex(key: KeyType, min: string, max: string, callback: Callback<number>): void
  • Parameters

    • key: KeyType
    • min: string
    • max: string

    Returns Promise<number>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • callback: Callback<number>

    Returns void

zremrangebyrank

  • zremrangebyrank(key: KeyType, start: number, stop: number, callback: Callback<number>): void
  • zremrangebyrank(key: KeyType, start: number, stop: number): Promise<number>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number

    Returns Promise<number>

zremrangebyscore

  • zremrangebyscore(key: KeyType, min: string | number, max: string | number, callback: Callback<number>): void
  • zremrangebyscore(key: KeyType, min: string | number, max: string | number): Promise<number>
  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number
    • callback: Callback<number>

    Returns void

  • Parameters

    • key: KeyType
    • min: string | number
    • max: string | number

    Returns Promise<number>

zrevrange

  • zrevrange(key: KeyType, start: number, stop: number, callback: Callback<string[]>): void
  • zrevrange(key: KeyType, start: number, stop: number, withScores: "WITHSCORES", callback: Callback<string[]>): void
  • zrevrange(key: KeyType, start: number, stop: number, withScores?: "WITHSCORES"): Promise<string[]>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • withScores: "WITHSCORES"
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • Optional withScores: "WITHSCORES"

    Returns Promise<string[]>

zrevrangeBuffer

  • zrevrangeBuffer(key: KeyType, start: number, stop: number, callback: Callback<Buffer[]>): void
  • zrevrangeBuffer(key: KeyType, start: number, stop: number, withScores: "WITHSCORES", callback: Callback<Buffer[]>): void
  • zrevrangeBuffer(key: KeyType, start: number, stop: number, withScores?: "WITHSCORES"): Promise<Buffer[]>
  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • withScores: "WITHSCORES"
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • start: number
    • stop: number
    • Optional withScores: "WITHSCORES"

    Returns Promise<Buffer[]>

zrevrangebylex

  • zrevrangebylex(key: KeyType, min: string, max: string): Promise<string[]>
  • zrevrangebylex(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number): Promise<string[]>
  • zrevrangebylex(key: KeyType, min: string, max: string, callback: Callback<string[]>): void
  • zrevrangebylex(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number, callback: Callback<string[]>): void
  • Parameters

    • key: KeyType
    • min: string
    • max: string

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<string[]>

    Returns void

zrevrangebylexBuffer

  • zrevrangebylexBuffer(key: KeyType, min: string, max: string): Promise<Buffer[]>
  • zrevrangebylexBuffer(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number): Promise<Buffer[]>
  • zrevrangebylexBuffer(key: KeyType, min: string, max: string, callback: Callback<Buffer[]>): void
  • zrevrangebylexBuffer(key: KeyType, min: string, max: string, limit: "LIMIT", offset: number, count: number, callback: Callback<Buffer[]>): void
  • Parameters

    • key: KeyType
    • min: string
    • max: string

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • min: string
    • max: string
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<Buffer[]>

    Returns void

zrevrangebyscore

  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, withScores?: "WITHSCORES"): Promise<string[]>
  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number): Promise<string[]>
  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, limit: "LIMIT", offset: number, count: number): Promise<string[]>
  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, callback: Callback<string[]>): void
  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, withScores: "WITHSCORES", callback: Callback<string[]>): void
  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number, callback: Callback<string[]>): void
  • zrevrangebyscore(key: KeyType, max: string | number, min: string | number, limit: "LIMIT", offset: number, count: number, callback: Callback<string[]>): void
  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • Optional withScores: "WITHSCORES"

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<string[]>

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • withScores: "WITHSCORES"
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<string[]>

    Returns void

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<string[]>

    Returns void

zrevrangebyscoreBuffer

  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, withScores?: "WITHSCORES"): Promise<Buffer[]>
  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number): Promise<Buffer[]>
  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, limit: "LIMIT", offset: number, count: number): Promise<Buffer[]>
  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, callback: Callback<Buffer[]>): void
  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, withScores: "WITHSCORES", callback: Callback<Buffer[]>): void
  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, withScores: "WITHSCORES", limit: "LIMIT", offset: number, count: number, callback: Callback<Buffer[]>): void
  • zrevrangebyscoreBuffer(key: KeyType, max: string | number, min: string | number, limit: "LIMIT", offset: number, count: number, callback: Callback<Buffer[]>): void
  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • Optional withScores: "WITHSCORES"

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number

    Returns Promise<Buffer[]>

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • withScores: "WITHSCORES"
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • withScores: "WITHSCORES"
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<Buffer[]>

    Returns void

  • Parameters

    • key: KeyType
    • max: string | number
    • min: string | number
    • limit: "LIMIT"
    • offset: number
    • count: number
    • callback: Callback<Buffer[]>

    Returns void

zrevrank

  • zrevrank(key: KeyType, member: string, callback: Callback<null | number>): void
  • zrevrank(key: KeyType, member: string): Promise<null | number>
  • Parameters

    • key: KeyType
    • member: string
    • callback: Callback<null | number>

    Returns void

  • Parameters

    • key: KeyType
    • member: string

    Returns Promise<null | number>

zscanStream

  • zscanStream(key: KeyType, options?: ScanStreamOption): Readable
  • Parameters

    • key: KeyType
    • Optional options: ScanStreamOption

    Returns Readable

zscore

  • zscore(key: KeyType, member: string, callback: Callback<string>): void
  • zscore(key: KeyType, member: string): Promise<string>
  • Parameters

    • key: KeyType
    • member: string
    • callback: Callback<string>

    Returns void

  • Parameters

    • key: KeyType
    • member: string

    Returns Promise<string>

Generated using TypeDoc