Package net.hydromatic.quidem
Class Quidem.SqlCommand
- java.lang.Object
-
- net.hydromatic.quidem.AbstractCommand
-
- net.hydromatic.quidem.Quidem.SqlCommand
-
- All Implemented Interfaces:
Command
- Enclosing class:
- Quidem
public static class Quidem.SqlCommand extends AbstractCommand
Command that executes a SQL statement.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.hydromatic.quidem.Command
Command.Context, Command.ResultChecker
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdescribe(Command.Context x)Returns a string describing this command.voidexecute(Command.Context x, boolean execute)Executes this command.
-
-
-
Field Detail
-
sql
public final String sql
The query string.
-
sort
public final boolean sort
Whether to sort result set before printing.
-
-
Method Detail
-
describe
public String describe(Command.Context x)
Description copied from interface:CommandReturns a string describing this command.For example: "OkCommand [sql: select * from emp]" or "SkipCommand".
- Specified by:
describein interfaceCommand- Overrides:
describein classAbstractCommand- Parameters:
x- Execution context
-
execute
public void execute(Command.Context x, boolean execute) throws Exception
Description copied from interface:CommandExecutes this command.- Parameters:
x- Execution contextexecute- Whether to execute (false if execution is disabled, say by an 'if')- Throws:
Exception- if command fails
-
-