程序包 com.mysql.cj
类 AbstractQuery
- java.lang.Object
-
- com.mysql.cj.AbstractQuery
-
- 所有已实现的接口:
Query
- 直接已知子类:
ClientPreparedQuery,SimpleQuery
public abstract class AbstractQuery extends Object implements Query
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 com.mysql.cj.Query
Query.CancelStatus
-
-
字段概要
字段 修饰符和类型 字段 说明 protected List<Object>batchedArgsHolds batched commandsprotected ObjectcancelTimeoutMutexMutex to prevent race between returning query results and noticing that query has been timed-out or cancelled.protected StringcharEncodingThe character encoding to use (if available)protected booleanclearWarningsCalledHas clearWarnings() been called?protected StringcurrentDbThe database in useprotected intfetchSizeThe number of rows to fetch at a time (currently ignored)protected RuntimeProperty<Integer>maxAllowedPacketprotected QueryAttributesBindingsqueryAttributesBindingsQuery attributes bindingsprotected Resultset.TyperesultSetTypeThe type of this result set (scroll sensitive or in-sensitive)NativeSessionsessionprotected AtomicBooleanstatementExecutingCurrently executing a statement?protected intstatementIdUsed to identify this statement when profiling.protected inttimeoutInMillisThe timeout for a query
-
构造器概要
构造器 构造器 说明 AbstractQuery(NativeSession sess)
-
方法概要
-
-
-
字段详细资料
-
session
public NativeSession session
-
statementId
protected int statementId
Used to identify this statement when profiling.
-
maxAllowedPacket
protected RuntimeProperty<Integer> maxAllowedPacket
-
charEncoding
protected String charEncoding
The character encoding to use (if available)
-
cancelTimeoutMutex
protected Object cancelTimeoutMutex
Mutex to prevent race between returning query results and noticing that query has been timed-out or cancelled.
-
timeoutInMillis
protected int timeoutInMillis
The timeout for a query
-
resultSetType
protected Resultset.Type resultSetType
The type of this result set (scroll sensitive or in-sensitive)
-
fetchSize
protected int fetchSize
The number of rows to fetch at a time (currently ignored)
-
statementExecuting
protected final AtomicBoolean statementExecuting
Currently executing a statement?
-
currentDb
protected String currentDb
The database in use
-
clearWarningsCalled
protected boolean clearWarningsCalled
Has clearWarnings() been called?
-
queryAttributesBindings
protected QueryAttributesBindings queryAttributesBindings
Query attributes bindings
-
-
构造器详细资料
-
AbstractQuery
public AbstractQuery(NativeSession sess)
-
-
方法详细资料
-
getId
public int getId()
从接口复制的说明:QueryReturns the query id used when profiling
-
setCancelStatus
public void setCancelStatus(Query.CancelStatus cs)
- 指定者:
setCancelStatus在接口中Query
-
getExecuteTime
public long getExecuteTime()
从接口复制的说明:QueryReturns the elapsed time for the server to execute the query.- 指定者:
getExecuteTime在接口中Query- 返回:
- the time it took for the server to execute the query.
-
setExecuteTime
public void setExecuteTime(long executeTime)
- 指定者:
setExecuteTime在接口中Query
-
checkCancelTimeout
public void checkCancelTimeout()
- 指定者:
checkCancelTimeout在接口中Query
-
resetCancelledState
public void resetCancelledState()
- 指定者:
resetCancelledState在接口中Query
-
getResultSetFactory
public <T extends Resultset,M extends Message> ProtocolEntityFactory<T,M> getResultSetFactory()
- 指定者:
getResultSetFactory在接口中Query
-
getSession
public NativeSession getSession()
- 指定者:
getSession在接口中Query
-
getCancelTimeoutMutex
public Object getCancelTimeoutMutex()
- 指定者:
getCancelTimeoutMutex在接口中Query
-
closeQuery
public void closeQuery()
- 指定者:
closeQuery在接口中Query
-
getBatchedArgs
public List<Object> getBatchedArgs()
从接口复制的说明:QueryGet 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.- 指定者:
getBatchedArgs在接口中Query- 返回:
- an unmodifiable List of batched args
-
clearBatchedArgs
public void clearBatchedArgs()
- 指定者:
clearBatchedArgs在接口中Query
-
getQueryAttributesBindings
public QueryAttributesBindings getQueryAttributesBindings()
- 指定者:
getQueryAttributesBindings在接口中Query
-
getResultFetchSize
public int getResultFetchSize()
- 指定者:
getResultFetchSize在接口中Query
-
setResultFetchSize
public void setResultFetchSize(int fetchSize)
- 指定者:
setResultFetchSize在接口中Query
-
getResultType
public Resultset.Type getResultType()
- 指定者:
getResultType在接口中Query
-
setResultType
public void setResultType(Resultset.Type resultSetType)
- 指定者:
setResultType在接口中Query
-
getTimeoutInMillis
public int getTimeoutInMillis()
- 指定者:
getTimeoutInMillis在接口中Query
-
setTimeoutInMillis
public void setTimeoutInMillis(int timeoutInMillis)
- 指定者:
setTimeoutInMillis在接口中Query
-
startQueryTimer
public CancelQueryTask startQueryTimer(Query stmtToCancel, int timeout)
- 指定者:
startQueryTimer在接口中Query
-
stopQueryTimer
public void stopQueryTimer(CancelQueryTask timeoutTask, boolean rethrowCancelReason, boolean checkCancelTimeout)
- 指定者:
stopQueryTimer在接口中Query
-
getStatementExecuting
public AtomicBoolean getStatementExecuting()
- 指定者:
getStatementExecuting在接口中Query
-
getCurrentDatabase
public String getCurrentDatabase()
- 指定者:
getCurrentDatabase在接口中Query
-
setCurrentDatabase
public void setCurrentDatabase(String currentDb)
- 指定者:
setCurrentDatabase在接口中Query
-
isClearWarningsCalled
public boolean isClearWarningsCalled()
- 指定者:
isClearWarningsCalled在接口中Query
-
setClearWarningsCalled
public void setClearWarningsCalled(boolean clearWarningsCalled)
- 指定者:
setClearWarningsCalled在接口中Query
-
statementBegins
public void statementBegins()
- 指定者:
statementBegins在接口中Query
-
-