Package SQLite

Class Shell

java.lang.Object
SQLite.Shell
All Implemented Interfaces:
Callback

public class Shell
extends Object
implements Callback
SQLite command line shell. This is a partial reimplementaion of sqlite/src/shell.c and can be invoked by:

java SQLite.Shell [OPTIONS] database [SHELLCMD] or java -jar sqlite.jar [OPTIONS] database [SHELLCMD]

  • Constructor Details

  • Method Details

    • clone

      protected Object clone()
      Description copied from class: Object
      Creates and returns a copy of this Object. The default implementation returns a so-called "shallow" copy: It creates a new instance of the same class and then copies the field values (including object references) from this instance to the new instance. A "deep" copy, in contrast, would also recursively clone nested objects. A subclass that needs to implement this kind of cloning should call super.clone() to create the new instance and then create deep copies of the nested, mutable objects.
      Overrides:
      clone in class Object
      Returns:
      a copy of this object.
    • sql_quote_dbl

      public static String sql_quote_dbl​(String str)
    • sql_quote

      public static String sql_quote​(String str)
    • columns

      public void columns​(String[] args)
      Description copied from interface: Callback
      Reports column names of the query result. This method is invoked first (and once) when the SQLite engine returns the result set.

      Specified by:
      columns in interface Callback
      Parameters:
      args - string array holding the column names
    • types

      public void types​(String[] args)
      Description copied from interface: Callback
      Reports type names of the columns of the query result. This is available from SQLite 2.6.0 on and needs the PRAGMA show_datatypes to be turned on.

      Specified by:
      types in interface Callback
      Parameters:
      args - string array holding column types
    • newrow

      public boolean newrow​(String[] args)
      Description copied from interface: Callback
      Reports row data of the query result. This method is invoked for each row of the result set. If true is returned the running SQLite query is aborted.

      Specified by:
      newrow in interface Callback
      Parameters:
      args - string array holding the column values of the row
    • main

      public static void main​(String[] args)