public class ConsoleHsqlTest extends Object
Modifier and Type | Field and Description |
---|---|
(package private) Connection |
conn |
Constructor and Description |
---|
ConsoleHsqlTest(String db_file_name_prefix) |
Modifier and Type | Method and Description |
---|---|
int |
countRows(String tableName)
counts the rows of a given table
|
int[] |
countsRowsAndCols(String tableName)
counts rows and columns of a give database table
|
static void |
dump(ResultSet rs)
using cursors
|
static void |
main(String[] args)
Console test application
|
void |
query(String expression)
select statement
|
String[][] |
queryTo2dArray(ArrayList array,
String[][] table) |
ArrayList |
queryToArray(String tableName)
saves a query in an ArrayList
|
void |
shutdown()
safe shutdown of HSQL database
|
void |
update(String expression)
SQL commands CREATE, DROP, INSERT and UPDATE
|
Connection conn
public ConsoleHsqlTest(String db_file_name_prefix) throws Exception
Exception
public void shutdown() throws SQLException
SQLException
public void query(String expression) throws SQLException
expression
- SQLException
public void update(String expression) throws SQLException
expression
- SQLException
public static void dump(ResultSet rs) throws SQLException
rs
- SQLException
public ArrayList queryToArray(String tableName) throws SQLException
expression
- sql expressionSQLException
public int[] countsRowsAndCols(String tableName) throws SQLException
tableName
- table nameSQLException
public int countRows(String tableName) throws SQLException
tableName
- SQLException
public String[][] queryTo2dArray(ArrayList array, String[][] table)
public static void main(String[] args) throws SQLException
args
- SQLException