lib/command/database/key/rename.js
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);

  var source = '' + args[0]
    , destination = '' + args[1];

  if(!info.db.getKey(args[0], info)) {
    throw NoSuchKey;
  }else if(source === destination) {
    throw SourceDestination;
  }
  args[0] = source;
  args[1] = destination;
}
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);

  var source = '' + args[0]
    , destination = '' + args[1];

  if(!info.db.getKey(args[0], info)) {
    throw NoSuchKey;
  }else if(source === destination) {
    throw SourceDestination;
  }
  args[0] = source;
  args[1] = destination;
}
function validate ( cmd , args , info ) { AbstractCommand . prototype . validate . apply ( this , arguments ) ; var source = '' + args [ 0 ] , destination = '' + args [ 1 ] ; if ( ! info . db . getKey ( args [ 0 ] , info ) ) { throw NoSuchKey ; } else if ( source === destination ) { throw SourceDestination ; } args [ 0 ] = source ; args [ 1 ] = destination ; }
Validate the RENAME command.
Validate the RENAME command .