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.
|
close
int getColumnCount() throws SQLException
SQLException
String getColumnName(int columnIndex) throws SQLException
SQLException
int runUpdate() throws SQLException
SQLException
DatabaseResults runQuery(ObjectCache objectCache) throws SQLException
SQLException
int runExecute() throws SQLException
SQLException
void closeQuietly()
void cancel() throws SQLException
SQLException
void 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.SQLException
void setMaxRows(int max) throws SQLException
SQLException
void 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.
SQLException
String getStatement()
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.