|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectappli.sqlplayer.SqlBatchPlayer
Simple test class for SQL queries to Simbad using jdbc
| Field Summary | |
private java.sql.Connection |
con
|
private java.lang.String |
dbUrl
|
private java.lang.String |
driver
|
(package private) int |
iresult
|
private java.lang.String |
passwd
|
private static java.io.PrintStream |
prt
|
private java.sql.ResultSet |
result
|
private java.lang.String |
username
|
| Constructor Summary | |
SqlBatchPlayer(java.lang.String driver,
java.lang.String dburl,
java.lang.String username,
java.lang.String pwd)
SimbadSQL object constructor. |
|
| Method Summary | |
void |
close()
Close the database. |
void |
dbInfo()
Display metadata information about the database itself |
void |
dbTableInfo()
Display metadata information about a particular table |
private static java.util.ArrayList |
getCommandsFromFile(java.lang.String filename)
|
int |
getIntResult()
|
java.sql.ResultSet |
getResultSet()
|
boolean |
hasRows(java.sql.ResultSet result)
Checks if a result set contains at least one row |
static void |
main(java.lang.String[] args)
Main programme. |
boolean |
query(java.lang.String sqlCommand)
Executes a query on the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String driver
private java.lang.String dbUrl
private java.lang.String username
private java.lang.String passwd
private static java.io.PrintStream prt
private java.sql.Connection con
private java.sql.ResultSet result
int iresult
| Constructor Detail |
public SqlBatchPlayer(java.lang.String driver,
java.lang.String dburl,
java.lang.String username,
java.lang.String pwd)
| Method Detail |
public void close()
public void dbInfo()
public void dbTableInfo()
public boolean query(java.lang.String sqlCommand)
sqlCommand - SQL command to execute
public java.sql.ResultSet getResultSet()
public int getIntResult()
public boolean hasRows(java.sql.ResultSet result)
private static java.util.ArrayList getCommandsFromFile(java.lang.String filename)
public static void main(java.lang.String[] args)
| repository= | sql command repository file |
| command= | command from the repository to execute. Parameters in the right order can be given in parenthesis |
| list | display the command in the repository |
| sql= | complete sql command directly entered |
| file= | file containing commands to execute |
| format= | output format (tsv|tab|report) |
| output= | output filename |
| display= | yes|no. No output display can be usefull for only measuring performances of a query |
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||