程序包 com.mysql.cj
类 AbstractPreparedQuery<T extends QueryBindings<?>>
- java.lang.Object
-
- com.mysql.cj.AbstractQuery
-
- com.mysql.cj.AbstractPreparedQuery<T>
-
- 所有已实现的接口:
PreparedQuery<T>,Query
- 直接已知子类:
ClientPreparedQuery,ServerPreparedQuery
public abstract class AbstractPreparedQuery<T extends QueryBindings<?>> extends AbstractQuery implements PreparedQuery<T>
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 com.mysql.cj.Query
Query.CancelStatus
-
-
字段概要
字段 修饰符和类型 字段 说明 protected RuntimeProperty<Boolean>autoClosePStmtStreamsprotected intbatchCommandIndexCommand index of currently executing batch command.protected StringoriginalSqlThe SQL that was passed in to 'prepare'protected intparameterCountThe number of parameters in this PreparedStatementprotected ParseInfoparseInfoprotected TqueryBindingsprotected RuntimeProperty<Boolean>useStreamLengthsInPrepStmts-
从类继承的字段 com.mysql.cj.AbstractQuery
batchedArgs, cancelTimeoutMutex, charEncoding, clearWarningsCalled, currentDb, fetchSize, maxAllowedPacket, resultSetType, session, statementExecuting, statementId, timeoutInMillis
-
-
构造器概要
构造器 构造器 说明 AbstractPreparedQuery(NativeSession sess)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 StringasSql()StringasSql(boolean quoteStreamsAndUnknowns)voidcheckNullOrEmptyQuery(String sql)Method checkNullOrEmptyQuery.voidcloseQuery()intcomputeBatchSize(int numBatchedArgs)Computes the optimum number of batched parameter lists to send without overflowing max_allowed_packet.protected abstract long[]computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)<M extends Message>
MfillSendPacket()Creates the packet that contains the query to be sent to the server.<M extends Message>
MfillSendPacket(QueryBindings<?> bindings)Creates the packet that contains the query to be sent to the server.intgetBatchCommandIndex()StringgetOriginalSql()intgetParameterCount()ParseInfogetParseInfo()TgetQueryBindings()voidsetBatchCommandIndex(int batchCommandIndex)voidsetOriginalSql(String originalSql)voidsetParameterCount(int parameterCount)voidsetParseInfo(ParseInfo parseInfo)voidsetQueryBindings(T queryBindings)-
从类继承的方法 com.mysql.cj.AbstractQuery
addBatch, checkCancelTimeout, clearBatchedArgs, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getId, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, statementBegins, stopQueryTimer
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.Query
addBatch, checkCancelTimeout, clearBatchedArgs, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getId, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, statementBegins, stopQueryTimer
-
-
-
-
字段详细资料
-
parseInfo
protected ParseInfo parseInfo
-
queryBindings
protected T extends QueryBindings<?> queryBindings
-
originalSql
protected String originalSql
The SQL that was passed in to 'prepare'
-
parameterCount
protected int parameterCount
The number of parameters in this PreparedStatement
-
autoClosePStmtStreams
protected RuntimeProperty<Boolean> autoClosePStmtStreams
-
batchCommandIndex
protected int batchCommandIndex
Command index of currently executing batch command.
-
useStreamLengthsInPrepStmts
protected RuntimeProperty<Boolean> useStreamLengthsInPrepStmts
-
-
构造器详细资料
-
AbstractPreparedQuery
public AbstractPreparedQuery(NativeSession sess)
-
-
方法详细资料
-
closeQuery
public void closeQuery()
- 指定者:
closeQuery在接口中Query- 覆盖:
closeQuery在类中AbstractQuery
-
getParseInfo
public ParseInfo getParseInfo()
- 指定者:
getParseInfo在接口中PreparedQuery<T extends QueryBindings<?>>
-
setParseInfo
public void setParseInfo(ParseInfo parseInfo)
- 指定者:
setParseInfo在接口中PreparedQuery<T extends QueryBindings<?>>
-
getOriginalSql
public String getOriginalSql()
- 指定者:
getOriginalSql在接口中PreparedQuery<T extends QueryBindings<?>>
-
setOriginalSql
public void setOriginalSql(String originalSql)
- 指定者:
setOriginalSql在接口中PreparedQuery<T extends QueryBindings<?>>
-
getParameterCount
public int getParameterCount()
- 指定者:
getParameterCount在接口中PreparedQuery<T extends QueryBindings<?>>
-
setParameterCount
public void setParameterCount(int parameterCount)
- 指定者:
setParameterCount在接口中PreparedQuery<T extends QueryBindings<?>>
-
getQueryBindings
public T getQueryBindings()
- 指定者:
getQueryBindings在接口中PreparedQuery<T extends QueryBindings<?>>
-
setQueryBindings
public void setQueryBindings(T queryBindings)
- 指定者:
setQueryBindings在接口中PreparedQuery<T extends QueryBindings<?>>
-
getBatchCommandIndex
public int getBatchCommandIndex()
- 指定者:
getBatchCommandIndex在接口中PreparedQuery<T extends QueryBindings<?>>
-
setBatchCommandIndex
public void setBatchCommandIndex(int batchCommandIndex)
- 指定者:
setBatchCommandIndex在接口中PreparedQuery<T extends QueryBindings<?>>
-
computeBatchSize
public int computeBatchSize(int numBatchedArgs)
Computes the optimum number of batched parameter lists to send without overflowing max_allowed_packet.- 指定者:
computeBatchSize在接口中PreparedQuery<T extends QueryBindings<?>>- 参数:
numBatchedArgs- original batch size- 返回:
- computed batch size
-
checkNullOrEmptyQuery
public void checkNullOrEmptyQuery(String sql)
Method checkNullOrEmptyQuery.- 指定者:
checkNullOrEmptyQuery在接口中PreparedQuery<T extends QueryBindings<?>>- 参数:
sql- the SQL to check- 抛出:
WrongArgumentException- if query is null or empty.
-
asSql
public String asSql()
- 指定者:
asSql在接口中PreparedQuery<T extends QueryBindings<?>>
-
asSql
public String asSql(boolean quoteStreamsAndUnknowns)
- 指定者:
asSql在接口中PreparedQuery<T extends QueryBindings<?>>
-
computeMaxParameterSetSizeAndBatchSize
protected abstract long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
-
fillSendPacket
public <M extends Message> M fillSendPacket()
Creates the packet that contains the query to be sent to the server.- 指定者:
fillSendPacket在接口中PreparedQuery<T extends QueryBindings<?>>- 返回:
- A Buffer filled with the query representing the PreparedStatement.
-
fillSendPacket
public <M extends Message> M fillSendPacket(QueryBindings<?> bindings)
Creates the packet that contains the query to be sent to the server.- 指定者:
fillSendPacket在接口中PreparedQuery<T extends QueryBindings<?>>- 参数:
bindings- values- 返回:
- a Buffer filled with the query that represents this statement
-
-