typescript - Redis 命令选项的完整列表
问题描述
我查看了许多库,但找不到 Redis 命令选项('redis'、'redis-commands'、'ioredis'、'@nestjs/microservices')的任何常量。以及 TypeScript 项目的许多其他接口。我错过了什么?我已经开始慢慢地为“ioredis”构建定义文件。
/**
* @link https://redis.io/commands/set
*/
export enum SET_OPTIONS {
/**
* seconds -- Set the specified expire time, in seconds.
*/
EX = 'EX',
/**
* timestamp-seconds -- Set the specified Unix time at which the key will expire, in seconds.
*/
EXAT = 'EXAT',
/**
* Return the old string stored at key, or nil if key did not exist.
* An error is returned and SET aborted if the value stored at key is not a string.
*/
GET = 'GET',
/**
* Retain the time to live associated with the key.
*/
KEEPTTL = 'KEEPTTL',
/**
* Only set the key if it does not already exist.
*/
NX = 'NX',
/**
* milliseconds -- Set the specified expire time, in milliseconds.
*/
PX = 'PX',
/**
* timestamp-milliseconds -- Set the specified Unix time at which the key will expire, in milliseconds.
*/
PXAT = 'PXAT',
/**
* Only set the key if it already exist.
*/
XX = 'XX',
}
/**
* @link https://redis.io/commands/expire
*/
export enum EXPIRE_OPTIONS {
/**
* Set expiry only when the new expiry is greater than current one
*/
GT = 'GT',
/**
* Set expiry only when the new expiry is less than current one
*/
LT = 'LT',
/**
* Set expiry only when the key has no expiry
*/
NX = 'NX',
/**
* Set expiry only when the key has an existing expiry
*/
XX = 'XX',
}
解决方案
推荐阅读
- spring - 各个级别的 Spring 事务是如何工作的?
- web-scraping - 如何使用漂亮的汤从保存的 html 页面中删除 td 行号和行内容类
- javascript - 如何获取动态创建的表的值?
- android - Observe Kotlin 中的返回值
- php - 在 WooCommerce 中禁用特定运输区域的“下订单”按钮
- javascript - 我怎样才能让我的提交按钮可点击一次并仍然执行我的 php?
- flutter - 单击按钮后执行功能 FLUTTER
- apache-spark - 本地主机上丢失的执行程序驱动程序:执行程序心跳超时
- ios - Xcode 11 Beta 5 卡住索引
- postgresql - 将 grafana(服务网格外)连接到服务网格内的数据源