Java Reference
In-Depth Information
private
private ResultsDecorator jtableDecorator ;
private
private boolean
boolean debug ;
private
private boolean
boolean escape ;
/** DB2 is the only one I know of today that requires table names
* be given in uppercase when getting table metadata
*/
private
private boolean
boolean upperCaseTableNames ;
private
private SQLRunnerGUI gui ;
private
private static
static Verbosity verbosity = Verbosity . QUIET ;
/** Construct a SQLRunner object
* @param driver String for the JDBC driver
* @param dbUrl String for the JDBC URL
* @param user String for the username
* @param password String for the password, normally in cleartext
* @param outputMode One of the MODE_XXX constants.
* @throws ClassNotFoundException
* @throws SQLException
*/
public
public SQLRunner ( String driver , String dbUrl , String user , String password ,
String outputFile , String outputMode )
throws
throws IOException , ClassNotFoundException , SQLException {
conn = ConnectionUtil . getConnection ( driver , dbUrl , user , password );
commonSetup ( outputFile , outputMode );
}
public
public SQLRunner ( Connection c , String outputFile , String outputModeName )
throws
throws IOException , SQLException {
// set up the SQL input
conn = c ;
commonSetup ( outputFile , outputModeName );
}
private
private void
void commonSetup ( String outputFileName , String outputModeName )
throws
throws IOException , SQLException {
dbMeta = conn . getMetaData ();
upperCaseTableNames =
dbMeta . getDatabaseProductName (). indexOf ( "DB2" ) >= 0 ;
String dbName = dbMeta . getDatabaseProductName ();
Search WWH ::




Custom Search