"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/cmdline/SqlTool.java" between
hsqldb-2.7.1.zip and hsqldb-2.7.2.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

SqlTool.java  (hsqldb-2.7.1):SqlTool.java  (hsqldb-2.7.2)
skipping to change at line 50 skipping to change at line 50
import java.net.URL; import java.net.URL;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.hsqldb.cmdline.sqltool.Token; import org.hsqldb.cmdline.sqltool.Token;
import org.hsqldb.cmdline.libclone.FrameworkLogger; import org.hsqldb.cmdline.libclone.FrameworkLogger;
import org.hsqldb.cmdline.utilclone.RCData; import org.hsqldb.cmdline.utilclone.RCData;
/* $Id: SqlTool.java 6559 2022-06-12 15:53:31Z fredt $ */ /* $Id: SqlTool.java 6632 2022-11-20 21:35:32Z unsaved $ */
/** /**
* A command-line JDBC SQL tool supporting both interactive and * A command-line JDBC SQL tool supporting both interactive and
* non-interactive usage. * non-interactive usage.
* <P> * <P>
* See JavaDocs for the main method for syntax of how to run from the * See JavaDocs for the main method for syntax of how to run from the
* command-line. * command-line.
* <P> * <P>
* Programmatic users will usually want to use the objectMain(String[]) method * Programmatic users will usually want to use the objectMain(String[]) method
* if they want arguments and behavior exactly like command-line SqlTool. * if they want arguments and behavior exactly like command-line SqlTool.
skipping to change at line 72 skipping to change at line 72
* the SqlFile class directly. The file * the SqlFile class directly. The file
* <CODE>src/org/hsqldb/sample/SqlFileEmbedder.java</CODE> * <CODE>src/org/hsqldb/sample/SqlFileEmbedder.java</CODE>
* in the HSQLDB distribution provides an example for this latter strategy. * in the HSQLDB distribution provides an example for this latter strategy.
* *
* @see <a href="../../../../util-guide/sqltool-chapt.html" target="guide"> * @see <a href="../../../../util-guide/sqltool-chapt.html" target="guide">
* The SqlTool chapter of the * The SqlTool chapter of the
* HyperSQL Utilities Guide</a> * HyperSQL Utilities Guide</a>
* @see #main(String[]) * @see #main(String[])
* @see #objectMain(String[]) * @see #objectMain(String[])
* @see SqlFile * @see SqlFile
* @version $Revision: 6559 $, $Date: 2022-06-12 16:53:31 +0100 (Sun, 12 Jun 202 2) $ * @version $Revision: 6632 $, $Date: 2022-11-20 21:35:32 +0000 (Sun, 20 Nov 202 2) $
* @author Blaine Simpson (blaine dot simpson at admc dot com) * @author Blaine Simpson (blaine dot simpson at admc dot com)
*/ */
public class SqlTool { public class SqlTool {
private static final FrameworkLogger logger = private static final FrameworkLogger logger =
FrameworkLogger.getLog(SqlTool.class); FrameworkLogger.getLog(SqlTool.class);
public static final String DEFAULT_RCFILE = public static final String DEFAULT_RCFILE =
System.getProperty("user.home") + "/sqltool.rc"; System.getProperty("user.home") + "/sqltool.rc";
// N.b. the following are static! // N.b. the following are static!
private static final String revString = "$Revision: 6559 $"; private static final String revString = "$Revision: 6632 $";
private static final int revStringLength = revString.length(); private static final int revStringLength = revString.length();
@SuppressWarnings("ConstantConditions") @SuppressWarnings("ConstantConditions")
private static final String revnum = private static final String revnum =
(revStringLength - " $".length() > "$Revision: ".length()) (revStringLength - " $".length() > "$Revision: ".length())
? revString.substring("$Revision: ".length(), ? revString.substring("$Revision: ".length(),
revStringLength - " $".length()) revStringLength - " $".length())
: "<UNTRACKED>"; : "<UNTRACKED>";
public static final int SQLTOOLERR_EXITVAL = 1; public static final int SQLTOOLERR_EXITVAL = 1;
public static final int SYNTAXERR_EXITVAL = 11; public static final int SYNTAXERR_EXITVAL = 11;
skipping to change at line 584 skipping to change at line 584
scriptFiles = new URL[arg.length - i - 1 scriptFiles = new URL[arg.length - i - 1
+ ((stdinputOverride == null + ((stdinputOverride == null
|| !stdinputOverride) ? 0 : 1)]; || !stdinputOverride) ? 0 : 1)];
if (debug) { if (debug) {
System.err.println("scriptFiles has " System.err.println("scriptFiles has "
+ scriptFiles.length + " elements"); + scriptFiles.length + " elements");
} }
while (i + 1 < arg.length) try { while (i + 1 < arg.length) try {
scriptFiles[scriptIndex] = scriptFiles[scriptIndex++] =
SqlFile.URL_WITH_PROTO_RE.matcher(arg[++i]).matches() ? SqlFile.URL_WITH_PROTO_RE.matcher(arg[++i]).matches() ?
new URL(arg[i]) : new URL(arg[i]) :
new URL("file", null, arg[i]); new URL("file", null, arg[i]);
} catch (MalformedURLException mue) { } catch (MalformedURLException mue) {
// TODO: Define a new ResourceBundle message! // TODO: Define a new ResourceBundle message!
throw new RuntimeException( throw new RuntimeException(
"Invalid SQL file URL " + arg[i]); "Invalid SQL file URL " + arg[i]);
} }
if (stdinputOverride != null && stdinputOverride) { if (stdinputOverride != null && stdinputOverride) {
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)