import { Redis } from "https://deno.land/x/upstash_redis@v1.18.5-rc.0/pkg/redis.ts";
Serverless redis client for upstash.
Constructors
new
Redis(client: Requester, opts?: RedisOptions)Create a new redis client
Properties
protected
client: Requesterprotected
optional
opts: CommandOptions<any, any>append: (...args: CommandArgs<AppendCommand>) => unknown
bitcount: (...args: CommandArgs<BitCountCommand>) => unknown
bitpos: (...args: CommandArgs<BitPosCommand>) => unknown
decr: (...args: CommandArgs<DecrCommand>) => unknown
decrby: (...args: CommandArgs<DecrByCommand>) => unknown
del: (...args: CommandArgs<DelCommand>) => unknown
echo: (...args: CommandArgs<EchoCommand>) => unknown
exists: (...args: CommandArgs<ExistsCommand>) => unknown
expire: (...args: CommandArgs<ExpireCommand>) => unknown
expireat: (...args: CommandArgs<ExpireAtCommand>) => unknown
flushall: (args?: CommandArgs<FlushAllCommand>) => unknown
flushdb: (...args: CommandArgs<FlushDBCommand>) => unknown
get: <TData>(...args: CommandArgs<GetCommand>) => unknown
getbit: (...args: CommandArgs<GetBitCommand>) => unknown
getdel: <TData>(...args: CommandArgs<GetDelCommand>) => unknown
getrange: (...args: CommandArgs<GetRangeCommand>) => unknown
hdel: (...args: CommandArgs<HDelCommand>) => unknown
hexists: (...args: CommandArgs<HExistsCommand>) => unknown
hget: <TData>(...args: CommandArgs<HGetCommand>) => unknown
hgetall: <TData extends Record<string, unknown>>(...args: CommandArgs<HGetAllCommand>) => unknown
hincrby: (...args: CommandArgs<HIncrByCommand>) => unknown
hincrbyfloat: (...args: CommandArgs<HIncrByFloatCommand>) => unknown
hkeys: (...args: CommandArgs<HKeysCommand>) => unknown
hlen: (...args: CommandArgs<HLenCommand>) => unknown
hmget: <TData extends Record<string, unknown>>(...args: CommandArgs<HMGetCommand>) => unknown
hscan: (...args: CommandArgs<HScanCommand>) => unknown
hstrlen: (...args: CommandArgs<HStrLenCommand>) => unknown
hvals: (...args: CommandArgs<HValsCommand>) => unknown
incr: (...args: CommandArgs<IncrCommand>) => unknown
incrby: (...args: CommandArgs<IncrByCommand>) => unknown
incrbyfloat: (...args: CommandArgs<IncrByFloatCommand>) => unknown
keys: (...args: CommandArgs<KeysCommand>) => unknown
lindex: (...args: CommandArgs<LIndexCommand>) => unknown
llen: (...args: CommandArgs<LLenCommand>) => unknown
lmove: <TData = string>(...args: CommandArgs<LMoveCommand>) => unknown
lpop: <TData>(...args: CommandArgs<LPopCommand>) => unknown
lpos: <TData = number>(...args: CommandArgs<LPosCommand>) => unknown
lrange: <TResult = string>(...args: CommandArgs<LRangeCommand>) => unknown
ltrim: (...args: CommandArgs<LTrimCommand>) => unknown
mget: <TData extends unknown[]>(...args: CommandArgs<MGetCommand>) => unknown
Create a new transaction to allow executing multiple steps atomically.
All the commands in a transaction are serialized and executed sequentially. A request sent by another client will never be served in the middle of the execution of a Redis Transaction. This guarantees that the commands are executed as a single isolated operation.
persist: (...args: CommandArgs<PersistCommand>) => unknown
pexpire: (...args: CommandArgs<PExpireCommand>) => unknown
pexpireat: (...args: CommandArgs<PExpireAtCommand>) => unknown
ping: (args?: CommandArgs<PingCommand>) => unknown
pttl: (...args: CommandArgs<PTtlCommand>) => unknown
publish: (...args: CommandArgs<PublishCommand>) => unknown
rename: (...args: CommandArgs<RenameCommand>) => unknown
renamenx: (...args: CommandArgs<RenameNXCommand>) => unknown
rpop: <TData = string>(...args: CommandArgs<RPopCommand>) => unknown
scan: (...args: CommandArgs<ScanCommand>) => unknown
scard: (...args: CommandArgs<SCardCommand>) => unknown
scriptExists: (...args: CommandArgs<ScriptExistsCommand>) => unknown
scriptFlush: (...args: CommandArgs<ScriptFlushCommand>) => unknown
scriptLoad: (...args: CommandArgs<ScriptLoadCommand>) => unknown
sdiff: (...args: CommandArgs<SDiffCommand>) => unknown
sdiffstore: (...args: CommandArgs<SDiffStoreCommand>) => unknown
setbit: (...args: CommandArgs<SetBitCommand>) => unknown
setrange: (...args: CommandArgs<SetRangeCommand>) => unknown
sinter: (...args: CommandArgs<SInterCommand>) => unknown
sinterstore: (...args: CommandArgs<SInterStoreCommand>) => unknown
smembers: <TData extends unknown[] = string[]>(...args: CommandArgs<SMembersCommand>) => unknown
spop: <TData>(...args: CommandArgs<SPopCommand>) => unknown
srandmember: <TData>(...args: CommandArgs<SRandMemberCommand>) => unknown
sscan: (...args: CommandArgs<SScanCommand>) => unknown
strlen: (...args: CommandArgs<StrLenCommand>) => unknown
sunion: (...args: CommandArgs<SUnionCommand>) => unknown
sunionstore: (...args: CommandArgs<SUnionStoreCommand>) => unknown
touch: (...args: CommandArgs<TouchCommand>) => unknown
ttl: (...args: CommandArgs<TtlCommand>) => unknown
type: (...args: CommandArgs<TypeCommand>) => unknown
unlink: (...args: CommandArgs<UnlinkCommand>) => unknown
use: <TResult = unknown>(middleware: (r: UpstashRequest, next: <TResult = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult>>) => Promise<UpstashResponse<TResult>>) => unknown
Wrap a new middleware around the HTTP client.
zadd: <TData>(...args: [string, ScoreMember<TData>, ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, [ScoreMember<TData>, ...ScoreMember<TData>[]]]) => unknown
zcard: (...args: CommandArgs<ZCardCommand>) => unknown
zcount: (...args: CommandArgs<ZCountCommand>) => unknown
zinterstore: (...args: CommandArgs<ZInterStoreCommand>) => unknown
zlexcount: (...args: CommandArgs<ZLexCountCommand>) => unknown
zmscore: (...args: CommandArgs<ZMScoreCommand>) => unknown
zpopmax: <TData>(...args: CommandArgs<ZPopMaxCommand>) => unknown
zpopmin: <TData>(...args: CommandArgs<ZPopMinCommand>) => unknown
zremrangebylex: (...args: CommandArgs<ZRemRangeByLexCommand>) => unknown
zremrangebyrank: (...args: CommandArgs<ZRemRangeByRankCommand>) => unknown
zremrangebyscore: (...args: CommandArgs<ZRemRangeByScoreCommand>) => unknown
zscan: (...args: CommandArgs<ZScanCommand>) => unknown
zunionstore: (...args: CommandArgs<ZUnionStoreCommand>) => unknown
Methods
createScript(script: string): Script