Package io.github.jdbcx.driver.impl
Class DefaultStatement
java.lang.Object
io.github.jdbcx.driver.impl.DefaultStatement
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
This class serves as a wrapper for a
Statement.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<io.github.jdbcx.driver.impl.DefaultResource>protected final AtomicBooleanprotected final AtomicBooleanprotected final AtomicBooleanprotected final ConnectionManagerprotected final AtomicIntegerprotected final AtomicIntegerprotected final io.github.jdbcx.driver.impl.DefaultResourceprotected final AtomicBooleanprotected final QueryResultprotected final AtomicIntegerprotected final intprotected final AtomicIntegerprotected final intprotected final intprotected final AtomicReference<SQLWarning>Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultStatement(DefaultConnection conn, int resultSetType, int resultSetConcurrency, int resultSetHoldability) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends io.github.jdbcx.driver.impl.DefaultResource>
Tadd(T resource) voidvoidcancel()voidvoidvoidclose()voidprotected voidbooleanbooleanbooleanbooleanint[]executeQuery(String sql) intexecuteUpdate(String sql) intexecuteUpdate(String sql, int autoGeneratedKeys) intexecuteUpdate(String sql, int[] columnIndexes) intexecuteUpdate(String sql, String[] columnNames) intintintintbooleanbooleangetMoreResults(int current) intintintintinthandleResults(String query) booleanisClosed()booleanbooleanbooleanisWrapperFor(Class<?> iface) protected voidremove(io.github.jdbcx.driver.impl.DefaultResource resource) protected voidreset()protected voidvoidsetCursorName(String name) voidsetEscapeProcessing(boolean enable) voidsetFetchDirection(int direction) voidsetFetchSize(int rows) voidsetMaxFieldSize(int max) voidsetMaxRows(int max) voidsetPoolable(boolean poolable) voidsetQueryTimeout(int seconds) <T> TMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
clearWarnings, close, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, getWarnings, isClosed, isSimpleIdentifier, setLargeMaxRowsMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
closeOnCompletion
-
escapeScanning
-
maxFieldSize
-
maxRows
-
poolable
-
queryTimeout
-
rsConcurrency
protected final int rsConcurrency -
rsHoldability
protected final int rsHoldability -
rsType
protected final int rsType -
rsFetchDirection
-
results
-
manager
-
queryResult
-
closed
-
warning
-
parent
protected final io.github.jdbcx.driver.impl.DefaultResource parent -
children
-
-
Constructor Details
-
DefaultStatement
protected DefaultStatement(DefaultConnection conn, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
-
-
Method Details
-
handleResults
- Throws:
SQLException
-
resetCurrentResults
protected void resetCurrentResults() -
reset
protected void reset() -
executeQuery
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
getMaxFieldSize
- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException
-
setMaxFieldSize
- Specified by:
setMaxFieldSizein interfaceStatement- Throws:
SQLException
-
getMaxRows
- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException
-
setMaxRows
- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException
-
setEscapeProcessing
- Specified by:
setEscapeProcessingin interfaceStatement- Throws:
SQLException
-
getQueryTimeout
- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException
-
setQueryTimeout
- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException
-
cancel
- Specified by:
cancelin interfaceStatement- Throws:
SQLException
-
setCursorName
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
getUpdateCount
- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
setFetchDirection
- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException
-
getFetchDirection
- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException
-
getFetchSize
- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException
-
getResultSetConcurrency
- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException
-
getResultSetType
- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-
ensureOpen
- Throws:
SQLException
-
add
protected <T extends io.github.jdbcx.driver.impl.DefaultResource> T add(T resource) -
remove
protected void remove(io.github.jdbcx.driver.impl.DefaultResource resource) -
getWarnings
- Throws:
SQLException
-
clearWarnings
- Throws:
SQLException
-
isClosed
- Throws:
SQLException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-