|
From: SVN by r. <sv...@ca...> - 2010-01-24 14:34:43
|
Author: roy
Date: 2010-01-24 15:34:35 +0100 (Sun, 24 Jan 2010)
New Revision: 460
Modified:
src/main/java/nl/improved/sqlclient/commands/SettingsCommand.java
Log:
more info in help and on failure
Modified: src/main/java/nl/improved/sqlclient/commands/SettingsCommand.java
===================================================================
--- src/main/java/nl/improved/sqlclient/commands/SettingsCommand.java 2010-01-24 14:05:15 UTC (rev 459)
+++ src/main/java/nl/improved/sqlclient/commands/SettingsCommand.java 2010-01-24 14:34:35 UTC (rev 460)
@@ -56,7 +56,7 @@
return new SimpleCommandResult(true, "Registred variable '"+varName+"' to value '"+varValue+"'");
}
- return new SimpleCommandResult(false, "Please provide a valid argument");
+ return new SimpleCommandResult(false, "Please provide a valid argument (or place @ before the variable name to set a variable), see 'help set'");
}
@@ -70,11 +70,15 @@
public CharSequence getHelp() {
StringBuffer result = new StringBuffer();
- result.append("Change settings of sqlshell properties" +
- "Settings are:\n"+
- "hSeparatorChar (current value: '"+ResultBuilder.getHorizontalSeparator()+"')\n"+
- "vSeparatorChar (values Y/N) (current value: '"+ResultBuilder.getVerticalSeparator()+"')\n" +
- "readAutoCommit (current value: '"+(ReadCommand.getAutoCommit() ? "Y" :"N")+"')\n" +
+ result.append("Change settings of sqlshell properties or variables/parameters that can be used in queries." +
+ "An example of a variable:\n"+
+ " set @name='SQLShell'\n" +
+ " select * from programs where name=@name\n" +
+ "\n"+
+ "Available Settings are:\n"+
+ " hSeparatorChar (current value: '"+ResultBuilder.getHorizontalSeparator()+"')\n"+
+ " vSeparatorChar (values Y/N) (current value: '"+ResultBuilder.getVerticalSeparator()+"')\n" +
+ " readAutoCommit (current value: '"+(ReadCommand.getAutoCommit() ? "Y" :"N")+"')\n" +
"@variable=value\n");
Map<String, String> variables = QueryCommand.getVariables();
|