public interface ResultSetReturn
Contract for extracting ResultSets from Statements, executing Statements, managing Statement/ResultSet resources, and logging statement calls.
TODO: This could eventually utilize the new Return interface. It would be great to have a common API shared.
Generally the methods here dealing with CallableStatement are extremely limited, relying on the legacy
| Modifier and Type | Method and Description |
|---|---|
ResultSet |
execute(PreparedStatement statement)
Execute the PreparedStatement return its first ResultSet, if any.
|
ResultSet |
execute(Statement statement,
String sql)
Performs the given SQL statement, returning its first ResultSet, if any.
|
int |
executeUpdate(PreparedStatement statement)
Execute the PreparedStatement, returning its "affected row count".
|
int |
executeUpdate(Statement statement,
String sql)
Execute the given SQL statement returning its "affected row count".
|
ResultSet |
extract(CallableStatement callableStatement)
Extract the ResultSet from the CallableStatement.
|
ResultSet |
extract(PreparedStatement statement)
Extract the ResultSet from the PreparedStatement.
|
ResultSet |
extract(Statement statement,
String sql)
Performs the given SQL statement, expecting a ResultSet in return
|
ResultSet extract(PreparedStatement statement)
Extract the ResultSet from the PreparedStatement.
<p/>
If user passes CallableStatement reference, this method calls extract(CallableStatement)
internally. Otherwise, generally speaking, PreparedStatement.executeQuery() is called
statement - The PreparedStatement from which to extract the ResultSetResultSet extract(CallableStatement callableStatement)
Extract the ResultSet from the CallableStatement. Note that this is the limited legacy form which delegates to
Dialect.getResultSet(java.sql.CallableStatement). Better option is to integrate
ProcedureCall-like hooks
callableStatement - The CallableStatement from which to extract the ResultSetResultSet extract(Statement statement, String sql)
Performs the given SQL statement, expecting a ResultSet in return
statement - The JDBC Statement object to usesql - The SQL to executeResultSet execute(PreparedStatement statement)
Execute the PreparedStatement return its first ResultSet, if any. If there is no ResultSet, returns null
statement - The PreparedStatement to executenullResultSet execute(Statement statement, String sql)
Performs the given SQL statement, returning its first ResultSet, if any. If there is no ResultSet,
returns null
statement - The JDBC Statement object to usesql - The SQL to executenullint executeUpdate(PreparedStatement statement)
Execute the PreparedStatement, returning its "affected row count".
statement - The PreparedStatement to executePreparedStatement.executeUpdate() resultint executeUpdate(Statement statement, String sql)
Execute the given SQL statement returning its "affected row count".
statement - The JDBC Statement object to usesql - The SQL to executeStatement.executeUpdate(String) resultCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.