public class ClientPreparedQuery extends AbstractQuery implements PreparedQuery
Query.CancelStatus| Modifier and Type | Field and Description |
|---|---|
protected RuntimeProperty<java.lang.Boolean> |
autoClosePStmtStreams |
protected int |
batchCommandIndex
Command index of currently executing batch command.
|
protected java.lang.String |
originalSql
The SQL that was passed in to 'prepare'
|
protected int |
parameterCount
The number of parameters in this PreparedStatement
|
protected QueryBindings |
queryBindings |
protected QueryInfo |
queryInfo |
protected RuntimeProperty<java.lang.Boolean> |
useStreamLengthsInPrepStmts |
batchedArgs, cancelTimeoutMutex, charEncoding, clearWarningsCalled, currentDb, fetchSize, maxAllowedPacket, queryAttributesBindings, resultSetType, session, statementExecuting, statementId, timeoutInMillis| Constructor and Description |
|---|
ClientPreparedQuery(NativeSession sess) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asSql() |
void |
checkNullOrEmptyQuery(java.lang.String sql)
Method checkNullOrEmptyQuery.
|
void |
closeQuery() |
int |
computeBatchSize(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> |
fillSendPacket(QueryBindings bindings) |
int |
getBatchCommandIndex() |
java.lang.String |
getOriginalSql() |
int |
getParameterCount() |
QueryBindings |
getQueryBindings() |
QueryInfo |
getQueryInfo() |
void |
setBatchCommandIndex(int batchCommandIndex) |
void |
setOriginalSql(java.lang.String originalSql) |
void |
setParameterCount(int parameterCount) |
void |
setQueryBindings(QueryBindings queryBindings) |
void |
setQueryInfo(QueryInfo queryInfo) |
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, stopQueryTimerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBatch, 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, stopQueryTimerprotected QueryInfo queryInfo
protected QueryBindings queryBindings
protected java.lang.String originalSql
protected int parameterCount
protected int batchCommandIndex
protected RuntimeProperty<java.lang.Boolean> autoClosePStmtStreams
protected RuntimeProperty<java.lang.Boolean> useStreamLengthsInPrepStmts
public ClientPreparedQuery(NativeSession sess)
public void closeQuery()
closeQuery in interface QuerycloseQuery in class AbstractQuerypublic QueryInfo getQueryInfo()
getQueryInfo in interface PreparedQuerypublic void setQueryInfo(QueryInfo queryInfo)
setQueryInfo in interface PreparedQuerypublic java.lang.String getOriginalSql()
getOriginalSql in interface PreparedQuerypublic void setOriginalSql(java.lang.String originalSql)
setOriginalSql in interface PreparedQuerypublic int getParameterCount()
getParameterCount in interface PreparedQuerypublic void setParameterCount(int parameterCount)
setParameterCount in interface PreparedQuerypublic QueryBindings getQueryBindings()
getQueryBindings in interface PreparedQuerypublic void setQueryBindings(QueryBindings queryBindings)
setQueryBindings in interface PreparedQuerypublic int getBatchCommandIndex()
getBatchCommandIndex in interface PreparedQuerypublic void setBatchCommandIndex(int batchCommandIndex)
setBatchCommandIndex in interface PreparedQuerypublic int computeBatchSize(int numBatchedArgs)
computeBatchSize in interface PreparedQuerynumBatchedArgs - original batch sizepublic void checkNullOrEmptyQuery(java.lang.String sql)
checkNullOrEmptyQuery in interface PreparedQuerysql - the SQL to checkWrongArgumentException - if query is null or empty.public java.lang.String asSql()
asSql in interface PreparedQueryprotected long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
numBatchedArgs - number of batched argumentspublic <M extends Message> M fillSendPacket(QueryBindings bindings)
fillSendPacket in interface PreparedQuery