buildCommand method

  1. @override
String buildCommand()
override

Build the @ command to be sent to remote secondary for execution.

Implementation

@override
String buildCommand() {
  StringBuffer serverCommandBuffer = StringBuffer('scan');

  if (showHiddenKeys) {
    serverCommandBuffer.write(':${AtConstants.showHidden}:true');
  }
  if (sharedBy != null) {
    serverCommandBuffer.write(':${VerbUtil.formatAtSign(sharedBy)}');
  }
  if (regex != null) {
    serverCommandBuffer.write(' $regex');
  }
  return (serverCommandBuffer..write('\n')).toString();
}