/** * Run the shell tool with the given connection and command line settings. * The connection will be closed when the shell exits. * This is primary used to integrate the Shell into another application. * <p> * Note: using the "-url" option in {@code args} doesn't make much sense * since it will override the {@code conn} parameter. * </p> * * @param conn the connection * @param args the command line settings */ public void runTool(Connection conn, String... args) throws SQLException { this.conn = conn; this.stat = conn.createStatement(); runTool(args); }
/** * Options are case sensitive. Supported options are: * <table> * <tr><td>[-help] or [-?]</td> * <td>Print the list of options</td></tr> * <tr><td>[-url "<url>"]</td> * <td>The database URL (jdbc:h2:...)</td></tr> * <tr><td>[-user <user>]</td> * <td>The user name</td></tr> * <tr><td>[-password <pwd>]</td> * <td>The password</td></tr> * <tr><td>[-driver <class>]</td> * <td>The JDBC driver class to use (not required in most cases)</td></tr> * <tr><td>[-sql "<statements>"]</td> * <td>Execute the SQL statements and exit</td></tr> * <tr><td>[-properties "<dir>"]</td> * <td>Load the server properties from this directory</td></tr> * </table> * If special characters don't work as expected, you may need to use * -Dfile.encoding=UTF-8 (Mac OS X) or CP850 (Windows). * @h2.resource * * @param args the command line arguments */ public static void main(String... args) throws SQLException { new Shell().runTool(args); }
/** * Run the shell tool with the given connection and command line settings. * The connection will be closed when the shell exits. * This is primary used to integrate the Shell into another application. * <p> * Note: using the "-url" option in {@code args} doesn't make much sense * since it will override the {@code conn} parameter. * </p> * * @param conn the connection * @param args the command line settings */ public void runTool(Connection conn, String... args) throws SQLException { this.conn = conn; this.stat = conn.createStatement(); runTool(args); }
/** * Run the shell tool with the given connection and command line settings. * The connection will be closed when the shell exits. * This is primary used to integrate the Shell into another application. * <p> * Note: using the "-url" option in {@code args} doesn't make much sense * since it will override the {@code conn} parameter. * </p> * * @param conn the connection * @param args the command line settings */ public void runTool(Connection conn, String... args) throws SQLException { this.conn = conn; this.stat = conn.createStatement(); runTool(args); }
/** * Options are case sensitive. Supported options are: * <table> * <tr><td>[-help] or [-?]</td> * <td>Print the list of options</td></tr> * <tr><td>[-url "<url>"]</td> * <td>The database URL (jdbc:h2:...)</td></tr> * <tr><td>[-user <user>]</td> * <td>The user name</td></tr> * <tr><td>[-password <pwd>]</td> * <td>The password</td></tr> * <tr><td>[-driver <class>]</td> * <td>The JDBC driver class to use (not required in most cases)</td></tr> * <tr><td>[-sql "<statements>"]</td> * <td>Execute the SQL statements and exit</td></tr> * <tr><td>[-properties "<dir>"]</td> * <td>Load the server properties from this directory</td></tr> * </table> * If special characters don't work as expected, you may need to use * -Dfile.encoding=UTF-8 (Mac OS X) or CP850 (Windows). * @h2.resource * * @param args the command line arguments */ public static void main(String... args) throws SQLException { new Shell().runTool(args); }
/** * Options are case sensitive. Supported options are: * <table> * <tr><td>[-help] or [-?]</td> * <td>Print the list of options</td></tr> * <tr><td>[-url "<url>"]</td> * <td>The database URL (jdbc:h2:...)</td></tr> * <tr><td>[-user <user>]</td> * <td>The user name</td></tr> * <tr><td>[-password <pwd>]</td> * <td>The password</td></tr> * <tr><td>[-driver <class>]</td> * <td>The JDBC driver class to use (not required in most cases)</td></tr> * <tr><td>[-sql "<statements>"]</td> * <td>Execute the SQL statements and exit</td></tr> * <tr><td>[-properties "<dir>"]</td> * <td>Load the server properties from this directory</td></tr> * </table> * If special characters don't work as expected, you may need to use * -Dfile.encoding=UTF-8 (Mac OS X) or CP850 (Windows). * @h2.resource * * @param args the command line arguments */ public static void main(String... args) throws SQLException { new Shell().runTool(args); }