Custom Query

import Upstash from "upstash.js"

const upstash = new Upstash()

//result has any type
const [result, error] = await upstash.custom("set", "key", "value")

//result has type number, useful if you use typescript.
const [result, error] = await upstash.custom<number>("strlen", "key")

If you want to execute a command that we haven't implemented yet, you can also run your own commands, with the custom method.

Last updated