@@ -57,7 +57,7 @@ util.inherits(RedisShardingClient, events.EventEmitter);
57
57
// meant purely for sanity check. avoid calling un-implemented methods in your app.
58
58
RedisShardingClient . prototype . notYetImplemented = function NotSupported ( command ) {
59
59
command = ( "Command " + command ) . trim ( ) ;
60
- throw new Error ( command + " is not yet supported in RedisShardingClient." ) ;
60
+ throw new Error ( command + " is not supported in RedisShardingClient." ) ;
61
61
} ;
62
62
63
63
// helper, and for testing: get index of client to use, based on key.
@@ -132,7 +132,8 @@ RedisShardingClient.prototype.waitForConnected = function waitForConnected() {
132
132
} ;
133
133
134
134
135
- // not-yet-implemented methods throw an error.
135
+ // not-yet-implemented methods throw an error
136
+ // (everything not explicitly re-defined below, and some specific ones.)
136
137
var unImplementedMethods = SingleClientCommands . concat ( [ 'end' , 'send_command' , 'server_info' ] ) ;
137
138
unImplementedMethods . forEach ( function ( command ) {
138
139
RedisShardingClient . prototype [ command ] =
@@ -142,6 +143,18 @@ unImplementedMethods.forEach(function(command){
142
143
} ) ;
143
144
144
145
146
+ // not-yet-implemented static properties
147
+ [ 'connection_id' , 'connections' , 'commands_sent' , 'connect_timeout' ,
148
+ 'monitoring' , 'closing' , 'server_info' , 'stream'
149
+ ] . forEach ( function ( staticProp ) {
150
+ RedisShardingClient . prototype . __defineGetter__ ( staticProp , function ( ) {
151
+ throw new Error ( "Property " + staticProp + " is not supported in RedisShardingClient." ) ;
152
+ } ) ;
153
+ // == no need for setters ==
154
+ } ) ;
155
+
156
+
157
+
145
158
// implement a subset of redis commands,
146
159
// with a simpler input syntax.
147
160
// throw errors on anything not supported.
@@ -260,9 +273,6 @@ RedisShardingClient.prototype.DBSIZE = function(callback) {
260
273
} ;
261
274
262
275
263
- // @todo dbsize() should return aggregate size
264
- // @todo keys() should check all clients
265
-
266
276
267
277
268
278
// @TODO this is duplicated between sentinal and sharding, consolidate.
0 commit comments