Interface SRConnection
- All Superinterfaces:
- AutoCloseable,- Connection,- Wrapper
- 
Field SummaryFields inherited from interface java.sql.ConnectionTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
- 
Method SummaryModifier and TypeMethodDescriptionlongfetchGeneratedKey(PreparedStatement stmt, String table, String column) The counterpart to prepareStatmentForGeneratedKeys, returns the generated key in a way that's safe for all drivers.Selects the current timestamp from the database and returns it as a java date.Prepares statement for returning generated keys in a way that's safe for all database drivers.runLimitQuery(String query, int limit) Executes the given SELECT query, applying a limit as defined by the translator.longrunPrepInsertGetKey(String query, String tableName, String keyCol, Object... args) Runs the given insert query, returning the generated key.runPrepLimitQuery(String query, int limit, Object... args) Executes the given SELECT query, applying a limit as defined by the translator.runPrepQuery(String query, Object... args) Executes a SELECT query using a prepared statements, assigning the arguments in order.intrunPrepUpdate(String query, Object... args) Executes a non-SELECT query using a prepared statement, assigning the arguments in order.Executes the given SELECT query, returning a Dataset of results.runScalarPrepQuery(String query, Object... args) Executes the query and returns the first return value.runScalarQuery(String query) Executes the query and returns the first return value.intrunUpdateQuery(String query) Executes a non-SELECT query.Methods inherited from interface java.sql.Connectionabort, beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMapMethods inherited from interface java.sql.WrapperisWrapperFor, unwrap
- 
Method Details- 
getParentDatasourceDatasource getParentDatasource()- Returns:
- the Datasource that created this connection. Note that this might not be the Datasource on which getConnection() was called in the case of a failover scenario.
 
- 
runQueryExecutes the given SELECT query, returning a Dataset of results.- Returns:
- the results of the query in Dataset form
- Throws:
- SQLException
 
- 
runLimitQueryExecutes the given SELECT query, applying a limit as defined by the translator.- Throws:
- SQLException
 
- 
runPrepLimitQueryExecutes the given SELECT query, applying a limit as defined by the translator.- Throws:
- SQLException
 
- 
runPrepQueryExecutes a SELECT query using a prepared statements, assigning the arguments in order.- Returns:
- the results of the query in Dataset form
- Throws:
- SQLException
 
- 
runUpdateQueryExecutes a non-SELECT query.- Returns:
- the number of rows modified
- Throws:
- SQLException
 
- 
runPrepUpdateExecutes a non-SELECT query using a prepared statement, assigning the arguments in order.- Returns:
- the number of rows modified
- Throws:
- SQLException
 
- 
runScalarQueryExecutes the query and returns the first return value.- Throws:
- SQLException
 
- 
runScalarPrepQueryExecutes the query and returns the first return value.- Throws:
- SQLException
 
- 
runPrepInsertGetKeylong runPrepInsertGetKey(String query, String tableName, String keyCol, Object... args) throws SQLException Runs the given insert query, returning the generated key. Requires the table name and index column because some database require them in order to get the key.- Throws:
- SQLException
 
- 
getCurrentDatabaseTimeSelects the current timestamp from the database and returns it as a java date.- Throws:
- SQLException
 
- 
prepareStatmentForGeneratedKeysPrepares statement for returning generated keys in a way that's safe for all database drivers.- Throws:
- SQLException
 
- 
fetchGeneratedKeyThe counterpart to prepareStatmentForGeneratedKeys, returns the generated key in a way that's safe for all drivers.- Throws:
- SQLException
 
 
-