public class StatementImpl extends java.lang.Object implements JdbcStatement
Query.CancelStatus
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Row> |
batchedGeneratedKeys |
protected java.lang.String |
charEncoding
The character encoding to use (if available)
|
protected NativeMessageBuilder |
commandBuilder |
protected JdbcConnection |
connection
The connection that created us
|
protected boolean |
continueBatchOnError |
protected boolean |
doEscapeProcessing
Should we process escape codes?
|
protected boolean |
dontCheckOnDuplicateKeyUpdateInSQL |
protected RuntimeProperty<java.lang.Boolean> |
dontTrackOpenResources |
protected RuntimeProperty<java.lang.Boolean> |
dumpQueriesOnException |
protected ExceptionInterceptor |
exceptionInterceptor |
protected ResultSetInternalMethods |
generatedKeysResults |
protected boolean |
holdResultsOpenOverClose
Should this statement hold results open over .close() irregardless of
connection's setting?
|
protected boolean |
isClosed
Has this statement been closed?
|
protected long |
lastInsertId
The auto_increment value for the last insert
|
protected boolean |
lastQueryIsOnDupKeyUpdate
Whether or not the last query was of the form ON DUPLICATE KEY UPDATE
|
protected boolean |
logSlowQueries |
protected RuntimeProperty<java.lang.Integer> |
maxAllowedPacket |
protected int |
maxFieldSize
The max field size for this statement
|
int |
maxRows
The maximum number of rows to return for this statement (-1 means _all_
rows)
|
protected java.util.Set<ResultSetInternalMethods> |
openResults
Set of currently-open ResultSets
|
protected boolean |
pedantic
Are we in pedantic mode?
|
protected static java.lang.String |
PING_MARKER |
protected PingTarget |
pingTarget |
protected boolean |
profileSQL
Should we profile?
|
protected Query |
query |
protected ResultSetInternalMethods |
results
The current results
|
protected int |
resultSetConcurrency
The concurrency for this result set (updatable or not)
|
protected ResultSetFactory |
resultSetFactory |
protected boolean |
retrieveGeneratedKeys |
protected RuntimeProperty<java.lang.Boolean> |
rewriteBatchedStatements |
protected RuntimeProperty<java.lang.Boolean> |
sendFractionalSeconds |
protected NativeSession |
session |
protected long |
updateCount
The update count for this statement
|
static byte |
USES_VARIABLES_FALSE |
static byte |
USES_VARIABLES_TRUE |
static byte |
USES_VARIABLES_UNKNOWN |
protected boolean |
useUsageAdvisor
Should we use the usage advisor?
|
protected java.sql.SQLWarning |
warningChain
The warnings chain.
|
MAX_ROWS
Constructor and Description |
---|
StatementImpl(JdbcConnection c,
java.lang.String db)
Constructor for a Statement.
|
Modifier and Type | Method and Description |
---|---|
void |
addBatch(java.lang.Object batch) |
void |
addBatch(java.lang.String sql) |
void |
cancel() |
void |
checkCancelTimeout() |
protected JdbcConnection |
checkClosed()
Checks if closed() has been called, and throws an exception if so
|
protected void |
checkForDml(java.lang.String sql,
char firstStatementChar)
Checks if the given SQL query with the given first non-ws char is a DML
statement.
|
protected void |
checkNullOrEmptyQuery(java.lang.String sql)
Method checkNullOrEmptyQuery.
|
void |
clearBatch() |
void |
clearBatchedArgs() |
void |
clearWarnings() |
void |
close()
In many cases, it is desirable to immediately release a Statement's
database and JDBC resources instead of waiting for this to happen when it
is automatically closed.
|
protected void |
closeAllOpenResults()
Close any open result sets that have been 'held open'
|
void |
closeOnCompletion() |
void |
closeQuery() |
protected boolean |
containsOnDuplicateKeyInString(java.lang.String sql) |
protected boolean |
createStreamingResultSet()
We only stream result sets when they are forward-only, read-only, and the
fetch size has been set to Integer.MIN_VALUE
|
void |
disableStreamingResults()
Resets this statements fetch size and result set type to the values
they had before enableStreamingResults() was called.
|
protected void |
doPingInstead() |
void |
enableStreamingResults()
Workaround for containers that 'check' for sane values of
Statement.setFetchSize() so that applications can use
the Java variant of libmysql's mysql_use_result() behavior.
|
boolean |
execute(java.lang.String sql) |
boolean |
execute(java.lang.String sql,
int returnGeneratedKeys) |
boolean |
execute(java.lang.String sql,
int[] generatedKeyIndices) |
boolean |
execute(java.lang.String sql,
java.lang.String[] generatedKeyNames) |
int[] |
executeBatch() |
protected long[] |
executeBatchInternal() |
long[] |
executeLargeBatch() |
long |
executeLargeUpdate(java.lang.String sql) |
long |
executeLargeUpdate(java.lang.String sql,
int autoGeneratedKeys) |
long |
executeLargeUpdate(java.lang.String sql,
int[] columnIndexes) |
long |
executeLargeUpdate(java.lang.String sql,
java.lang.String[] columnNames) |
java.sql.ResultSet |
executeQuery(java.lang.String sql) |
void |
executeSimpleNonQuery(JdbcConnection c,
java.lang.String nonQuery) |
int |
executeUpdate(java.lang.String sql) |
int |
executeUpdate(java.lang.String sql,
int autoGeneratedKeys) |
int |
executeUpdate(java.lang.String sql,
int[] columnIndexes) |
int |
executeUpdate(java.lang.String sql,
java.lang.String[] columnNames) |
protected long |
executeUpdateInternal(java.lang.String sql,
boolean isBatch,
boolean returnGeneratedKeys) |
protected static int |
findStartOfStatement(java.lang.String sql) |
protected ResultSetInternalMethods |
generatePingResultSet() |
java.util.List<java.lang.Object> |
getBatchedArgs()
Get the batched args as added by the addBatch method(s).
|
protected void |
getBatchedGeneratedKeys(int maxKeys) |
protected void |
getBatchedGeneratedKeys(java.sql.Statement batchedStatement) |
java.lang.Object |
getCancelTimeoutMutex() |
java.sql.Connection |
getConnection() |
java.lang.String |
getCurrentDatabase() |
ExceptionInterceptor |
getExceptionInterceptor() |
long |
getExecuteTime()
Returns the elapsed time for the server to execute the query.
|
int |
getFetchDirection() |
int |
getFetchSize() |
java.sql.ResultSet |
getGeneratedKeys() |
protected ResultSetInternalMethods |
getGeneratedKeysInternal() |
protected ResultSetInternalMethods |
getGeneratedKeysInternal(long numKeys) |
int |
getId()
Returns the query id used when profiling
|
long |
getLargeMaxRows() |
long |
getLargeUpdateCount() |
long |
getLastInsertID()
getLastInsertID returns the value of the auto_incremented key after an
executeQuery() or excute() call.
|
java.io.InputStream |
getLocalInfileInputStream()
Returns the InputStream instance that will be used to send
data in response to a "LOAD DATA LOCAL INFILE" statement.
|
long |
getLongUpdateCount()
getLongUpdateCount returns the current result as an update count, if the
result is a ResultSet or there are no more results, -1 is returned.
|
int |
getMaxFieldSize() |
int |
getMaxRows() |
boolean |
getMoreResults() |
boolean |
getMoreResults(int current) |
int |
getOpenResultSetCount()
Returns the number of open result sets for this statement.
|
Query |
getQuery() |
int |
getQueryTimeout() |
int |
getResultFetchSize() |
java.sql.ResultSet |
getResultSet() |
int |
getResultSetConcurrency() |
<T extends Resultset,M extends Message> |
getResultSetFactory() |
int |
getResultSetHoldability() |
protected ResultSetInternalMethods |
getResultSetInternal() |
int |
getResultSetType() |
Resultset.Type |
getResultType() |
long |
getServerStatementId() |
Session |
getSession() |
java.util.concurrent.atomic.AtomicBoolean |
getStatementExecuting() |
int |
getTimeoutInMillis() |
int |
getUpdateCount() |
java.sql.SQLWarning |
getWarnings() |
protected java.sql.SQLException |
handleExceptionForBatch(int endOfBatchIndex,
int numValuesPerBatch,
long[] updateCounts,
java.sql.SQLException ex) |
protected boolean |
hasDeadlockOrTimeoutRolledBackTx(java.sql.SQLException ex) |
protected void |
implicitlyCloseAllOpenResults()
Close all result sets in this statement.
|
protected void |
initQuery() |
boolean |
isClearWarningsCalled() |
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isPoolable() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
protected int |
processMultiCountsAndKeys(StatementImpl batchedStatement,
int updateCountCounter,
long[] updateCounts) |
protected void |
realClose(boolean calledExplicitly,
boolean closeOpenResults)
Closes this statement, and frees resources.
|
void |
removeOpenResultSet(ResultSetInternalMethods rs)
Callback for result set instances to remove them from the Set that
tracks them per-statement
|
void |
resetCancelledState() |
void |
setCancelStatus(Query.CancelStatus cs) |
void |
setClearWarningsCalled(boolean clearWarningsCalled) |
void |
setCurrentDatabase(java.lang.String currentDb) |
void |
setCursorName(java.lang.String name) |
void |
setEscapeProcessing(boolean enable) |
void |
setExecuteTime(long executeTime) |
void |
setFetchDirection(int direction) |
void |
setFetchSize(int rows) |
void |
setHoldResultsOpenOverClose(boolean holdResultsOpenOverClose) |
void |
setLargeMaxRows(long max) |
void |
setLocalInfileInputStream(java.io.InputStream stream)
Sets an InputStream instance that will be used to send data
to the MySQL server for a "LOAD DATA LOCAL INFILE" statement
rather than a FileInputStream or URLInputStream that represents
the path given as an argument to the statement.
|
void |
setMaxFieldSize(int max) |
void |
setMaxRows(int max) |
void |
setPingTarget(PingTarget pingTarget) |
void |
setPoolable(boolean poolable) |
void |
setQueryTimeout(int seconds) |
void |
setResultFetchSize(int fetchSize) |
void |
setResultType(Resultset.Type resultSetType) |
void |
setTimeoutInMillis(int timeoutInMillis) |
protected void |
setupStreamingTimeout(JdbcConnection con)
Adjust net_write_timeout to a higher value if we're streaming result sets.
|
CancelQueryTask |
startQueryTimer(Query stmtToCancel,
int timeout) |
void |
statementBegins() |
void |
stopQueryTimer(CancelQueryTask timeoutTask,
boolean rethrowCancelReason,
boolean checkCancelTimeout) |
<T> T |
unwrap(java.lang.Class<T> iface) |
protected static final java.lang.String PING_MARKER
protected NativeMessageBuilder commandBuilder
public static final byte USES_VARIABLES_FALSE
public static final byte USES_VARIABLES_TRUE
public static final byte USES_VARIABLES_UNKNOWN
protected java.lang.String charEncoding
protected volatile JdbcConnection connection
protected boolean doEscapeProcessing
protected boolean isClosed
protected long lastInsertId
protected int maxFieldSize
public int maxRows
protected java.util.Set<ResultSetInternalMethods> openResults
protected boolean pedantic
protected boolean profileSQL
protected ResultSetInternalMethods results
protected ResultSetInternalMethods generatedKeysResults
protected int resultSetConcurrency
protected long updateCount
protected boolean useUsageAdvisor
protected java.sql.SQLWarning warningChain
protected boolean holdResultsOpenOverClose
protected java.util.ArrayList<Row> batchedGeneratedKeys
protected boolean retrieveGeneratedKeys
protected boolean continueBatchOnError
protected PingTarget pingTarget
protected ExceptionInterceptor exceptionInterceptor
protected boolean lastQueryIsOnDupKeyUpdate
protected RuntimeProperty<java.lang.Boolean> dontTrackOpenResources
protected RuntimeProperty<java.lang.Boolean> dumpQueriesOnException
protected boolean logSlowQueries
protected RuntimeProperty<java.lang.Boolean> rewriteBatchedStatements
protected RuntimeProperty<java.lang.Integer> maxAllowedPacket
protected boolean dontCheckOnDuplicateKeyUpdateInSQL
protected RuntimeProperty<java.lang.Boolean> sendFractionalSeconds
protected ResultSetFactory resultSetFactory
protected Query query
protected NativeSession session
public StatementImpl(JdbcConnection c, java.lang.String db) throws java.sql.SQLException
c
- the Connection instance that creates usdb
- the database name in use when we were createdjava.sql.SQLException
- if an error occurs.protected void initQuery()
public void addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
java.sql.SQLException
public java.util.List<java.lang.Object> getBatchedArgs()
Query
getBatchedArgs
in interface Query
public void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
protected JdbcConnection checkClosed()
StatementIsClosedException
- if this statement has been closedprotected void checkForDml(java.lang.String sql, char firstStatementChar) throws java.sql.SQLException
sql
- the SQL to checkfirstStatementChar
- the UC first non-ws char of the statementjava.sql.SQLException
- if the statement contains DMLprotected void checkNullOrEmptyQuery(java.lang.String sql) throws java.sql.SQLException
sql
- the SQL to checkjava.sql.SQLException
- if query is null or empty.public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
java.sql.SQLException
public void clearBatchedArgs()
clearBatchedArgs
in interface Query
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
public void close() throws java.sql.SQLException
Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed, its current ResultSet, if one exists, is also closed.
close
in interface java.lang.AutoCloseable
close
in interface java.sql.Statement
java.sql.SQLException
- if a database access error occursprotected void closeAllOpenResults() throws java.sql.SQLException
java.sql.SQLException
- if an error occursprotected void implicitlyCloseAllOpenResults() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occurspublic void removeOpenResultSet(ResultSetInternalMethods rs)
JdbcStatement
removeOpenResultSet
in interface JdbcStatement
rs
- result setpublic int getOpenResultSetCount()
JdbcStatement
getOpenResultSetCount
in interface JdbcStatement
protected boolean createStreamingResultSet()
public void enableStreamingResults() throws java.sql.SQLException
JdbcStatement
enableStreamingResults
in interface JdbcStatement
java.sql.SQLException
- if an error occurspublic void disableStreamingResults() throws java.sql.SQLException
JdbcStatement
disableStreamingResults
in interface JdbcStatement
java.sql.SQLException
- if an error occursprotected void setupStreamingTimeout(JdbcConnection con) throws java.sql.SQLException
con
- created this statementjava.sql.SQLException
- if a database error occurspublic CancelQueryTask startQueryTimer(Query stmtToCancel, int timeout)
startQueryTimer
in interface Query
public void stopQueryTimer(CancelQueryTask timeoutTask, boolean rethrowCancelReason, boolean checkCancelTimeout)
stopQueryTimer
in interface Query
public boolean execute(java.lang.String sql) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public void statementBegins()
statementBegins
in interface Query
public void resetCancelledState()
resetCancelledState
in interface Query
public boolean execute(java.lang.String sql, int returnGeneratedKeys) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql, int[] generatedKeyIndices) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql, java.lang.String[] generatedKeyNames) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public int[] executeBatch() throws java.sql.SQLException
executeBatch
in interface java.sql.Statement
java.sql.SQLException
protected long[] executeBatchInternal() throws java.sql.SQLException
java.sql.SQLException
protected final boolean hasDeadlockOrTimeoutRolledBackTx(java.sql.SQLException ex)
protected int processMultiCountsAndKeys(StatementImpl batchedStatement, int updateCountCounter, long[] updateCounts) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.SQLException handleExceptionForBatch(int endOfBatchIndex, int numValuesPerBatch, long[] updateCounts, java.sql.SQLException ex) throws java.sql.BatchUpdateException, java.sql.SQLException
java.sql.BatchUpdateException
java.sql.SQLException
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
java.sql.SQLException
protected void doPingInstead() throws java.sql.SQLException
java.sql.SQLException
protected ResultSetInternalMethods generatePingResultSet() throws java.sql.SQLException
java.sql.SQLException
public void executeSimpleNonQuery(JdbcConnection c, java.lang.String nonQuery) throws java.sql.SQLException
java.sql.SQLException
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
protected long executeUpdateInternal(java.lang.String sql, boolean isBatch, boolean returnGeneratedKeys) throws java.sql.SQLException
java.sql.SQLException
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
java.sql.SQLException
public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
getGeneratedKeys
in interface java.sql.Statement
java.sql.SQLException
protected ResultSetInternalMethods getGeneratedKeysInternal() throws java.sql.SQLException
java.sql.SQLException
protected ResultSetInternalMethods getGeneratedKeysInternal(long numKeys) throws java.sql.SQLException
java.sql.SQLException
public long getLastInsertID()
This gets around the un-threadsafe behavior of "select LAST_INSERT_ID()" which is tied to the Connection that created this Statement, and therefore could have had many INSERTS performed before one gets a chance to call "select LAST_INSERT_ID()".
public long getLongUpdateCount()
This method returns longs as MySQL server returns 64-bit values for update counts
public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults(int current) throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetHoldability() throws java.sql.SQLException
getResultSetHoldability
in interface java.sql.Statement
java.sql.SQLException
protected ResultSetInternalMethods getResultSetInternal()
public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface java.sql.Statement
java.sql.SQLException
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Statement
java.sql.SQLException
protected void realClose(boolean calledExplicitly, boolean closeOpenResults) throws java.sql.SQLException
calledExplicitly
- was this called from close()?closeOpenResults
- should open result sets be closed?java.sql.SQLException
- if an error occurspublic void setCursorName(java.lang.String name) throws java.sql.SQLException
setCursorName
in interface java.sql.Statement
java.sql.SQLException
public void setEscapeProcessing(boolean enable) throws java.sql.SQLException
setEscapeProcessing
in interface java.sql.Statement
java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
setFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public void setFetchSize(int rows) throws java.sql.SQLException
setFetchSize
in interface java.sql.Statement
java.sql.SQLException
public void setHoldResultsOpenOverClose(boolean holdResultsOpenOverClose)
setHoldResultsOpenOverClose
in interface JdbcStatement
public void setMaxFieldSize(int max) throws java.sql.SQLException
setMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public void setMaxRows(int max) throws java.sql.SQLException
setMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setQueryTimeout(int seconds) throws java.sql.SQLException
setQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
protected void getBatchedGeneratedKeys(java.sql.Statement batchedStatement) throws java.sql.SQLException
java.sql.SQLException
protected void getBatchedGeneratedKeys(int maxKeys) throws java.sql.SQLException
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Statement
java.sql.SQLException
public boolean isPoolable() throws java.sql.SQLException
isPoolable
in interface java.sql.Statement
java.sql.SQLException
public void setPoolable(boolean poolable) throws java.sql.SQLException
setPoolable
in interface java.sql.Statement
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
protected static int findStartOfStatement(java.lang.String sql)
public java.io.InputStream getLocalInfileInputStream()
JdbcStatement
getLocalInfileInputStream
in interface JdbcStatement
public void setLocalInfileInputStream(java.io.InputStream stream)
JdbcStatement
setLocalInfileInputStream
in interface JdbcStatement
stream
- input streampublic void setPingTarget(PingTarget pingTarget)
setPingTarget
in interface JdbcStatement
public ExceptionInterceptor getExceptionInterceptor()
getExceptionInterceptor
in interface JdbcStatement
protected boolean containsOnDuplicateKeyInString(java.lang.String sql)
public void closeOnCompletion() throws java.sql.SQLException
closeOnCompletion
in interface java.sql.Statement
java.sql.SQLException
public boolean isCloseOnCompletion() throws java.sql.SQLException
isCloseOnCompletion
in interface java.sql.Statement
java.sql.SQLException
public long[] executeLargeBatch() throws java.sql.SQLException
executeLargeBatch
in interface java.sql.Statement
java.sql.SQLException
public long executeLargeUpdate(java.lang.String sql) throws java.sql.SQLException
executeLargeUpdate
in interface java.sql.Statement
java.sql.SQLException
public long executeLargeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
executeLargeUpdate
in interface java.sql.Statement
java.sql.SQLException
public long executeLargeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
executeLargeUpdate
in interface java.sql.Statement
java.sql.SQLException
public long executeLargeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
executeLargeUpdate
in interface java.sql.Statement
java.sql.SQLException
public long getLargeMaxRows() throws java.sql.SQLException
getLargeMaxRows
in interface java.sql.Statement
java.sql.SQLException
public long getLargeUpdateCount() throws java.sql.SQLException
getLargeUpdateCount
in interface java.sql.Statement
java.sql.SQLException
public void setLargeMaxRows(long max) throws java.sql.SQLException
setLargeMaxRows
in interface java.sql.Statement
java.sql.SQLException
public java.lang.String getCurrentDatabase()
getCurrentDatabase
in interface Query
public long getServerStatementId()
public <T extends Resultset,M extends Message> ProtocolEntityFactory<T,M> getResultSetFactory()
getResultSetFactory
in interface Query
public int getId()
Query
public void setCancelStatus(Query.CancelStatus cs)
setCancelStatus
in interface Query
public void checkCancelTimeout()
checkCancelTimeout
in interface Query
public Session getSession()
getSession
in interface Query
public java.lang.Object getCancelTimeoutMutex()
getCancelTimeoutMutex
in interface Query
public void closeQuery()
closeQuery
in interface Query
public int getResultFetchSize()
getResultFetchSize
in interface Query
public void setResultFetchSize(int fetchSize)
setResultFetchSize
in interface Query
public Resultset.Type getResultType()
getResultType
in interface Query
public void setResultType(Resultset.Type resultSetType)
setResultType
in interface Query
public int getTimeoutInMillis()
getTimeoutInMillis
in interface Query
public void setTimeoutInMillis(int timeoutInMillis)
setTimeoutInMillis
in interface Query
public long getExecuteTime()
Query
getExecuteTime
in interface Query
public void setExecuteTime(long executeTime)
setExecuteTime
in interface Query
public java.util.concurrent.atomic.AtomicBoolean getStatementExecuting()
getStatementExecuting
in interface Query
public void setCurrentDatabase(java.lang.String currentDb)
setCurrentDatabase
in interface Query
public boolean isClearWarningsCalled()
isClearWarningsCalled
in interface Query
public void setClearWarningsCalled(boolean clearWarningsCalled)
setClearWarningsCalled
in interface Query
public Query getQuery()
getQuery
in interface JdbcStatement