1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

chore: remove support for UPPER_CASE commands

This commit is contained in:
Ruben Bridgewater
2017-05-06 01:46:29 +02:00
parent f92bc18c16
commit 19f3d20b47
41 changed files with 136 additions and 137 deletions

View File

@@ -21,14 +21,14 @@ var RedisClient = require('../').RedisClient;
on single and multi calls!
********************************************************************************************/
RedisClient.prototype.multi = RedisClient.prototype.MULTI = function multi (args) {
RedisClient.prototype.multi = function multi (args) {
var multi = new Multi(this, args);
multi.exec = multi.EXEC = multi.execTransaction;
return multi;
};
// ATTENTION: This is not a native function but is still handled as a individual command as it behaves just the same as multi
RedisClient.prototype.batch = RedisClient.prototype.BATCH = function batch (args) {
RedisClient.prototype.batch = function batch (args) {
return new Multi(this, args);
};
@@ -42,11 +42,11 @@ function selectCallback (self, db, callback) {
};
}
RedisClient.prototype.select = RedisClient.prototype.SELECT = function select (db, callback) {
RedisClient.prototype.select = function select (db, callback) {
return this.internalSendCommand(new Command('select', [db], selectCallback(this, db, callback)));
};
Multi.prototype.select = Multi.prototype.SELECT = function select (db, callback) {
Multi.prototype.select = function select (db, callback) {
this.queue.push(new Command('select', [db], selectCallback(this._client, db, callback)));
return this;
};
@@ -63,7 +63,7 @@ RedisClient.prototype.monitor = RedisClient.prototype.MONITOR = function monitor
};
// Only works with batch, not in a transaction
Multi.prototype.monitor = Multi.prototype.MONITOR = function monitor (callback) {
Multi.prototype.monitor = function monitor (callback) {
// Use a individual command, as this is a special case that does not has to be checked for any other command
if (this.exec !== this.execTransaction) {
var self = this;
@@ -98,7 +98,7 @@ function quitCallback (self, callback) {
};
}
RedisClient.prototype.QUIT = RedisClient.prototype.quit = function quit (callback) {
RedisClient.prototype.quit = function quit (callback) {
// TODO: Consider this for v.3
// Allow the quit command to be fired as soon as possible to prevent it landing in the offline queue.
// this.ready = this.offlineQueue.length === 0;
@@ -110,7 +110,7 @@ RedisClient.prototype.QUIT = RedisClient.prototype.quit = function quit (callbac
};
// Only works with batch, not in a transaction
Multi.prototype.QUIT = Multi.prototype.quit = function quit (callback) {
Multi.prototype.quit = function quit (callback) {
var self = this._client;
var callOnWrite = function () {
// If called in a multi context, we expect redis is available
@@ -159,7 +159,7 @@ function infoCallback (self, callback) {
}
// Store info in this.serverInfo after each call
RedisClient.prototype.info = RedisClient.prototype.INFO = function info (section, callback) {
RedisClient.prototype.info = function info (section, callback) {
var args = [];
if (typeof section === 'function') {
callback = section;
@@ -169,7 +169,7 @@ RedisClient.prototype.info = RedisClient.prototype.INFO = function info (section
return this.internalSendCommand(new Command('info', args, infoCallback(this, callback)));
};
Multi.prototype.info = Multi.prototype.INFO = function info (section, callback) {
Multi.prototype.info = function info (section, callback) {
var args = [];
if (typeof section === 'function') {
callback = section;
@@ -200,7 +200,7 @@ function authCallback (self, pass, callback) {
};
}
RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, callback) {
RedisClient.prototype.auth = function auth (pass, callback) {
debug('Sending auth to ' + this.address + ' id ' + this.connectionId);
// Stash auth for connect and reconnect.
@@ -213,7 +213,7 @@ RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, c
};
// Only works with batch, not in a transaction
Multi.prototype.auth = Multi.prototype.AUTH = function auth (pass, callback) {
Multi.prototype.auth = function auth (pass, callback) {
debug('Sending auth to ' + this.address + ' id ' + this.connectionId);
// Stash auth for connect and reconnect.
@@ -222,7 +222,7 @@ Multi.prototype.auth = Multi.prototype.AUTH = function auth (pass, callback) {
return this;
};
RedisClient.prototype.client = RedisClient.prototype.CLIENT = function client () {
RedisClient.prototype.client = function client () {
var arr,
len = arguments.length,
callback,
@@ -267,7 +267,7 @@ RedisClient.prototype.client = RedisClient.prototype.CLIENT = function client ()
return this.internalSendCommand(new Command('client', arr, callback, callOnWrite));
};
Multi.prototype.client = Multi.prototype.CLIENT = function client () {
Multi.prototype.client = function client () {
var arr,
len = arguments.length,
callback,
@@ -313,7 +313,7 @@ Multi.prototype.client = Multi.prototype.CLIENT = function client () {
return this;
};
RedisClient.prototype.hmset = RedisClient.prototype.HMSET = function hmset () {
RedisClient.prototype.hmset = function hmset () {
var arr,
len = arguments.length,
callback,
@@ -352,7 +352,7 @@ RedisClient.prototype.hmset = RedisClient.prototype.HMSET = function hmset () {
return this.internalSendCommand(new Command('hmset', arr, callback));
};
Multi.prototype.hmset = Multi.prototype.HMSET = function hmset () {
Multi.prototype.hmset = function hmset () {
var arr,
len = arguments.length,
callback,
@@ -392,7 +392,7 @@ Multi.prototype.hmset = Multi.prototype.HMSET = function hmset () {
return this;
};
RedisClient.prototype.subscribe = RedisClient.prototype.SUBSCRIBE = function subscribe () {
RedisClient.prototype.subscribe = function subscribe () {
var arr,
len = arguments.length,
callback,
@@ -419,7 +419,7 @@ RedisClient.prototype.subscribe = RedisClient.prototype.SUBSCRIBE = function sub
return this.internalSendCommand(new Command('subscribe', arr, callback, callOnWrite));
};
Multi.prototype.subscribe = Multi.prototype.SUBSCRIBE = function subscribe () {
Multi.prototype.subscribe = function subscribe () {
var arr,
len = arguments.length,
callback,
@@ -447,7 +447,7 @@ Multi.prototype.subscribe = Multi.prototype.SUBSCRIBE = function subscribe () {
return this;
};
RedisClient.prototype.unsubscribe = RedisClient.prototype.UNSUBSCRIBE = function unsubscribe () {
RedisClient.prototype.unsubscribe = function unsubscribe () {
var arr,
len = arguments.length,
callback,
@@ -475,7 +475,7 @@ RedisClient.prototype.unsubscribe = RedisClient.prototype.UNSUBSCRIBE = function
return this.internalSendCommand(new Command('unsubscribe', arr, callback, callOnWrite));
};
Multi.prototype.unsubscribe = Multi.prototype.UNSUBSCRIBE = function unsubscribe () {
Multi.prototype.unsubscribe = function unsubscribe () {
var arr,
len = arguments.length,
callback,
@@ -504,7 +504,7 @@ Multi.prototype.unsubscribe = Multi.prototype.UNSUBSCRIBE = function unsubscribe
return this;
};
RedisClient.prototype.psubscribe = RedisClient.prototype.PSUBSCRIBE = function psubscribe () {
RedisClient.prototype.psubscribe = function psubscribe () {
var arr,
len = arguments.length,
callback,
@@ -531,7 +531,7 @@ RedisClient.prototype.psubscribe = RedisClient.prototype.PSUBSCRIBE = function p
return this.internalSendCommand(new Command('psubscribe', arr, callback, callOnWrite));
};
Multi.prototype.psubscribe = Multi.prototype.PSUBSCRIBE = function psubscribe () {
Multi.prototype.psubscribe = function psubscribe () {
var arr,
len = arguments.length,
callback,
@@ -559,7 +559,7 @@ Multi.prototype.psubscribe = Multi.prototype.PSUBSCRIBE = function psubscribe ()
return this;
};
RedisClient.prototype.punsubscribe = RedisClient.prototype.PUNSUBSCRIBE = function punsubscribe () {
RedisClient.prototype.punsubscribe = function punsubscribe () {
var arr,
len = arguments.length,
callback,
@@ -587,7 +587,7 @@ RedisClient.prototype.punsubscribe = RedisClient.prototype.PUNSUBSCRIBE = functi
return this.internalSendCommand(new Command('punsubscribe', arr, callback, callOnWrite));
};
Multi.prototype.punsubscribe = Multi.prototype.PUNSUBSCRIBE = function punsubscribe () {
Multi.prototype.punsubscribe = function punsubscribe () {
var arr,
len = arguments.length,
callback,