A provider transaction is a set of operations that are executed atomically by the provider. The transaction is created by calling the transact method on the provider. The transaction object contains methods specific to the provider allowing it to optionally choose to execute a single command or collect all commands and execute as a single transaction.

interface RedisRedisMultiType {
    exec: (() => Promise<unknown[]>);
    DEL(key: string): this;
    EXISTS(key: string): this;
    EXPIRE(key: string, seconds: number): this;
    HDEL(key: string, fields: string | string[]): this;
    HGET(key: string, itemId: string): this;
    HGETALL(key: string): this;
    HINCRBYFLOAT(key: string, itemId: string, value: number): this;
    HMGET(key: string, itemIds: string[]): this;
    HMPUSH(key: string, values: Record<string, string>): this;
    HSET(key: string, values: Record<string, string>): this;
    LPUSH(key: string, items: string[]): this;
    LRANGE(key: string, start: number, end: number): this;
    RPUSH(key: string, items: string[]): this;
    RPUSH(key: string, items: string[]): this;
    SET(key: string, value: string): this;
    XACK(key: string, group: string, id: string): this;
    XACK(key: string, group: string, ...ids: string[]): this;
    XADD(key: string, id: string, fields: any): this;
    XCLAIM(key: string, group: string, consumer: string, minIdleTime: number, id: string, ...args: string[]): this;
    XDEL(key: string, id: string): this;
    XDEL(key: string, ...ids: string[]): this;
    XGROUP(command: string, key: string, groupName: string, id: string, mkStream?: "MKSTREAM"): this;
    XLEN(key: string): this;
    XPENDING(key: string, group: string, start?: string, end?: string, count?: number, consumer?: string): this;
    ZADD(key: string, values: {
        score: string;
        value: string;
    }, opts?: {
        NX: boolean;
    }): this;
    ZRANGE_WITHSCORES(key: string, start: number, end: number): this;
    ZRANK(key: string, member: string): this;
    ZSCORE(key: string, value: string): this;
    sendCommand(command: string, ...args: string[]): Promise<any>;
}

Hierarchy (view full)

Properties

exec: (() => Promise<unknown[]>)

Methods

  • Parameters

    • key: string
    • seconds: number

    Returns this

  • Parameters

    • key: string
    • fields: string | string[]

    Returns this

  • Parameters

    • key: string
    • itemId: string

    Returns this

  • Parameters

    • key: string
    • itemId: string
    • value: number

    Returns this

  • Parameters

    • key: string
    • itemIds: string[]

    Returns this

  • Parameters

    • key: string
    • values: Record<string, string>

    Returns this

  • Parameters

    • key: string
    • values: Record<string, string>

    Returns this

  • Parameters

    • key: string
    • items: string[]

    Returns this

  • Parameters

    • key: string
    • start: number
    • end: number

    Returns this

  • Parameters

    • key: string
    • items: string[]

    Returns this

  • Parameters

    • key: string
    • items: string[]

    Returns this

  • Parameters

    • key: string
    • value: string

    Returns this

  • Parameters

    • key: string
    • group: string
    • id: string

    Returns this

  • Parameters

    • key: string
    • group: string
    • Rest...ids: string[]

    Returns this

  • Parameters

    • key: string
    • id: string
    • fields: any

    Returns this

  • Parameters

    • key: string
    • group: string
    • consumer: string
    • minIdleTime: number
    • id: string
    • Rest...args: string[]

    Returns this

  • Parameters

    • key: string
    • id: string

    Returns this

  • Parameters

    • key: string
    • Rest...ids: string[]

    Returns this

  • Parameters

    • command: string
    • key: string
    • groupName: string
    • id: string
    • OptionalmkStream: "MKSTREAM"

    Returns this

  • Parameters

    • key: string
    • group: string
    • Optionalstart: string
    • Optionalend: string
    • Optionalcount: number
    • Optionalconsumer: string

    Returns this

  • Parameters

    • key: string
    • values: {
          score: string;
          value: string;
      }
      • score: string
      • value: string
    • Optionalopts: {
          NX: boolean;
      }
      • NX: boolean

    Returns this

  • Parameters

    • key: string
    • start: number
    • end: number

    Returns this

  • Parameters

    • key: string
    • member: string

    Returns this

  • Parameters

    • key: string
    • value: string

    Returns this

  • Parameters

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

    Returns Promise<any>