public class ServerPreparedStatement extends PreparedStatement
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerPreparedStatement.BatchedBindValues |
static class |
ServerPreparedStatement.BindValue |
PreparedStatement.AppendingBatchVisitor, PreparedStatement.BatchParams, PreparedStatement.BatchVisitor, PreparedStatement.EmulatedPreparedStatementBindings, PreparedStatement.EndPoint, PreparedStatement.ParseInfoStatementImpl.CancelTask| Modifier and Type | Field and Description |
|---|---|
protected static int |
BLOB_STREAM_READ_BUF_SIZE |
protected boolean |
isCached |
batchCommandIndex, batchedValuesClause, batchHasPlainStatements, firstCharOfStmt, isLoadDataQuery, isNull, numberOfExecutions, originalSql, parameterCount, parameterMetaData, parameterTypes, parseInfo, rewrittenBatchSize, serverSupportsFracSecs, useTrueBoolean, usingAnsiModebatchedArgs, batchedGeneratedKeys, cancelTimeoutMutex, charConverter, charEncoding, clearWarningsCalled, connection, connectionId, continueBatchOnError, currentCatalog, doEscapeProcessing, eventSink, generatedKeysResults, holdResultsOpenOverClose, isClosed, lastInsertId, lastQueryIsOnDupKeyUpdate, maxFieldSize, maxRows, ON_DUPLICATE_KEY_UPDATE_CLAUSE, openResults, pedantic, PING_MARKER, pingTarget, pointOfOrigin, profileSQL, results, resultSetConcurrency, resultSetType, retrieveGeneratedKeys, statementCounter, statementExecuting, statementId, timeoutInMillis, updateCount, useLegacyDatetimeCode, USES_VARIABLES_FALSE, USES_VARIABLES_TRUE, USES_VARIABLES_UNKNOWN, useUsageAdvisor, version5013OrNewer, warningChain, wasCancelled, wasCancelledByTimeout| Modifier | Constructor and Description |
|---|---|
protected |
ServerPreparedStatement(MySQLConnection conn,
java.lang.String sql,
java.lang.String catalog,
int resultSetType,
int resultSetConcurrency)
Creates a new ServerPreparedStatement object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch()
JDBC 2.0 Add a set of parameters to the batch.
|
java.lang.String |
asSql(boolean quoteStreamsAndUnknowns) |
boolean |
canRewriteAsMultiValueInsertAtSqlLevel() |
boolean |
canRewriteAsMultivalueInsertStatement() |
protected MySQLConnection |
checkClosed()
Checks if closed() has been called, and throws an exception if so
|
void |
clearParameters()
In general, parameter values remain in force for repeated used of a
Statement.
|
void |
close()
In many cases, it is desirable to immediately release a Statement's
database and JDBC resources instead of waiting for this to happen when it
is automatically closed.
|
protected long[] |
computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
Computes the maximum parameter set size, and entire batch size given
the number of arguments in the batch.
|
protected boolean |
containsOnDuplicateKeyUpdateInSQL() |
protected int[] |
executeBatchSerially(int batchTimeout)
Executes the current batch of statements by executing them one-by-one.
|
protected ResultSetInternalMethods |
executeInternal(int maxRowsToRetrieve,
Buffer sendPacket,
boolean createStreamingResultSet,
boolean queryIsSelectOnly,
Field[] metadataFromCache,
boolean isBatch)
Actually execute the prepared statement.
|
protected Buffer |
fillSendPacket()
Creates the packet that contains the query to be sent to the server.
|
protected Buffer |
fillSendPacket(byte[][] batchedParameterStrings,
java.io.InputStream[] batchedParameterStreams,
boolean[] batchedIsStream,
int[] batchedStreamLengths)
Creates the packet that contains the query to be sent to the server.
|
protected ServerPreparedStatement.BindValue |
getBinding(int parameterIndex,
boolean forLongData)
Returns the structure representing the value that (can be)/(is)
bound at the given parameter index.
|
(package private) byte[] |
getBytes(int parameterIndex) |
protected static ServerPreparedStatement |
getInstance(MySQLConnection conn,
java.lang.String sql,
java.lang.String catalog,
int resultSetType,
int resultSetConcurrency)
Creates a prepared statement instance -- We need to provide factory-style
methods so we can support both JDBC3 (and older) and JDBC4 runtimes,
otherwise the class verifier complains when it tries to load JDBC4-only
interface classes that are present in JDBC4 method signatures.
|
protected int |
getLocationOfOnDuplicateKeyUpdate() |
java.sql.ResultSetMetaData |
getMetaData()
The number, types and properties of a ResultSet's columns are provided by
the getMetaData method.
|
ServerPreparedStatement.BindValue[] |
getParameterBindValues()
Return current bind values for use by Statement Interceptors.
|
java.sql.ParameterMetaData |
getParameterMetaData() |
protected long |
getServerStatementId() |
(package private) boolean |
isNull(int paramIndex) |
protected boolean |
isOnDuplicateKeyUpdate() |
protected PreparedStatement |
prepareBatchedInsertSQL(MySQLConnection localConn,
int numBatches)
Returns a prepared statement for the number of batched parameters, used when re-writing batch INSERTs.
|
protected void |
realClose(boolean calledExplicitly,
boolean closeOpenResults)
Closes this connection and frees all resources.
|
protected void |
rePrepare()
Used by Connection when auto-reconnecting to retrieve 'lost' prepared
statements.
|
void |
setArray(int i,
java.sql.Array x)
JDBC 2.0 Set an Array parameter.
|
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
When a very large ASCII value is input to a LONGVARCHAR parameter, it may
be more practical to send it via a java.io.InputStream.
|
void |
setBigDecimal(int parameterIndex,
java.math.BigDecimal x)
Set a parameter to a java.math.BigDecimal value.
|
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
When a very large binary value is input to a LONGVARBINARY parameter, it
may be more practical to send it via a java.io.InputStream.
|
void |
setBlob(int parameterIndex,
java.sql.Blob x)
JDBC 2.0 Set a BLOB parameter.
|
void |
setBoolean(int parameterIndex,
boolean x)
Set a parameter to a Java boolean value.
|
void |
setByte(int parameterIndex,
byte x)
Set a parameter to a Java byte value.
|
void |
setBytes(int parameterIndex,
byte[] x)
Set a parameter to a Java array of bytes.
|
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length)
JDBC 2.0 When a very large UNICODE value is input to a LONGVARCHAR
parameter, it may be more practical to send it via a java.io.Reader.
|
void |
setClob(int parameterIndex,
java.sql.Clob x)
JDBC 2.0 Set a CLOB parameter.
|
protected void |
setClosed(boolean flag) |
void |
setDate(int parameterIndex,
java.sql.Date x)
Set a parameter to a java.sql.Date value.
|
void |
setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
Set a parameter to a java.sql.Date value.
|
void |
setDouble(int parameterIndex,
double x)
Set a parameter to a Java double value.
|
void |
setFloat(int parameterIndex,
float x)
Set a parameter to a Java float value.
|
void |
setInt(int parameterIndex,
int x)
Set a parameter to a Java int value.
|
void |
setLong(int parameterIndex,
long x)
Set a parameter to a Java long value.
|
void |
setNull(int parameterIndex,
int sqlType)
Set a parameter to SQL NULL
Note: You must specify the parameters SQL type (although MySQL ignores it)
|
void |
setNull(int parameterIndex,
int sqlType,
java.lang.String typeName)
Set a parameter to SQL NULL.
|
protected int |
setOneBatchedParameterSet(java.sql.PreparedStatement batchedStatement,
int batchedParamIndex,
java.lang.Object paramSet) |
void |
setRef(int i,
java.sql.Ref x)
JDBC 2.0 Set a REF(<structured-type>) parameter.
|
void |
setShort(int parameterIndex,
short x)
Set a parameter to a Java short value.
|
void |
setString(int parameterIndex,
java.lang.String x)
Set a parameter to a Java String value.
|
void |
setTime(int parameterIndex,
java.sql.Time x)
Set a parameter to a java.sql.Time value.
|
void |
setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
Set a parameter to a java.sql.Time value.
|
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x)
Set a parameter to a java.sql.Timestamp value.
|
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
Set a parameter to a java.sql.Timestamp value.
|
protected void |
setType(ServerPreparedStatement.BindValue oldValue,
int bufferType) |
void |
setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
Deprecated.
|
void |
setURL(int parameterIndex,
java.net.URL x) |
java.lang.String |
toString()
Returns this PreparedStatement represented as a string.
|
addBatch, asSql, canRewrite, checkBounds, checkReadOnlySafeStatement, clearBatch, computeBatchSize, detectFractionalSecondsSupport, execute, executeBatch, executeBatchedInserts, executePreparedBatchAsMultiStatement, executeQuery, executeUpdate, executeUpdate, executeUpdate, getBytesRepresentation, getBytesRepresentationForBatch, getDateTime, getInstance, getInstance, getInstance, getNonRewrittenSql, getParameterBindings, getParameterIndexOffset, getParseInfo, getPreparedSql, getRewrittenBatchSize, getUpdateCount, getValuesClause, isSelectQuery, readFully, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBytes, setBytesNoEscape, setBytesNoEscapeNoQuotes, setCharacterStream, setCharacterStream, setClob, setClob, setInternal, setInternal, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNString, setObject, setObject, setObject, setRetrieveGeneratedKeyscancel, checkForDml, checkNullOrEmptyQuery, clearWarnings, closeAllOpenResults, closeOnCompletion, containsOnDuplicateKeyInString, createStreamingResultSet, disableStreamingResults, doPingInstead, enableStreamingResults, execute, execute, execute, execute, executeQuery, executeSimpleNonQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, findStartOfStatement, generatePingResultSet, getBatchedArgs, getBatchedGeneratedKeys, getBatchedGeneratedKeys, getCalendarInstanceForSessionOrNew, getConnection, getExceptionInterceptor, getFetchDirection, getFetchSize, getGeneratedKeys, getGeneratedKeysInternal, getGeneratedKeysInternal, getId, getLastInsertID, getLocalInfileInputStream, getLongUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getOnDuplicateKeyLocation, getOpenResultSetCount, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetInternal, getResultSetType, getWarnings, handleExceptionForBatch, hasDeadlockOrTimeoutRolledBackTx, implicitlyCloseAllOpenResults, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, processMultiCountsAndKeys, removeOpenResultSet, resetCancelledState, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setHoldResultsOpenOverClose, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPingTarget, setPoolable, setQueryTimeout, setResultSetConcurrency, setResultSetType, setupStreamingTimeout, statementBegins, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcancel, clearWarnings, closeOnCompletion, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutprotected static final int BLOB_STREAM_READ_BUF_SIZE
protected boolean isCached
protected ServerPreparedStatement(MySQLConnection conn, java.lang.String sql, java.lang.String catalog, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
conn - the connection creating us.sql - the SQL containing the statement to prepare.catalog - the catalog in use when we were created.java.sql.SQLException - If an error occursprotected static ServerPreparedStatement getInstance(MySQLConnection conn, java.lang.String sql, java.lang.String catalog, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
java.sql.SQLExceptionpublic void addBatch()
throws java.sql.SQLException
addBatch in interface java.sql.PreparedStatementaddBatch in class PreparedStatementjava.sql.SQLException - if a database-access error occurs.StatementImpl.addBatch(java.lang.String)public java.lang.String asSql(boolean quoteStreamsAndUnknowns)
throws java.sql.SQLException
asSql in class PreparedStatementjava.sql.SQLExceptionprotected MySQLConnection checkClosed() throws java.sql.SQLException
StatementImplcheckClosed in class StatementImpljava.sql.SQLException - if this statement has been closedpublic void clearParameters()
throws java.sql.SQLException
PreparedStatementclearParameters in interface java.sql.PreparedStatementclearParameters in class PreparedStatementjava.sql.SQLException - if a database access error occursPreparedStatement.clearParameters()protected void setClosed(boolean flag)
public void close()
throws java.sql.SQLException
StatementImplNote: A Statement is automatically closed when it is garbage collected. When a Statement is closed, its current ResultSet, if one exists, is also closed.
close in interface java.lang.AutoCloseableclose in interface java.sql.Statementclose in class StatementImpljava.sql.SQLException - if a database access error occursStatement.close()protected int[] executeBatchSerially(int batchTimeout)
throws java.sql.SQLException
PreparedStatementexecuteBatchSerially in class PreparedStatementjava.sql.SQLException - if an error occursprotected ResultSetInternalMethods executeInternal(int maxRowsToRetrieve, Buffer sendPacket, boolean createStreamingResultSet, boolean queryIsSelectOnly, Field[] metadataFromCache, boolean isBatch) throws java.sql.SQLException
PreparedStatementexecuteInternal in class PreparedStatementmaxRowsToRetrieve - the max number of rows to returnsendPacket - the packet to sendcreateStreamingResultSet - should a 'streaming' result set be created?queryIsSelectOnly - is this query doing a SELECT?java.sql.SQLException - if an error occurs.com.mysql.jdbc.PreparedStatement#executeInternal(int, com.mysql.jdbc.Buffer, boolean, boolean)protected Buffer fillSendPacket() throws java.sql.SQLException
PreparedStatementfillSendPacket in class PreparedStatementjava.sql.SQLException - if an error occurs.PreparedStatement.fillSendPacket()protected Buffer fillSendPacket(byte[][] batchedParameterStrings, java.io.InputStream[] batchedParameterStreams, boolean[] batchedIsStream, int[] batchedStreamLengths) throws java.sql.SQLException
PreparedStatementfillSendPacket in class PreparedStatementbatchedParameterStrings - the parameters as stringsbatchedParameterStreams - the parameters as streamsbatchedIsStream - is the given parameter a stream?batchedStreamLengths - the lengths of the streams (if appropriate)java.sql.SQLException - if an error occurs.com.mysql.jdbc.PreparedStatement#fillSendPacket(byte, java.io.InputStream, boolean, int)protected ServerPreparedStatement.BindValue getBinding(int parameterIndex, boolean forLongData) throws java.sql.SQLException
parameterIndex - 1-basedforLongData - is this for a stream?java.sql.SQLExceptionpublic ServerPreparedStatement.BindValue[] getParameterBindValues()
PreparedStatement.executeBatch(),
addBatch()byte[] getBytes(int parameterIndex)
throws java.sql.SQLException
java.sql.SQLExceptioncom.mysql.jdbc.PreparedStatement#getBytes(int)public java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
PreparedStatementgetMetaData in interface java.sql.PreparedStatementgetMetaData in class PreparedStatementjava.sql.SQLException - if a database-access error occurs.PreparedStatement.getMetaData()public java.sql.ParameterMetaData getParameterMetaData()
throws java.sql.SQLException
getParameterMetaData in interface java.sql.PreparedStatementgetParameterMetaData in class PreparedStatementjava.sql.SQLExceptionPreparedStatement.getParameterMetaData()boolean isNull(int paramIndex)
isNull in class PreparedStatementPreparedStatement.isNull(int)protected void realClose(boolean calledExplicitly,
boolean closeOpenResults)
throws java.sql.SQLException
realClose in class PreparedStatementcalledExplicitly - was this called from close()?java.sql.SQLException - if an error occursprotected void rePrepare()
throws java.sql.SQLException
java.sql.SQLException - if an error occurs.public void setArray(int i,
java.sql.Array x)
throws java.sql.SQLException
PreparedStatementsetArray in interface java.sql.PreparedStatementsetArray in class PreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing an SQL arrayjava.sql.SQLException - because this method is not implemented.NotImplementedPreparedStatement.setArray(int, java.sql.Array)public void setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
PreparedStatementNote: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setAsciiStream in interface java.sql.PreparedStatementsetAsciiStream in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuelength - the number of bytes in the streamjava.sql.SQLException - if a database access error occursPreparedStatement.setAsciiStream(int, java.io.InputStream, int)public void setBigDecimal(int parameterIndex,
java.math.BigDecimal x)
throws java.sql.SQLException
PreparedStatementsetBigDecimal in interface java.sql.PreparedStatementsetBigDecimal in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setBigDecimal(int, java.math.BigDecimal)public void setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
PreparedStatementNote: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setBinaryStream in interface java.sql.PreparedStatementsetBinaryStream in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuelength - the number of bytes to read from the stream (ignored)java.sql.SQLException - if a database access error occursPreparedStatement.setBinaryStream(int, java.io.InputStream, int)public void setBlob(int parameterIndex,
java.sql.Blob x)
throws java.sql.SQLException
PreparedStatementsetBlob in interface java.sql.PreparedStatementsetBlob in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - an object representing a BLOBjava.sql.SQLException - if a database error occursPreparedStatement.setBlob(int, java.sql.Blob)public void setBoolean(int parameterIndex,
boolean x)
throws java.sql.SQLException
PreparedStatementsetBoolean in interface java.sql.PreparedStatementsetBoolean in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setBoolean(int, boolean)public void setByte(int parameterIndex,
byte x)
throws java.sql.SQLException
PreparedStatementsetByte in interface java.sql.PreparedStatementsetByte in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setByte(int, byte)public void setBytes(int parameterIndex,
byte[] x)
throws java.sql.SQLException
PreparedStatementsetBytes in interface java.sql.PreparedStatementsetBytes in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursjava.sql.PreparedStatement#setBytes(int, byte)public void setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length)
throws java.sql.SQLException
PreparedStatementNote: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setCharacterStream in interface java.sql.PreparedStatementsetCharacterStream in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...reader - the java reader which contains the UNICODE datalength - the number of characters in the streamjava.sql.SQLException - if a database-access error occurs.PreparedStatement.setCharacterStream(int, java.io.Reader, int)public void setClob(int parameterIndex,
java.sql.Clob x)
throws java.sql.SQLException
PreparedStatementsetClob in interface java.sql.PreparedStatementsetClob in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - an object representing a CLOBjava.sql.SQLException - if a database error occursPreparedStatement.setClob(int, java.sql.Clob)public void setDate(int parameterIndex,
java.sql.Date x)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementsetDate in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLException - if a database-access error occurs.public void setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementsetDate in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the calendar to interpret the date withjava.sql.SQLException - if a database-access error occurs.public void setDouble(int parameterIndex,
double x)
throws java.sql.SQLException
PreparedStatementsetDouble in interface java.sql.PreparedStatementsetDouble in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setDouble(int, double)public void setFloat(int parameterIndex,
float x)
throws java.sql.SQLException
PreparedStatementsetFloat in interface java.sql.PreparedStatementsetFloat in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setFloat(int, float)public void setInt(int parameterIndex,
int x)
throws java.sql.SQLException
PreparedStatementsetInt in interface java.sql.PreparedStatementsetInt in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setInt(int, int)public void setLong(int parameterIndex,
long x)
throws java.sql.SQLException
PreparedStatementsetLong in interface java.sql.PreparedStatementsetLong in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setLong(int, long)public void setNull(int parameterIndex,
int sqlType)
throws java.sql.SQLException
PreparedStatementNote: You must specify the parameters SQL type (although MySQL ignores it)
setNull in interface java.sql.PreparedStatementsetNull in class PreparedStatementparameterIndex - the first parameter is 1, etc...sqlType - the SQL type code defined in java.sql.Typesjava.sql.SQLException - if a database access error occursPreparedStatement.setNull(int, int)public void setNull(int parameterIndex,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
PreparedStatementNote: You must specify the parameter's SQL type.
setNull in interface java.sql.PreparedStatementsetNull in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...sqlType - SQL type code defined by java.sql.TypestypeName - argument parameters for nulljava.sql.SQLException - if a database-access error occurs.PreparedStatement.setNull(int, int, java.lang.String)public void setRef(int i,
java.sql.Ref x)
throws java.sql.SQLException
PreparedStatementsetRef in interface java.sql.PreparedStatementsetRef in class PreparedStatementi - the first parameter is 1, the second is 2, ...x - an object representing data of an SQL REF Typejava.sql.SQLException - if a database error occursNotImplementedPreparedStatement.setRef(int, java.sql.Ref)public void setShort(int parameterIndex,
short x)
throws java.sql.SQLException
PreparedStatementsetShort in interface java.sql.PreparedStatementsetShort in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setShort(int, short)public void setString(int parameterIndex,
java.lang.String x)
throws java.sql.SQLException
PreparedStatementsetString in interface java.sql.PreparedStatementsetString in class PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occursPreparedStatement.setString(int, java.lang.String)public void setTime(int parameterIndex,
java.sql.Time x)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementsetTime in class PreparedStatementparameterIndex - the first parameter is 1...));x - the parameter valuejava.sql.SQLException - if a database access error occurspublic void setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementsetTime in class PreparedStatementparameterIndex - the first parameter is 1...));x - the parameter valuecal - the timezone to usejava.sql.SQLException - if a database access error occurspublic void setTimestamp(int parameterIndex,
java.sql.Timestamp x)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementsetTimestamp in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuejava.sql.SQLException - if a database-access error occurs.public void setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementsetTimestamp in class PreparedStatementparameterIndex - the first parameter is 1, the second is 2, ...x - the parameter valuecal - the timezone to usejava.sql.SQLException - if a database-access error occurs.protected void setType(ServerPreparedStatement.BindValue oldValue, int bufferType) throws java.sql.SQLException
java.sql.SQLException@Deprecated
public void setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
PreparedStatementNote: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
setUnicodeStream in interface java.sql.PreparedStatementsetUnicodeStream in class PreparedStatementparameterIndex - x - length - java.sql.SQLExceptionNotImplementedPreparedStatement.setUnicodeStream(int, java.io.InputStream, int)public void setURL(int parameterIndex,
java.net.URL x)
throws java.sql.SQLException
setURL in interface java.sql.PreparedStatementsetURL in class PreparedStatementjava.sql.SQLExceptionPreparedStatement.setURL(int, java.net.URL)public java.lang.String toString()
PreparedStatementtoString in class PreparedStatementObject.toString()protected long getServerStatementId()
public boolean canRewriteAsMultiValueInsertAtSqlLevel()
throws java.sql.SQLException
canRewriteAsMultiValueInsertAtSqlLevel in class PreparedStatementjava.sql.SQLExceptionpublic boolean canRewriteAsMultivalueInsertStatement()
throws java.sql.SQLException
java.sql.SQLExceptionprotected int getLocationOfOnDuplicateKeyUpdate()
throws java.sql.SQLException
getLocationOfOnDuplicateKeyUpdate in class PreparedStatementjava.sql.SQLExceptionprotected boolean isOnDuplicateKeyUpdate()
throws java.sql.SQLException
java.sql.SQLExceptionprotected long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs)
throws java.sql.SQLException
computeMaxParameterSetSizeAndBatchSize in class PreparedStatementjava.sql.SQLExceptionprotected int setOneBatchedParameterSet(java.sql.PreparedStatement batchedStatement,
int batchedParamIndex,
java.lang.Object paramSet)
throws java.sql.SQLException
setOneBatchedParameterSet in class PreparedStatementjava.sql.SQLExceptionprotected boolean containsOnDuplicateKeyUpdateInSQL()
containsOnDuplicateKeyUpdateInSQL in class PreparedStatementprotected PreparedStatement prepareBatchedInsertSQL(MySQLConnection localConn, int numBatches) throws java.sql.SQLException
PreparedStatementprepareBatchedInsertSQL in class PreparedStatementjava.sql.SQLException