public class GStatement extends Object implements Statement
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
_queriesBatch |
protected GConnection |
connection |
protected ResultSet |
resultSet |
protected int |
updateCount |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
GStatement(GConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(String sql) |
protected void |
buildResultSet(ResultEntry entry) |
void |
cancel() |
void |
clearBatch() |
void |
clearWarnings() |
void |
close()
This statement is not connected to the QueryProcessor, only the GConnection is.
|
void |
closeOnCompletion() |
boolean |
execute(String sql) |
boolean |
execute(String sql,
int autoGeneratedKeys) |
boolean |
execute(String sql,
int[] columnIndexes) |
boolean |
execute(String sql,
String[] columnNames) |
int[] |
executeBatch() |
ResultSet |
executeQuery(String sql) |
int |
executeUpdate(String sql)
Execute non-select queries
|
int |
executeUpdate(String sql,
int autoGeneratedKeys) |
int |
executeUpdate(String sql,
int[] columnIndexes) |
int |
executeUpdate(String sql,
String[] columnNames) |
Connection |
getConnection() |
int |
getFetchDirection()
Only ResultSet.FETCH_FORWARD is supported
|
int |
getFetchSize()
this is just a hint method, so pay no attention to the returned value
|
ResultSet |
getGeneratedKeys() |
int |
getMaxFieldSize()
Max field size.
|
int |
getMaxRows()
Returns the max rows allowed
|
boolean |
getMoreResults() |
boolean |
getMoreResults(int current) |
int |
getQueryTimeout()
No limit here.
|
ResultSet |
getResultSet() |
int |
getResultSetConcurrency()
This statement will always return a read only ResultSet
|
int |
getResultSetHoldability() |
int |
getResultSetType() |
int |
getUpdateCount() |
SQLWarning |
getWarnings()
No warnings are kept in this implementation which means it will always return null.
|
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isPoolable() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setCursorName(String name) |
void |
setEscapeProcessing(boolean enable) |
void |
setFetchDirection(int direction) |
void |
setFetchSize(int rows) |
void |
setMaxFieldSize(int max)
Currently there shouldn't be any size limit.
|
void |
setMaxRows(int max)
Currently there shouldn't be any limit.
|
void |
setPoolable(boolean poolable) |
void |
setQueryTimeout(int seconds)
Timeout is ignored.
|
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, setLargeMaxRowsprotected final GConnection connection
protected int updateCount
protected ResultSet resultSet
public GStatement(GConnection connection)
public int getFetchDirection()
throws SQLException
getFetchDirection in interface StatementSQLExceptionStatement.getFetchDirection()public int getFetchSize()
throws SQLException
getFetchSize in interface StatementSQLExceptionStatement.getFetchSize()public int getMaxFieldSize()
throws SQLException
getMaxFieldSize in interface StatementSQLExceptionStatement.getMaxFieldSize()public int getMaxRows()
throws SQLException
getMaxRows in interface StatementSQLExceptionStatement.getMaxRows()public int getQueryTimeout()
throws SQLException
getQueryTimeout in interface StatementSQLExceptionStatement.getQueryTimeout()public int getResultSetConcurrency()
throws SQLException
getResultSetConcurrency in interface StatementSQLExceptionStatement.getResultSetConcurrency()public int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementSQLExceptionpublic int getResultSetType()
throws SQLException
getResultSetType in interface StatementSQLExceptionpublic int getUpdateCount()
throws SQLException
getUpdateCount in interface StatementSQLExceptionpublic void cancel()
throws SQLException
cancel in interface StatementSQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface StatementSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface StatementSQLExceptionStatement.close()public boolean getMoreResults()
throws SQLException
getMoreResults in interface StatementSQLExceptionpublic int[] executeBatch()
throws SQLException
executeBatch in interface StatementSQLExceptionpublic void setFetchDirection(int direction)
throws SQLException
setFetchDirection in interface StatementSQLExceptionpublic void setFetchSize(int rows)
throws SQLException
setFetchSize in interface StatementSQLExceptionpublic void setMaxFieldSize(int max)
throws SQLException
setMaxFieldSize in interface StatementSQLExceptionStatement.setMaxFieldSize(int)public void setMaxRows(int max)
throws SQLException
setMaxRows in interface StatementSQLExceptionStatement.setMaxRows(int)public void setQueryTimeout(int seconds)
throws SQLException
setQueryTimeout in interface StatementSQLExceptionStatement.setQueryTimeout(int)public boolean getMoreResults(int current)
throws SQLException
getMoreResults in interface StatementSQLExceptionpublic void setEscapeProcessing(boolean enable)
throws SQLException
setEscapeProcessing in interface StatementSQLExceptionpublic int executeUpdate(String sql) throws SQLException
executeUpdate in interface StatementSQLExceptionStatement.executeUpdate(java.lang.String)public void addBatch(String sql) throws SQLException
addBatch in interface StatementSQLExceptionpublic void setCursorName(String name) throws SQLException
setCursorName in interface StatementSQLExceptionpublic boolean execute(String sql) throws SQLException
execute in interface StatementSQLExceptionpublic int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic boolean execute(String sql, int autoGeneratedKeys) throws SQLException
execute in interface StatementSQLExceptionpublic int executeUpdate(String sql, int[] columnIndexes) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic boolean execute(String sql, int[] columnIndexes) throws SQLException
execute in interface StatementSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface StatementSQLExceptionpublic ResultSet getGeneratedKeys() throws SQLException
getGeneratedKeys in interface StatementSQLExceptionpublic ResultSet getResultSet() throws SQLException
getResultSet in interface StatementSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface StatementSQLExceptionStatement.getWarnings()public int executeUpdate(String sql, String[] columnNames) throws SQLException
executeUpdate in interface StatementSQLExceptionpublic boolean execute(String sql, String[] columnNames) throws SQLException
execute in interface StatementSQLExceptionpublic ResultSet executeQuery(String sql) throws SQLException
executeQuery in interface StatementSQLExceptionprotected void buildResultSet(ResultEntry entry)
public boolean isClosed()
throws SQLException
isClosed in interface StatementSQLExceptionpublic boolean isPoolable()
throws SQLException
isPoolable in interface StatementSQLExceptionpublic void setPoolable(boolean poolable)
throws SQLException
setPoolable in interface StatementSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic void closeOnCompletion()
throws SQLException
closeOnCompletion in interface StatementSQLExceptionpublic boolean isCloseOnCompletion()
throws SQLException
isCloseOnCompletion in interface StatementSQLExceptionCopyright © GigaSpaces.