Top Fields Constructors Methods
com.mysql.cj

public Class ClientPreparedQuery

extends AbstractQuery
implements PreparedQuery
Class Inheritance
All Implemented Interfaces
com.mysql.cj.PreparedQuery, com.mysql.cj.Query
Known Direct Subclasses
com.mysql.cj.ServerPreparedQuery
Imports
com.mysql.cj.conf.PropertyKey, .RuntimeProperty, com.mysql.cj.exceptions.ExceptionFactory, .WrongArgumentException, com.mysql.cj.protocol.Message, com.mysql.cj.util.StringUtils

Field Summary

Modifier and TypeField and Description
protected RuntimeProperty<Boolean>
protected int
batchCommandIndex

Command index of currently executing batch command.

protected String
originalSql

The SQL that was passed in to 'prepare'

protected int
parameterCount

The number of parameters in this PreparedStatement

protected QueryBindings
protected QueryInfo
protected RuntimeProperty<Boolean>
Inherited from com.mysql.cj.AbstractQuery:
batchedArgscancelTimeoutLockcharEncodingclearWarningsCalledcurrentDbfetchSizelockmaxAllowedPacketqueryAttributesBindingsresultSetTypesessionstatementCounterstatementExecutingstatementIdtimeoutInMillis

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public void
checkNullOrEmptyQuery(String
the SQL to check
sql
)

Implements com.mysql.cj.PreparedQuery.checkNullOrEmptyQuery.

Method checkNullOrEmptyQuery.

public void
public int

Returns:

computed batch size
computeBatchSize
(int
original batch size
numBatchedArgs
)

Implements com.mysql.cj.PreparedQuery.computeBatchSize.

Computes the optimum number of batched parameter lists to send without overflowing max_allowed_packet.

protected long[]

Returns:

new long[] { maxSizeOfParameterSet, sizeOfEntireBatch }
computeMaxParameterSetSizeAndBatchSize
(int
number of batched arguments
numBatchedArgs
)

Computes the maximum parameter set size, and entire batch size given the number of arguments in the batch.

public <M extends Message> M
public int
public String
public int
public QueryBindings
public QueryInfo
public void
public void
public void
public void
public void
Inherited from com.mysql.cj.AbstractQuery:
addBatchcheckCancelTimeoutclearBatchedArgsgetBatchedArgsgetCancelTimeoutLockgetCurrentDatabasegetExecuteTimegetIdgetQueryAttributesBindingsgetResultFetchSizegetResultSetFactorygetResultTypegetSessiongetStatementExecutinggetTimeoutInMillisisClearWarningsCalledresetCancelledStatesetCancelStatussetClearWarningsCalledsetCurrentDatabasesetExecuteTimesetResultFetchSizesetResultTypesetTimeoutInMillisstartQueryTimerstatementBeginsstopQueryTimer

Field Detail

autoClosePStmtStreamsback to summary
protected RuntimeProperty<Boolean> autoClosePStmtStreams
batchCommandIndexback to summary
protected int batchCommandIndex

Command index of currently executing batch command.

originalSqlback to summary
protected String originalSql

The SQL that was passed in to 'prepare'

parameterCountback to summary
protected int parameterCount

The number of parameters in this PreparedStatement

queryBindingsback to summary
protected QueryBindings queryBindings
queryInfoback to summary
protected QueryInfo queryInfo
useStreamLengthsInPrepStmtsback to summary
protected RuntimeProperty<Boolean> useStreamLengthsInPrepStmts

Constructor Detail

ClientPreparedQueryback to summary
public ClientPreparedQuery(NativeSession sess)

Method Detail

asSqlback to summary
public String asSql()

Implements com.mysql.cj.PreparedQuery.asSql.

Annotations
@Override
checkNullOrEmptyQueryback to summary
public void checkNullOrEmptyQuery(String sql)

Implements com.mysql.cj.PreparedQuery.checkNullOrEmptyQuery.

Method checkNullOrEmptyQuery.

Parameters
sql:String

the SQL to check

Annotations
@Override
Exceptions
WrongArgumentException:
if query is null or empty.
closeQueryback to summary
public void closeQuery()

Overrides com.mysql.cj.AbstractQuery.closeQuery.

Implements com.mysql.cj.Query.closeQuery.

Annotations
@Override
computeBatchSizeback to summary
public int computeBatchSize(int numBatchedArgs)

Implements com.mysql.cj.PreparedQuery.computeBatchSize.

Computes the optimum number of batched parameter lists to send without overflowing max_allowed_packet.

Parameters
numBatchedArgs:int

original batch size

Returns:int

computed batch size

Annotations
@Override
computeMaxParameterSetSizeAndBatchSizeback to summary
protected long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)

Computes the maximum parameter set size, and entire batch size given the number of arguments in the batch.

Parameters
numBatchedArgs:int

number of batched arguments

Returns:long[]

new long[] { maxSizeOfParameterSet, sizeOfEntireBatch }

fillSendPacketback to summary
public <M extends Message> M fillSendPacket(QueryBindings bindings)

Implements com.mysql.cj.PreparedQuery.fillSendPacket.

Annotations
@SuppressWarnings:unchecked
@Override
getBatchCommandIndexback to summary
public int getBatchCommandIndex()

Implements com.mysql.cj.PreparedQuery.getBatchCommandIndex.

Annotations
@Override
getOriginalSqlback to summary
public String getOriginalSql()

Implements com.mysql.cj.PreparedQuery.getOriginalSql.

Annotations
@Override
getParameterCountback to summary
public int getParameterCount()

Implements com.mysql.cj.PreparedQuery.getParameterCount.

Annotations
@Override
getQueryBindingsback to summary
public QueryBindings getQueryBindings()

Implements com.mysql.cj.PreparedQuery.getQueryBindings.

Annotations
@Override
getQueryInfoback to summary
public QueryInfo getQueryInfo()

Implements com.mysql.cj.PreparedQuery.getQueryInfo.

Annotations
@Override
setBatchCommandIndexback to summary
public void setBatchCommandIndex(int batchCommandIndex)

Implements com.mysql.cj.PreparedQuery.setBatchCommandIndex.

Annotations
@Override
setOriginalSqlback to summary
public void setOriginalSql(String originalSql)

Implements com.mysql.cj.PreparedQuery.setOriginalSql.

Annotations
@Override
setParameterCountback to summary
public void setParameterCount(int parameterCount)

Implements com.mysql.cj.PreparedQuery.setParameterCount.

Annotations
@Override
setQueryBindingsback to summary
public void setQueryBindings(QueryBindings queryBindings)

Implements com.mysql.cj.PreparedQuery.setQueryBindings.

Annotations
@Override
setQueryInfoback to summary
public void setQueryInfo(QueryInfo queryInfo)

Implements com.mysql.cj.PreparedQuery.setQueryInfo.

Annotations
@Override