redis-smq-common
Version:
Provides essential components and utilities shared across RedisSMQ packages.
47 lines • 2.28 kB
TypeScript
import { RedisClientType, RedisFunctions, RedisModules, RedisScripts, RespVersions, TypeMapping } from '@redis/client';
import { ICallback } from '../../../async/index.js';
import { IRedisTransaction } from '../../types/index.js';
import { RedisClientMultiCommandType } from '@redis/client/dist/lib/client/multi-command.js';
export type TNodeRedisClient = RedisClientType<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping>;
export declare class NodeRedisClientMulti implements IRedisTransaction {
protected multi: RedisClientMultiCommandType<'typed', unknown[], RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping>;
constructor(client: TNodeRedisClient);
get(key: string): this;
hget(key: string, field: string): this;
smembers(key: string): this;
hgetall(key: string): this;
zcard(key: string): this;
scard(key: string): this;
llen(key: string): this;
zscore(key: string, member: string): this;
set(key: string, value: string | number, options: {
expire?: {
mode: 'EX' | 'PX';
value: number;
};
exists?: 'NX' | 'XX';
}): this;
incr(key: string): this;
decr(key: string): this;
incrby(key: string, increment: number): this;
decrby(key: string, decrement: number): this;
lrem(key: string, count: number, element: string): this;
lpop(key: string): this;
lpush(key: string, element: string): this;
ltrim(key: string, start: number, stop: number): this;
rpop(key: string): this;
rpush(key: string, element: string): this;
zadd(key: string, score: number, element: string): this;
zrem(key: string, element: string | string[]): this;
sadd(key: string, element: string): this;
srem(key: string, element: string | string[]): this;
hset(key: string, field: string, value: string | number): this;
hdel(key: string, field: string | string[]): this;
hincrby(key: string, field: string, by: number): this;
pexpire(key: string, millis: number): this;
expire(key: string, secs: number): this;
rpoplpush(source: string, destination: string): this;
del(key: string | string[]): this;
exec(cb: ICallback<unknown[]>): void;
}
//# sourceMappingURL=node-redis-client-multi.d.ts.map