Package com.mysql.cj
Interface Query
- All Known Subinterfaces:
JdbcPreparedStatement
,JdbcStatement
,PreparedQuery<T>
- All Known Implementing Classes:
AbstractPreparedQuery
,AbstractQuery
,CallableStatement
,ClientPreparedQuery
,ClientPreparedStatement
,ServerPreparedQuery
,ServerPreparedQueryTestcaseGenerator
,ServerPreparedStatement
,SimpleQuery
,StatementImpl
public interface Query
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Query.CancelStatus
-
Method Summary
Modifier and Type Method Description void
addBatch(java.lang.Object batch)
void
checkCancelTimeout()
void
clearBatchedArgs()
void
closeQuery()
java.util.List<java.lang.Object>
getBatchedArgs()
Get the batched args as added by the addBatch method(s).java.lang.Object
getCancelTimeoutMutex()
java.lang.String
getCurrentDatabase()
long
getExecuteTime()
Returns the elapsed time for the server to execute the query.int
getId()
Returns the query id used when profilingint
getResultFetchSize()
<T extends Resultset, M extends Message>
ProtocolEntityFactory<T,M>getResultSetFactory()
Resultset.Type
getResultType()
Session
getSession()
java.util.concurrent.atomic.AtomicBoolean
getStatementExecuting()
int
getTimeoutInMillis()
boolean
isClearWarningsCalled()
void
resetCancelledState()
void
setCancelStatus(Query.CancelStatus cs)
void
setClearWarningsCalled(boolean clearWarningsCalled)
void
setCurrentDatabase(java.lang.String currentDb)
void
setExecuteTime(long executeTime)
void
setResultFetchSize(int fetchSize)
void
setResultType(Resultset.Type resultSetType)
void
setTimeoutInMillis(int timeoutInMillis)
CancelQueryTask
startQueryTimer(Query stmtToCancel, int timeout)
void
statementBegins()
void
stopQueryTimer(CancelQueryTask timeoutTask, boolean rethrowCancelReason, boolean checkCancelTimeout)
-
Method Details
-
getId
int getId()Returns the query id used when profiling- Returns:
- id
-
setCancelStatus
-
checkCancelTimeout
void checkCancelTimeout() -
getResultSetFactory
-
getSession
Session getSession() -
getCancelTimeoutMutex
java.lang.Object getCancelTimeoutMutex() -
resetCancelledState
void resetCancelledState() -
closeQuery
void closeQuery() -
addBatch
void addBatch(java.lang.Object batch) -
getBatchedArgs
java.util.List<java.lang.Object> getBatchedArgs()Get the batched args as added by the addBatch method(s). The list is unmodifiable and might contain any combination of String, ClientPreparedQueryBindings, or ServerPreparedQueryBindings depending on how the parameters were batched.- Returns:
- an unmodifiable List of batched args
-
clearBatchedArgs
void clearBatchedArgs() -
getResultFetchSize
int getResultFetchSize() -
setResultFetchSize
void setResultFetchSize(int fetchSize) -
getResultType
Resultset.Type getResultType() -
setResultType
-
getTimeoutInMillis
int getTimeoutInMillis() -
setTimeoutInMillis
void setTimeoutInMillis(int timeoutInMillis) -
setExecuteTime
void setExecuteTime(long executeTime) -
getExecuteTime
long getExecuteTime()Returns the elapsed time for the server to execute the query.- Returns:
- the time it took for the server to execute the query.
-
startQueryTimer
-
getStatementExecuting
java.util.concurrent.atomic.AtomicBoolean getStatementExecuting() -
getCurrentDatabase
java.lang.String getCurrentDatabase() -
setCurrentDatabase
void setCurrentDatabase(java.lang.String currentDb) -
isClearWarningsCalled
boolean isClearWarningsCalled() -
setClearWarningsCalled
void setClearWarningsCalled(boolean clearWarningsCalled) -
statementBegins
void statementBegins() -
stopQueryTimer
void stopQueryTimer(CancelQueryTask timeoutTask, boolean rethrowCancelReason, boolean checkCancelTimeout)
-