redis-typescript
Version:
redis client for node.js with typescript and async
78 lines • 2.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("../core/base");
var MethodList;
(function (MethodList) {
MethodList["blpop"] = "BLPOP";
MethodList["brpop"] = "BRPOP";
MethodList["brpoplpush"] = "BRPOPLPUSH";
MethodList["lindex"] = "LINDEX";
MethodList["linsert"] = "LINSERT";
MethodList["llen"] = "LLEN";
MethodList["lpop"] = "LPOP";
MethodList["lpush"] = "LPUSH";
MethodList["lpushx"] = "LPUSHX";
MethodList["lrange"] = "LRANGE";
MethodList["lrem"] = "LREM";
MethodList["lset"] = "LSET";
MethodList["ltrim"] = "LTRIM";
MethodList["rpop"] = "RPOP";
MethodList["rpoplpush"] = "RPOPLPUSH";
MethodList["rpush"] = "RPUSH";
MethodList["rpushx"] = "RPUSHX";
})(MethodList || (MethodList = {}));
class RedisList extends base_1.Base {
blpop(timeout, ...keys) {
return this.command(MethodList.blpop, ...keys, timeout);
}
brpop(timeout, ...keys) {
return this.command(MethodList.brpop, ...keys, timeout);
}
brpoplpush(source, destination, timeout) {
return this.command(MethodList.brpoplpush, source, destination, timeout);
}
lindex(key, index) {
return this.command(MethodList.lindex, key, index);
}
linsert(key, type, pivot, value) {
return this.command(MethodList.linsert, key, type, pivot, value);
}
llen(key) {
return this.command(MethodList.llen, key);
}
lpop(key) {
return this.command(MethodList.lpop, key);
}
lpush(key, value, ...values) {
return this.command(MethodList.lpush, key, value, ...values);
}
lpushx(key, value) {
return this.command(MethodList.lpushx, key, value);
}
lrange(key, start, stop) {
return this.command(MethodList.lrange, key, start, stop);
}
lrem(key, count, value) {
return this.command(MethodList.lrem, key, count, value);
}
lset(key, index, value) {
return this.command(MethodList.lset, key, index, value);
}
ltrim(key, start, stop) {
return this.command(MethodList.ltrim, key, start, stop);
}
rpop(key) {
return this.command(MethodList.rpop, key);
}
rpoplpush(source, destination) {
return this.command(MethodList.rpoplpush, source, destination);
}
rpush(key, value, ...values) {
return this.command(MethodList.rpush, key, value, ...values);
}
rpushx(key, value) {
return this.command(MethodList.rpushx, key, value);
}
}
exports.RedisList = RedisList;
//# sourceMappingURL=list.js.map