public class SDBConnection extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
logSQLExceptions |
static boolean |
logSQLQueries |
static boolean |
logSQLStatements |
Constructor and Description |
---|
SDBConnection(Connection jdbcConnection) |
SDBConnection(Connection jdbcConnection,
String url) |
SDBConnection(DataSource ds) |
SDBConnection(String url,
String user,
String password) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closePreparedStatement(PreparedStatement ps)
Close a prepared statement
|
ResultSetJDBC |
exec(String sqlString)
Execute a statement, return the result set if there was one, else null
|
ResultSetJDBC |
execQuery(String sqlString) |
ResultSetJDBC |
execQuery(String sqlString,
int fetchSize) |
ResultSetJDBC |
execSilent(String sqlString)
Execute a statement, return the result set if there was one, else null.
|
int |
execUpdate(String sqlString) |
Object |
executeInTransaction(Command c) |
Object |
executeSQL(SQLCommand c) |
String |
getJdbcURL() |
String |
getLabel() |
Connection |
getSqlConnection() |
List<String> |
getTableNames()
Get the names of the application tables
|
TransactionHandler |
getTransactionHandler() |
boolean |
hasSQLConnection() |
boolean |
loggingSQLExceptions() |
boolean |
loggingSQLQueries() |
boolean |
loggingSQLStatements() |
static SDBConnection |
none() |
PreparedStatement |
prepareStatement(String sqlString)
Prepare a statement
|
void |
setJdbcURL(String jdbcURL) |
void |
setLabel(String label) |
void |
setLogSQLExceptions(boolean thisLogSQLExceptions) |
void |
setLogSQLQueries(boolean thisLogSQLQueries) |
void |
setLogSQLStatements(boolean thisLogSQLStatements) |
String |
toString() |
public static boolean logSQLExceptions
public static boolean logSQLStatements
public static boolean logSQLQueries
public SDBConnection(DataSource ds) throws SQLException
SQLException
public SDBConnection(Connection jdbcConnection)
public SDBConnection(Connection jdbcConnection, String url)
public static SDBConnection none()
public boolean hasSQLConnection()
public TransactionHandler getTransactionHandler()
public ResultSetJDBC execQuery(String sqlString) throws SQLException
SQLException
public ResultSetJDBC execQuery(String sqlString, int fetchSize) throws SQLException
SQLException
public Object executeSQL(SQLCommand c)
public int execUpdate(String sqlString) throws SQLException
SQLException
public ResultSetJDBC exec(String sqlString) throws SQLException
SQLException
public ResultSetJDBC execSilent(String sqlString)
public PreparedStatement prepareStatement(String sqlString) throws SQLException
SQLException
public void closePreparedStatement(PreparedStatement ps) throws SQLException
SQLException
public Connection getSqlConnection()
public void close()
public boolean loggingSQLExceptions()
public void setLogSQLExceptions(boolean thisLogSQLExceptions)
public boolean loggingSQLQueries()
public void setLogSQLQueries(boolean thisLogSQLQueries)
public boolean loggingSQLStatements()
public void setLogSQLStatements(boolean thisLogSQLStatements)
public String getLabel()
public void setLabel(String label)
public String getJdbcURL()
public void setJdbcURL(String jdbcURL)
Licenced under the Apache License, Version 2.0