public interface CompiledStatement extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel a currently running query associated with this statement.
|
void |
closeQuietly()
Close the statement but swallows any SQLExceptions.
|
int |
getColumnCount()
Returns the number of columns in this statement.
|
String |
getColumnName(int columnIndex)
Get the designated column's name.
|
String |
getStatement()
Return the underlying SQL statement.
|
int |
runExecute()
Run the prepared execute statement returning the number of rows affected.
|
DatabaseResults |
runQuery(ObjectCache objectCache)
Run the prepared query statement returning the results.
|
int |
runUpdate()
Run the prepared update statement returning the number of rows affected.
|
void |
setMaxRows(int max)
Set the number of rows to return in the results.
|
void |
setObject(int parameterIndex,
Object obj,
SqlType sqlType)
Set the parameter specified by the index and type to be an object.
|
void |
setQueryTimeout(long millis)
Set the query timeout in milliseconds.
|
closeint getColumnCount()
throws SQLException
SQLExceptionString getColumnName(int columnIndex) throws SQLException
SQLExceptionint runUpdate()
throws SQLException
SQLExceptionDatabaseResults runQuery(ObjectCache objectCache) throws SQLException
SQLExceptionint runExecute()
throws SQLException
SQLExceptionvoid closeQuietly()
void cancel()
throws SQLException
SQLExceptionvoid setObject(int parameterIndex,
Object obj,
SqlType sqlType)
throws SQLException
parameterIndex - Index of the parameter with 0 being the first parameter, etc..obj - Object that we are setting. Can be null.sqlType - SQL type of the parameter.SQLExceptionvoid setMaxRows(int max)
throws SQLException
SQLExceptionvoid setQueryTimeout(long millis)
throws SQLException
WARNING: This will stop the query connection but it will _not_ terminate the query if it is already be running by the database.
SQLExceptionString getStatement()
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.