Package com.j_spaces.jdbc.driver
Class GStatement
java.lang.Object
com.j_spaces.jdbc.driver.GStatement
- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper
- Direct Known Subclasses:
GPreparedStatement
The Statement implementation using a GConnection and a GResultSet
- Author:
- Michael Mitrani, 2Train4
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final GConnectionstatic final Stringprotected booleanprotected ResponsePacketprotected ResultSetprotected intFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidbuildResultSet(ResponsePacket response) voidcancel()voidvoidvoidclose()This statement is not connected to the QueryProcessor, only the GConnection is.voidbooleanbooleanbooleanbooleanint[]protected booleanexecuteQuery(String sql) intexecuteUpdate(String sql) Execute non-select queriesintexecuteUpdate(String sql, int autoGeneratedKeys) intexecuteUpdate(String sql, int[] columnIndexes) intexecuteUpdate(String sql, String[] columnNames) intOnly ResultSet.FETCH_FORWARD is supportedintthis is just a hint method, so pay no attention to the returned valueintMax field size.intReturns the max rows allowedbooleanbooleangetMoreResults(int current) intNo limit here.intThis statement will always return a read only ResultSetintintintNo warnings are kept in this implementation which means it will always return null.booleanisClosed()booleanbooleanbooleanisWrapperFor(Class<?> iface) voidsetCursorName(String name) voidsetEscapeProcessing(boolean enable) voidsetFetchDirection(int direction) voidsetFetchSize(int rows) voidsetMaxFieldSize(int max) Currently there shouldn't be any size limit.voidsetMaxRows(int max) Currently there shouldn't be any limit.voidsetPoolable(boolean poolable) voidsetQueryTimeout(int seconds) Timeout is ignored.<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
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
-
Field Details
-
connection
-
updateCount
protected int updateCount -
resultSet
-
_queriesBatch
-
ignoreUnsupportedOptions
protected boolean ignoreUnsupportedOptions -
packet
-
IGNORE_UNSUPPORTED_OPTIONS_PROP
- See Also:
-
-
Constructor Details
-
GStatement
-
-
Method Details
-
getFetchDirection
Only ResultSet.FETCH_FORWARD is supported- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException- See Also:
-
getFetchSize
this is just a hint method, so pay no attention to the returned value- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException- See Also:
-
getMaxFieldSize
Max field size. No limit in this case.- Specified by:
getMaxFieldSizein interfaceStatement- Throws:
SQLException- See Also:
-
getMaxRows
Returns the max rows allowed- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException- See Also:
-
getQueryTimeout
No limit here.- Specified by:
getQueryTimeoutin interfaceStatement- Throws:
SQLException- See Also:
-
getResultSetConcurrency
This statement will always return a read only ResultSet- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException- See Also:
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
getResultSetType
- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
getUpdateCount
- Specified by:
getUpdateCountin interfaceStatement- Throws:
SQLException
-
cancel
- Specified by:
cancelin interfaceStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Throws:
SQLException
-
clearWarnings
- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException
-
close
This statement is not connected to the QueryProcessor, only the GConnection is. so this call is silently ignored- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException- See Also:
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Throws:
SQLException
-
setFetchDirection
- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException
-
setMaxFieldSize
Currently there shouldn't be any size limit.- Specified by:
setMaxFieldSizein interfaceStatement- Throws:
SQLException- See Also:
-
setMaxRows
Currently there shouldn't be any limit.- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException- See Also:
-
setQueryTimeout
Timeout is ignored.- Specified by:
setQueryTimeoutin interfaceStatement- Throws:
SQLException- See Also:
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Throws:
SQLException
-
setEscapeProcessing
- Specified by:
setEscapeProcessingin interfaceStatement- Throws:
SQLException
-
executeUpdate
Execute non-select queries- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException- See Also:
-
addBatch
- Specified by:
addBatchin interfaceStatement- Throws:
SQLException
-
setCursorName
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
executePacket
protected boolean executePacket() -
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSetin interfaceStatement- Throws:
SQLException
-
getWarnings
No warnings are kept in this implementation which means it will always return null.- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException- See Also:
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfaceStatement- Throws:
SQLException
-
buildResultSet
-
isClosed
- Specified by:
isClosedin interfaceStatement- Throws:
SQLException
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-