Package sqlline

Interface CommandHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean echoToFile()
      Returns whether the command should be written to the output file of the !script command.
      void execute​(java.lang.String line, DispatchCallback dispatchCallback)
      Executes the specified command.
      java.lang.String getHelpText()  
      java.lang.String getName()  
      java.util.List<java.lang.String> getNames()  
      java.util.List<org.jline.reader.Completer> getParameterCompleters()
      Returns the completers that can handle parameters.
      java.lang.String matches​(java.lang.String line)
      Checks to see if the specified string can be dispatched to this command.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns:
        the name of the command
      • getNames

        java.util.List<java.lang.String> getNames()
        Returns:
        all the possible names of this command.
      • getHelpText

        java.lang.String getHelpText()
        Returns:
        the short help description for this command.
      • matches

        java.lang.String matches​(java.lang.String line)
        Checks to see if the specified string can be dispatched to this command.
        Parameters:
        line - The command line to check
        Returns:
        the command string that matches, or null if it no match
      • execute

        void execute​(java.lang.String line,
                     DispatchCallback dispatchCallback)
        Executes the specified command.
        Parameters:
        line - The full command line to execute
        dispatchCallback - the callback to check or interrupt the action
      • getParameterCompleters

        java.util.List<org.jline.reader.Completer> getParameterCompleters()
        Returns the completers that can handle parameters.
        Returns:
        Completers that can handle parameters
      • echoToFile

        boolean echoToFile()
        Returns whether the command should be written to the output file of the !script command.

        Returns true by default, but the !script command hides itself by returning false.

        Returns:
        true if command should be written to file