blob: ea91b0cff22518cbeb9299b6b756e91370a19138 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_20) on Sun Jun 06 23:05:42 EDT 2010 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
SqlFile (HSQLDB 2.0.0 API)
</TITLE>
<META NAME="date" CONTENT="2010-06-06">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SqlFile (HSQLDB 2.0.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SqlFile.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../org/hsqldb/cmdline/SqlTool.html" title="class in org.hsqldb.cmdline"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/hsqldb/cmdline/SqlFile.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SqlFile.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.hsqldb.cmdline</FONT>
<BR>
Class SqlFile</H2>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.hsqldb.cmdline.SqlFile</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>SqlFile</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
Encapsulation of SQL text and the environment under which it will executed
with a JDBC Connection.
'SqlInputStream' would be a more precise name, but the content we are
talking about here is what is colloqially known as the contents of
"SQL file"s.
<P>
The file <CODE>src/org/hsqldb/sample/SqlFileEmbedder.java</CODE>
in the HSQLDB distribution provides an example for using SqlFile to
execute SQL files directly from your own Java classes.
<P/><P>
The complexities of passing userVars and macros maps are to facilitate
strong scoping (among blocks and nested scripts).
<P/><P>
Some implementation comments and variable names use keywords based
on the following definitions. <UL>
<LI> COMMAND = Statement || SpecialCommand || BufferCommand
<LI>Statement = SQL statement like "SQL Statement;"
<LI>SpecialCommand = Special Command like "\x arg..."
<LI>BufferCommand = Editing/buffer command like ":s/this/that/"
</UL>
<P/><P>
When entering SQL statements, you are always "appending" to the
"immediate" command (not the "buffer", which is a different thing).
All you can do to the immediate command is append new lines to it,
execute it, or save it to buffer.
When you are entering a buffer edit command like ":s/this/that/",
your immediate command is the buffer-edit-command. The buffer
is the command string that you are editing.
The buffer usually contains either an exact copy of the last command
executed or sent to buffer by entering a blank line,
but BUFFER commands can change the contents of the buffer.
<P/><P>
In general, the special commands mirror those of Postgresql's psql,
but SqlFile handles command editing very differently than Postgresql
does, in part because of Java's lack of support for raw tty I/O.
The \p special command, in particular, is very different from psql's.
<P/><P>
Buffer commands are unique to SQLFile. The ":" commands allow
you to edit the buffer and to execute the buffer.
<P/><P>
\d commands are very poorly supported for Mysql because
(a) Mysql lacks most of the most basic JDBC support elements, and
the most basic role and schema features, and
(b) to access the Mysql data dictionary, one must change the database
instance (to do that would require work to restore the original state
and could have disastrous effects upon transactions).
<P/><P>
The process*() methods, other than processBuffHist() ALWAYS execute
on "buffer", and expect it to contain the method specific prefix
(if any).
<P/><P>
The input/output Reader/Stream are generally managed by the caller.
An exception is that the input reader may be closed automatically or on
demand by the user, since in some cases this class builds the Reader.
There is no corresponding functionality for output since the user always
has control over that object (which may be null or System.out).
<P/>
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Blaine Simpson (blaine dot simpson at admc dot com)</DD>
<DT><B>See Also:</B><DD><a href="../../../../util-guide/sqltool-chapt.html" target="guide">
The SqlTool chapter of the
HyperSQL Utilities Guide</a>,
<A HREF="../../../org/hsqldb/sample/SqlFileEmbedder.html" title="class in org.hsqldb.sample"><CODE>SqlFileEmbedder</CODE></A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#LS">LS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Platform-specific line separator</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.File)">SqlFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inputFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience wrapper for the SqlFile(File, String) constructor</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.File, java.lang.String)">SqlFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inputFile,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience wrapper for the SqlFile(File, String, boolean) constructor</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.File, java.lang.String, boolean)">SqlFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inputFile,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding,
boolean&nbsp;interactive)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for non-interactive usage with a SQL file, using the
specified encoding and sending normal output to stdout.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.Reader, java.lang.String, java.io.PrintStream, java.lang.String, boolean)">SqlFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;reader,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;inputStreamLabel,
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</A>&nbsp;psStd,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding,
boolean&nbsp;interactive)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiate a SqlFile instance for SQL input from 'reader'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.lang.String, boolean)">SqlFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding,
boolean&nbsp;interactive)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for interactive usage with stdin/stdout</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#addMacros(java.util.Map)">addMacros</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,org.hsqldb.cmdline.sqltool.Token&gt;&nbsp;newMacros)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#addUserVars(java.util.Map)">addUserVars</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;newUserVars)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#bitCharsToBytes(java.lang.String)">bitCharsToBytes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;hexChars)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Just a stub for now.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#canDisplayType(int)">canDisplayType</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is used to tell SqlFile whether this Sql Type must
ALWAYS be loaded to the binary buffer without displaying.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#closeReader()">closeReader</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close the reader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#convertEscapes(java.lang.String)">convertEscapes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;inString)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translates user-supplied escapes into the traditionaly corresponding
corresponding binary characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#dsvSafe(java.lang.String)">dsvSafe</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validate that String is safe to write TO DSV file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#execute()">execute</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Process all the commands from the file or Reader associated with
"this" object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#getBanner(java.sql.Connection)">getBanner</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</A>&nbsp;c)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a String report for the specified JDBC Connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#getConnection()">getConnection</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#getCurrentSchema()">getCurrentSchema</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,org.hsqldb.cmdline.sqltool.Token&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#getMacros()">getMacros</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#getUserVars()">getUserVars</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#hexCharOctetsToBytes(java.lang.String)">hexCharOctetsToBytes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;hexChars)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a String to a byte array by interpreting every 2 characters as
an octal byte value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#importDsv(java.lang.String, java.lang.String)">importDsv</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filePath,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;skipPrefix)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name is self-explanatory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#loadBinary(java.io.File)">loadBinary</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;binFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binary file load</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#setAutoClose(boolean)">setAutoClose</A></B>(boolean&nbsp;autoClose)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specify whether the supplied or generated input Reader should
automatically be closed by the execute() method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#setConnection(java.sql.Connection)">setConnection</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</A>&nbsp;jdbcConn)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#setContinueOnError(boolean)">setContinueOnError</A></B>(boolean&nbsp;continueOnError)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#setMaxHistoryLength(int)">setMaxHistoryLength</A></B>(int&nbsp;maxHistoryLength)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#sqlTypeToString(int)">sqlTypeToString</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a String representation of the specified java.sql.Types type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#streamToBytes(java.io.InputStream)">streamToBytes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;is)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As the name says...</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#streamToString(java.io.InputStream, java.lang.String)">streamToString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;isIn,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;cs)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As the name says...</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="LS"><!-- --></A><H3>
LS</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>LS</B></PRE>
<DL>
<DD>Platform-specific line separator
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="SqlFile(java.io.File)"><!-- --></A><H3>
SqlFile</H3>
<PRE>
public <B>SqlFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inputFile)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Convenience wrapper for the SqlFile(File, String) constructor
<P>
<DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.File, java.lang.String)"><CODE>SqlFile(File, String)</CODE></A></DL>
</DL>
<HR>
<A NAME="SqlFile(java.io.File, java.lang.String)"><!-- --></A><H3>
SqlFile</H3>
<PRE>
public <B>SqlFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inputFile,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Convenience wrapper for the SqlFile(File, String, boolean) constructor
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>encoding</CODE> - is applied to both the given File and other files
read in or written out. Null will use your env+JVM settings.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.File, java.lang.String, boolean)"><CODE>SqlFile(File, String, boolean)</CODE></A></DL>
</DL>
<HR>
<A NAME="SqlFile(java.io.File, java.lang.String, boolean)"><!-- --></A><H3>
SqlFile</H3>
<PRE>
public <B>SqlFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;inputFile,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding,
boolean&nbsp;interactive)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Constructor for non-interactive usage with a SQL file, using the
specified encoding and sending normal output to stdout.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>encoding</CODE> - is applied to the given File and other files
read in or written out. Null will use your env+JVM settings.<DD><CODE>interactive</CODE> - If true, prompts are printed, the interactive
Special commands are enabled, and
continueOnError defaults to true.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.Reader, java.lang.String, java.io.PrintStream, java.lang.String, boolean)"><CODE>SqlFile(Reader, String, PrintStream, String, boolean)</CODE></A></DL>
</DL>
<HR>
<A NAME="SqlFile(java.lang.String, boolean)"><!-- --></A><H3>
SqlFile</H3>
<PRE>
public <B>SqlFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding,
boolean&nbsp;interactive)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Constructor for interactive usage with stdin/stdout
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>encoding</CODE> - is applied to other files read in or written out (but
not to stdin or stdout).
Null will use your env+JVM settings.<DD><CODE>interactive</CODE> - If true, prompts are printed, the interactive
Special commands are enabled, and
continueOnError defaults to true.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#SqlFile(java.io.Reader, java.lang.String, java.io.PrintStream, java.lang.String, boolean)"><CODE>SqlFile(Reader, String, PrintStream, String, boolean)</CODE></A></DL>
</DL>
<HR>
<A NAME="SqlFile(java.io.Reader, java.lang.String, java.io.PrintStream, java.lang.String, boolean)"><!-- --></A><H3>
SqlFile</H3>
<PRE>
public <B>SqlFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</A>&nbsp;reader,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;inputStreamLabel,
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/PrintStream.html?is-external=true" title="class or interface in java.io">PrintStream</A>&nbsp;psStd,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding,
boolean&nbsp;interactive)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Instantiate a SqlFile instance for SQL input from 'reader'.
After any needed customization, the SQL can be executed by the
execute method.
<P>
Most Special Commands and many Buffer commands are only for
interactive use.
</P> <P>
This program never writes to an error stream (stderr or alternative).
All meta messages and error messages are written using the logging
facility.
</P>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Source for the SQL to be executed.
Caller is responsible for setting up encoding.
(the 'encoding' parameter will NOT be applied
to this reader).<DD><CODE>psStd</CODE> - PrintStream for normal output.
If null, normal output will be discarded.
Caller is responsible for settingup encoding
(the 'encoding' parameter will NOT be applied
to this stream).<DD><CODE>interactive</CODE> - If true, prompts are printed, the interactive
Special commands are enabled, and
continueOnError defaults to true.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../org/hsqldb/cmdline/SqlFile.html#execute()"><CODE>execute()</CODE></A></DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setConnection(java.sql.Connection)"><!-- --></A><H3>
setConnection</H3>
<PRE>
public void <B>setConnection</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</A>&nbsp;jdbcConn)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getConnection()"><!-- --></A><H3>
getConnection</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</A> <B>getConnection</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setContinueOnError(boolean)"><!-- --></A><H3>
setContinueOnError</H3>
<PRE>
public void <B>setContinueOnError</B>(boolean&nbsp;continueOnError)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMaxHistoryLength(int)"><!-- --></A><H3>
setMaxHistoryLength</H3>
<PRE>
public void <B>setMaxHistoryLength</B>(int&nbsp;maxHistoryLength)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addMacros(java.util.Map)"><!-- --></A><H3>
addMacros</H3>
<PRE>
public void <B>addMacros</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,org.hsqldb.cmdline.sqltool.Token&gt;&nbsp;newMacros)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addUserVars(java.util.Map)"><!-- --></A><H3>
addUserVars</H3>
<PRE>
public void <B>addUserVars</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;newUserVars)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getUserVars()"><!-- --></A><H3>
getUserVars</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <B>getUserVars</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMacros()"><!-- --></A><H3>
getMacros</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,org.hsqldb.cmdline.sqltool.Token&gt; <B>getMacros</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAutoClose(boolean)"><!-- --></A><H3>
setAutoClose</H3>
<PRE>
public void <B>setAutoClose</B>(boolean&nbsp;autoClose)</PRE>
<DL>
<DD>Specify whether the supplied or generated input Reader should
automatically be closed by the execute() method.
<P>
execute() will close the Reader by default (i.e. 'autoClose' defaults
to true).
You may want to set this to false if you want to stop execution with
\q or similar, then continue using the Reader or underlying Stream.
</P> <P>
The caller is always responsible for closing the output object (if any)
used by SqlFile.
</P>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="execute()"><!-- --></A><H3>
execute</H3>
<PRE>
public void <B>execute</B>()
throws org.hsqldb.cmdline.SqlToolError,
<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</A></PRE>
<DL>
<DD>Process all the commands from the file or Reader associated with
"this" object.
SQL commands in the content get executed against the current JDBC
data source connection.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>SQLExceptions</CODE> - thrown by JDBC driver.
Only possible if in "\c false" mode.
<DD><CODE>org.hsqldb.cmdline.SqlToolError</CODE> - all other errors.
This includes including QuitNow, BreakException,
ContinueException for recursive calls only.
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="closeReader()"><!-- --></A><H3>
closeReader</H3>
<PRE>
public void <B>closeReader</B>()</PRE>
<DL>
<DD>Close the reader.
The execute method will run this automatically, by default.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentSchema()"><!-- --></A><H3>
getCurrentSchema</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getCurrentSchema</B>()
throws org.hsqldb.cmdline.SqlFile.BadSpecial,
org.hsqldb.cmdline.SqlToolError</PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>org.hsqldb.cmdline.SqlFile.BadSpecial</CODE>
<DD><CODE>org.hsqldb.cmdline.SqlToolError</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="streamToString(java.io.InputStream, java.lang.String)"><!-- --></A><H3>
streamToString</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>streamToString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;isIn,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;cs)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>As the name says...
This method always closes the input stream.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="streamToBytes(java.io.InputStream)"><!-- --></A><H3>
streamToBytes</H3>
<PRE>
public static byte[] <B>streamToBytes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A>&nbsp;is)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>As the name says...
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="loadBinary(java.io.File)"><!-- --></A><H3>
loadBinary</H3>
<PRE>
public static byte[] <B>loadBinary</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;binFile)
throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Binary file load
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The bytes which are the content of the fil
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="canDisplayType(int)"><!-- --></A><H3>
canDisplayType</H3>
<PRE>
public static boolean <B>canDisplayType</B>(int&nbsp;i)</PRE>
<DL>
<DD>This method is used to tell SqlFile whether this Sql Type must
ALWAYS be loaded to the binary buffer without displaying.
<P>
N.b.: If this returns "true" for a type, then the user can never
"see" values for these columns.
Therefore, if a type may-or-may-not-be displayable, better to return
false here and let the user choose.
In general, if there is a toString() operator for this Sql Type
then return false, since the JDBC driver should know how to make the
value displayable.
</P>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A href="http://java.sun.com/docs/books/tutorial/jdbc/basics/retrieving.html">http://java.sun.com/docs/books/tutorial/jdbc/basics/retrieving.html</A>
The table on this page lists the most common SqlTypes, all of which
must implement toString(),
<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Types.html?is-external=true" title="class or interface in java.sql"><CODE>Types</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="sqlTypeToString(int)"><!-- --></A><H3>
sqlTypeToString</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>sqlTypeToString</B>(int&nbsp;i)</PRE>
<DL>
<DD>Return a String representation of the specified java.sql.Types type.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="dsvSafe(java.lang.String)"><!-- --></A><H3>
dsvSafe</H3>
<PRE>
public void <B>dsvSafe</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)
throws org.hsqldb.cmdline.SqlToolError</PRE>
<DL>
<DD>Validate that String is safe to write TO DSV file.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>org.hsqldb.cmdline.SqlToolError</CODE> - if validation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="convertEscapes(java.lang.String)"><!-- --></A><H3>
convertEscapes</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>convertEscapes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;inString)</PRE>
<DL>
<DD>Translates user-supplied escapes into the traditionaly corresponding
corresponding binary characters.
Allowed sequences:
<UL>
<LI>\0\d+ (an octal digit)
<LI>\[0-9]\d* (a decimal digit)
<LI>\[Xx][0-9]{2} (a hex digit)
<LI>\n Newline (Ctrl-J)
<LI>\r Carriage return (Ctrl-M)
<LI>\t Horizontal tab (Ctrl-I)
<LI>\f Form feed (Ctrl-L)
</UL>
Java 1.4 String methods will make this into a 1 or 2 line task.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="importDsv(java.lang.String, java.lang.String)"><!-- --></A><H3>
importDsv</H3>
<PRE>
public void <B>importDsv</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;filePath,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;skipPrefix)
throws org.hsqldb.cmdline.SqlToolError</PRE>
<DL>
<DD>Name is self-explanatory.
If there is user demand, open file in random access mode so don't
need to load 2 copies of the entire file into memory.
This will be difficult because can't use standard Java language
features to search through a character array for multi-character
substrings.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>org.hsqldb.cmdline.SqlToolError</CODE> - Would prefer to throw an internal exception,
but we want this method to have external
visibility.</DL>
</DD>
</DL>
<HR>
<A NAME="hexCharOctetsToBytes(java.lang.String)"><!-- --></A><H3>
hexCharOctetsToBytes</H3>
<PRE>
public static byte[] <B>hexCharOctetsToBytes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;hexChars)</PRE>
<DL>
<DD>Convert a String to a byte array by interpreting every 2 characters as
an octal byte value.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="bitCharsToBytes(java.lang.String)"><!-- --></A><H3>
bitCharsToBytes</H3>
<PRE>
public static byte[] <B>bitCharsToBytes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;hexChars)</PRE>
<DL>
<DD>Just a stub for now.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getBanner(java.sql.Connection)"><!-- --></A><H3>
getBanner</H3>
<PRE>
public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getBanner</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</A>&nbsp;c)</PRE>
<DL>
<DD>Returns a String report for the specified JDBC Connection.
For databases with poor JDBC support, you won't get much detail.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SqlFile.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../org/hsqldb/cmdline/SqlTool.html" title="class in org.hsqldb.cmdline"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/hsqldb/cmdline/SqlFile.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SqlFile.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright © 2001 - 2009 HSQL Development Group.</i>
</BODY>
</HTML>