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 classQuery.CancelStatus -
Method Summary
Modifier and Type Method Description voidaddBatch(java.lang.Object batch)voidcheckCancelTimeout()voidclearBatchedArgs()voidcloseQuery()java.util.List<java.lang.Object>getBatchedArgs()Get the batched args as added by the addBatch method(s).java.lang.ObjectgetCancelTimeoutMutex()java.lang.StringgetCurrentDatabase()longgetExecuteTime()Returns the elapsed time for the server to execute the query.intgetId()Returns the query id used when profilingintgetResultFetchSize()<T extends Resultset, M extends Message>
ProtocolEntityFactory<T,M>getResultSetFactory()Resultset.TypegetResultType()SessiongetSession()java.util.concurrent.atomic.AtomicBooleangetStatementExecuting()intgetTimeoutInMillis()booleanisClearWarningsCalled()voidresetCancelledState()voidsetCancelStatus(Query.CancelStatus cs)voidsetClearWarningsCalled(boolean clearWarningsCalled)voidsetCurrentDatabase(java.lang.String currentDb)voidsetExecuteTime(long executeTime)voidsetResultFetchSize(int fetchSize)voidsetResultType(Resultset.Type resultSetType)voidsetTimeoutInMillis(int timeoutInMillis)CancelQueryTaskstartQueryTimer(Query stmtToCancel, int timeout)voidstatementBegins()voidstopQueryTimer(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)
-