public class ServerPreparedQuery extends ClientPreparedQuery
Query.CancelStatus| Modifier and Type | Field and Description |
|---|---|
static int |
BLOB_STREAM_READ_BUF_SIZE |
protected NativeMessageBuilder |
commandBuilder |
protected RuntimeProperty<java.lang.Boolean> |
explainSlowQueries |
protected boolean |
gatherPerfMetrics
The "gatherPerfMetrics" connection property value
|
protected boolean |
logSlowQueries
The "logSlowQueries" connection property value
|
static byte |
OPEN_CURSOR_FLAG |
static byte |
PARAMETER_COUNT_AVAILABLE |
protected boolean |
profileSQL
The "profileSQL" connection property value
|
protected boolean |
queryWasSlow |
protected RuntimeProperty<java.lang.Integer> |
slowQueryThresholdMillis |
protected boolean |
useCursorFetch |
autoClosePStmtStreams, batchCommandIndex, originalSql, parameterCount, queryBindings, queryInfo, useStreamLengthsInPrepStmtsbatchedArgs, cancelTimeoutMutex, charEncoding, clearWarningsCalled, currentDb, fetchSize, maxAllowedPacket, queryAttributesBindings, resultSetType, session, statementExecuting, statementId, timeoutInMillis| Modifier | Constructor and Description |
|---|---|
protected |
ServerPreparedQuery(NativeSession sess) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearParameters(boolean clearServerParameters) |
void |
closeQuery() |
protected long[] |
computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
Computes the maximum parameter set size and the size of the entire batch given
the number of arguments in the batch.
|
<M extends Message> |
fillSendPacket(QueryBindings bindings) |
static ServerPreparedQuery |
getInstance(NativeSession sess) |
Field[] |
getParameterFields() |
ColumnDefinition |
getResultFields() |
long |
getServerStatementId() |
NativePacketPayload |
prepareExecutePacket() |
<T extends Resultset> |
readExecuteResult(NativePacketPayload resultPacket,
int maxRowsToRetrieve,
boolean createStreamingResultSet,
ColumnDefinition metadata,
ProtocolEntityFactory<T,NativePacketPayload> resultSetFactory,
java.lang.String queryAsString) |
NativePacketPayload |
sendExecutePacket(NativePacketPayload packet,
java.lang.String queryAsString) |
<T extends Resultset> |
serverExecute(int maxRowsToRetrieve,
boolean createStreamingResultSet,
ColumnDefinition metadata,
ProtocolEntityFactory<T,NativePacketPayload> resultSetFactory) |
void |
serverPrepare(java.lang.String sql) |
void |
serverResetStatement() |
void |
setParameterFields(Field[] parameterFields) |
void |
setResultFields(ColumnDefinition resultFields) |
void |
setServerStatementId(long serverStatementId) |
void |
statementBegins() |
asSql, checkNullOrEmptyQuery, computeBatchSize, getBatchCommandIndex, getOriginalSql, getParameterCount, getQueryBindings, getQueryInfo, setBatchCommandIndex, setOriginalSql, setParameterCount, setQueryBindings, setQueryInfoaddBatch, checkCancelTimeout, clearBatchedArgs, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getExecuteTime, getId, getQueryAttributesBindings, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setExecuteTime, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, 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, stopQueryTimerpublic static final int BLOB_STREAM_READ_BUF_SIZE
public static final byte OPEN_CURSOR_FLAG
public static final byte PARAMETER_COUNT_AVAILABLE
protected boolean profileSQL
protected boolean gatherPerfMetrics
protected boolean logSlowQueries
protected RuntimeProperty<java.lang.Integer> slowQueryThresholdMillis
protected RuntimeProperty<java.lang.Boolean> explainSlowQueries
protected boolean useCursorFetch
protected boolean queryWasSlow
protected NativeMessageBuilder commandBuilder
protected ServerPreparedQuery(NativeSession sess)
public static ServerPreparedQuery getInstance(NativeSession sess)
public void serverPrepare(java.lang.String sql)
throws java.io.IOException
sql - query stringjava.io.IOException - if an i/o error occurspublic void statementBegins()
statementBegins in interface QuerystatementBegins in class AbstractQuerypublic <T extends Resultset> T serverExecute(int maxRowsToRetrieve, boolean createStreamingResultSet, ColumnDefinition metadata, ProtocolEntityFactory<T,NativePacketPayload> resultSetFactory)
T - extends ResultsetmaxRowsToRetrieve - rows limitcreateStreamingResultSet - should c/J create a streaming result?metadata - use this metadata instead of the one provided on wireresultSetFactory - ProtocolEntityFactorypublic NativePacketPayload prepareExecutePacket()
public NativePacketPayload sendExecutePacket(NativePacketPayload packet, java.lang.String queryAsString)
public <T extends Resultset> T readExecuteResult(NativePacketPayload resultPacket, int maxRowsToRetrieve, boolean createStreamingResultSet, ColumnDefinition metadata, ProtocolEntityFactory<T,NativePacketPayload> resultSetFactory, java.lang.String queryAsString)
public void closeQuery()
closeQuery in interface QuerycloseQuery in class ClientPreparedQuerypublic long getServerStatementId()
public void setServerStatementId(long serverStatementId)
public Field[] getParameterFields()
public void setParameterFields(Field[] parameterFields)
public ColumnDefinition getResultFields()
public void setResultFields(ColumnDefinition resultFields)
public void clearParameters(boolean clearServerParameters)
clearServerParameters - flag indicating whether we need an additional clean uppublic void serverResetStatement()
protected long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
computeMaxParameterSetSizeAndBatchSize in class ClientPreparedQuerynumBatchedArgs - number of batched argumentspublic <M extends Message> M fillSendPacket(QueryBindings bindings)
fillSendPacket in interface PreparedQueryfillSendPacket in class ClientPreparedQuery