Skip to main content
Module

x/upstash_redis/pkg/commands/mod.ts>Command

HTTP based Redis Client for Serverless and Edge Functions
Extremely Popular
Go to Latest
class Command
Re-export
import { Command } from "https://deno.land/x/upstash_redis@v1.19.3/pkg/commands/mod.ts";

Command offers default (de)serialization and the exec method to all commands.

TData represents what the user will enter or receive, TResult is the raw data returned from upstash, which may need to be transformed or parsed.

Constructors

new
Command(command: (string | unknown)[], opts?: CommandOptions<TResult, TData>)

Create a new command instance.

You can define a custom deserialize function. By default we try to deserialize as json.

Type Parameters

TResult
TData

Properties

readonly
command: string[]
readonly
deserialize: Deserialize<TResult, TData>
readonly
serialize: Serialize

Methods

exec(client: Requester): Promise<TData>

Execute the command using a client.