Class Quidem.SqlCommand

  • All Implemented Interfaces:
    Command
    Enclosing class:
    Quidem

    public static class Quidem.SqlCommand
    extends AbstractCommand
    Command that executes a SQL statement.
    • 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: Command
        Returns a string describing this command.

        For example: "OkCommand [sql: select * from emp]" or "SkipCommand".

        Specified by:
        describe in interface Command
        Overrides:
        describe in class AbstractCommand
        Parameters:
        x - Execution context
      • execute

        public void execute​(Command.Context x,
                            boolean execute)
                     throws Exception
        Description copied from interface: Command
        Executes this command.
        Parameters:
        x - Execution context
        execute - Whether to execute (false if execution is disabled, say by an 'if')
        Throws:
        Exception - if command fails