Constructor and Description |
---|
SqlFile(boolean inInteractive,
HashMap inVars)
Constructor for reading stdin instead of a file for commands.
|
SqlFile(File inFile,
boolean inInteractive,
HashMap<?,?> inVars)
Interpret lines of input file as SQL Statements, Comments,
Special Commands, and Buffer Commands.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
canDisplayType(int i)
This method is used to tell SqlFile whether this Sql Type must
ALWAYS be loaded to the binary buffer without displaying.
|
static String |
convertEscapes(String inString) |
void |
csvSafe(String s)
Validate that String is safe to display in a CSV file.
|
void |
execute(Connection conn,
boolean coeOverride)
Process all the commands on stdin.
|
void |
execute(Connection conn,
Boolean coeOverride)
Process all the commands on stdin.
|
void |
execute(Connection conn,
PrintStream stdIn,
PrintStream errIn,
Boolean coeOverride)
Process all the commands in the file (or stdin) associated with
"this" object.
|
static String[] |
getTokenArray(String inString) |
void |
importCsv(String filePath)
Name is self-explanatory.
|
static String |
sqlTypeToString(int i) |
public SqlFile(File inFile, boolean inInteractive, HashMap<?,?> inVars) throws IOException
inFile
- inFile of null means to read stdin.inInteractive
- If true, prompts are printed, the interactive
Special commands are enabled, and
continueOnError defaults to true.IOException
public SqlFile(boolean inInteractive, HashMap inVars) throws IOException
IOException
public void execute(Connection conn, Boolean coeOverride) throws IOException, org.hsqldb.cmdline.SqlToolError, SQLException
conn
- The JDBC connection to use for SQL Commands.IOException
org.hsqldb.cmdline.SqlToolError
SQLException
public void execute(Connection conn, boolean coeOverride) throws IOException, SQLException, org.hsqldb.cmdline.SqlToolError
conn
- The JDBC connection to use for SQL Commands.org.hsqldb.cmdline.SqlToolError
IOException
SQLException
public void execute(Connection conn, PrintStream stdIn, PrintStream errIn, Boolean coeOverride) throws IOException, org.hsqldb.cmdline.SqlToolError, SQLException
conn
- The JDBC connection to use for SQL Commands.IOException
org.hsqldb.cmdline.SqlToolError
SQLException
public static String[] getTokenArray(String inString)
public static boolean canDisplayType(int i)
Types
public static String sqlTypeToString(int i)
public void csvSafe(String s) throws SQLException
SQLException
- (should throw something else, since this is
not an SQL problem. Fix the caller!)public static String convertEscapes(String inString)
public void importCsv(String filePath) throws IOException, es.ucm.fdi.gaia.jcolibri.test.database.SqlFile.BadSpecial
IOException
es.ucm.fdi.gaia.jcolibri.test.database.SqlFile.BadSpecial
Copyright © 2018 Group of Artificial Intelligence Applications (GAIA). All rights reserved.