程序包 com.mysql.cj
类 ClientPreparedQuery
- java.lang.Object
-
- com.mysql.cj.AbstractQuery
-
- com.mysql.cj.ClientPreparedQuery
-
- 所有已实现的接口:
PreparedQuery,Query
- 直接已知子类:
ServerPreparedQuery
public class ClientPreparedQuery extends AbstractQuery implements PreparedQuery
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 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 QueryBindingsqueryBindingsprotected QueryInfoqueryInfoprotected RuntimeProperty<Boolean>useStreamLengthsInPrepStmts
-
构造器概要
构造器 构造器 说明 ClientPreparedQuery(NativeSession sess)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringasSql()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 long[]computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)Computes the maximum parameter set size, and entire batch size given the number of arguments in the batch.<M extends Message>
MfillSendPacket(QueryBindings bindings)intgetBatchCommandIndex()StringgetOriginalSql()intgetParameterCount()QueryBindingsgetQueryBindings()QueryInfogetQueryInfo()voidsetBatchCommandIndex(int batchCommandIndex)voidsetOriginalSql(String originalSql)voidsetParameterCount(int parameterCount)voidsetQueryBindings(QueryBindings queryBindings)voidsetQueryInfo(QueryInfo queryInfo)-
从类继承的方法 com.mysql.cj.AbstractQuery
addBatch, checkCancelTimeout, clearBatchedArgs, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getExecuteTime, getId, getQueryAttributesBindings, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setExecuteTime, 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, getExecuteTime, getId, getQueryAttributesBindings, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setExecuteTime, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, statementBegins, stopQueryTimer
-
-
-
-
字段详细资料
-
queryInfo
protected QueryInfo queryInfo
-
queryBindings
protected 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
-
batchCommandIndex
protected int batchCommandIndex
Command index of currently executing batch command.
-
autoClosePStmtStreams
protected RuntimeProperty<Boolean> autoClosePStmtStreams
-
useStreamLengthsInPrepStmts
protected RuntimeProperty<Boolean> useStreamLengthsInPrepStmts
-
-
构造器详细资料
-
ClientPreparedQuery
public ClientPreparedQuery(NativeSession sess)
-
-
方法详细资料
-
closeQuery
public void closeQuery()
- 指定者:
closeQuery在接口中Query- 覆盖:
closeQuery在类中AbstractQuery
-
getQueryInfo
public QueryInfo getQueryInfo()
- 指定者:
getQueryInfo在接口中PreparedQuery
-
setQueryInfo
public void setQueryInfo(QueryInfo queryInfo)
- 指定者:
setQueryInfo在接口中PreparedQuery
-
getOriginalSql
public String getOriginalSql()
- 指定者:
getOriginalSql在接口中PreparedQuery
-
setOriginalSql
public void setOriginalSql(String originalSql)
- 指定者:
setOriginalSql在接口中PreparedQuery
-
getParameterCount
public int getParameterCount()
- 指定者:
getParameterCount在接口中PreparedQuery
-
setParameterCount
public void setParameterCount(int parameterCount)
- 指定者:
setParameterCount在接口中PreparedQuery
-
getQueryBindings
public QueryBindings getQueryBindings()
- 指定者:
getQueryBindings在接口中PreparedQuery
-
setQueryBindings
public void setQueryBindings(QueryBindings queryBindings)
- 指定者:
setQueryBindings在接口中PreparedQuery
-
getBatchCommandIndex
public int getBatchCommandIndex()
- 指定者:
getBatchCommandIndex在接口中PreparedQuery
-
setBatchCommandIndex
public void setBatchCommandIndex(int batchCommandIndex)
- 指定者:
setBatchCommandIndex在接口中PreparedQuery
-
computeBatchSize
public int computeBatchSize(int numBatchedArgs)
Computes the optimum number of batched parameter lists to send without overflowing max_allowed_packet.- 指定者:
computeBatchSize在接口中PreparedQuery- 参数:
numBatchedArgs- original batch size- 返回:
- computed batch size
-
checkNullOrEmptyQuery
public void checkNullOrEmptyQuery(String sql)
Method checkNullOrEmptyQuery.- 指定者:
checkNullOrEmptyQuery在接口中PreparedQuery- 参数:
sql- the SQL to check- 抛出:
WrongArgumentException- if query is null or empty.
-
asSql
public String asSql()
- 指定者:
asSql在接口中PreparedQuery
-
computeMaxParameterSetSizeAndBatchSize
protected long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
Computes the maximum parameter set size, and entire batch size given the number of arguments in the batch.- 参数:
numBatchedArgs- number of batched arguments- 返回:
- new long[] { maxSizeOfParameterSet, sizeOfEntireBatch }
-
fillSendPacket
public <M extends Message> M fillSendPacket(QueryBindings bindings)
- 指定者:
fillSendPacket在接口中PreparedQuery
-
-