public class ClientPreparedStatement extends StatementImpl implements JdbcPreparedStatement
Note: The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type Integer, then setInt should be used.
If arbitrary parameter type conversions are required, then the setObject method should be used with a target SQL type.
Query.CancelStatus| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
batchedValuesClause |
protected boolean |
batchHasPlainStatements
Does the batch (if any) contain "plain" statements added by Statement.addBatch(String)?
If so, we can't re-write it to use multi-value or multi-queries.
|
protected MysqlParameterMetadata |
parameterMetaData |
protected int |
rewrittenBatchSize |
batchedGeneratedKeys, charEncoding, commandBuilder, connection, continueBatchOnError, doEscapeProcessing, dontCheckOnDuplicateKeyUpdateInSQL, dontTrackOpenResources, dumpQueriesOnException, exceptionInterceptor, generatedKeysResults, holdResultsOpenOverClose, isClosed, lastInsertId, lastQueryIsOnDupKeyUpdate, logSlowQueries, maxAllowedPacket, maxFieldSize, maxRows, openResults, pedantic, PING_MARKER, pingTarget, profileSQL, query, results, resultSetConcurrency, resultSetFactory, retrieveGeneratedKeys, rewriteBatchedStatements, session, updateCount, USES_VARIABLES_FALSE, USES_VARIABLES_TRUE, USES_VARIABLES_UNKNOWN, useUsageAdvisor, warningChainMAX_ROWS| Modifier | Constructor and Description |
|---|---|
protected |
ClientPreparedStatement(JdbcConnection conn,
java.lang.String db)
Constructor used by server-side prepared statements
|
|
ClientPreparedStatement(JdbcConnection conn,
java.lang.String sql,
java.lang.String db)
Constructor for the PreparedStatement class.
|
|
ClientPreparedStatement(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
QueryInfo cachedQueryInfo)
Creates a new PreparedStatement object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch() |
void |
addBatch(java.lang.String sql) |
protected void |
checkBounds(int paramIndex,
int parameterIndexOffset) |
protected boolean |
checkReadOnlySafeStatement()
Check to see if the statement is safe for read-only replicas after failover.
|
void |
clearBatch() |
void |
clearParameters() |
protected boolean |
containsOnDuplicateKeyUpdate() |
boolean |
execute() |
protected long[] |
executeBatchInternal() |
protected long[] |
executeBatchSerially(int batchTimeout)
Executes the current batch of statements by executing them one-by-one.
|
protected long[] |
executeBatchWithMultiValuesClause(int batchTimeout)
Rewrites the already prepared statement into a multi-values clause INSERT/REPLACE statement and executes the entire batch using this new statement.
|
protected <M extends Message> |
executeInternal(int maxRowsToRetrieve,
M sendPacket,
boolean createStreamingResultSet,
boolean queryIsSelectOnly,
ColumnDefinition metadata,
boolean isBatch)
Actually execute the prepared statement.
|
long |
executeLargeUpdate() |
protected long[] |
executePreparedBatchAsMultiStatement(int batchTimeout)
Rewrites the already prepared statement into a multi-statement query and executes the entire batch using this new statement.
|
java.sql.ResultSet |
executeQuery() |
int |
executeUpdate() |
protected long |
executeUpdateInternal(boolean clearBatchedGeneratedKeysAndWarnings,
boolean isBatch) |
protected long |
executeUpdateInternal(QueryBindings bindings,
boolean isReallyBatch)
Added to allow batch-updates
|
byte[] |
getBytesRepresentation(int parameterIndex) |
int |
getCoreParameterIndex(int paramIndex) |
protected static ClientPreparedStatement |
getInstance(JdbcConnection conn,
java.lang.String sql,
java.lang.String db)
Creates a prepared statement instance
|
protected static ClientPreparedStatement |
getInstance(JdbcConnection conn,
java.lang.String sql,
java.lang.String db,
QueryInfo cachedQueryInfo)
Creates a prepared statement instance
|
java.sql.ResultSetMetaData |
getMetaData() |
ParameterBindings |
getParameterBindings() |
protected int |
getParameterIndexOffset()
For calling stored functions, this will be -1 as Connector/J does not count
the first '?' parameter marker, but JDBC counts it * as 1, otherwise it will return 0
|
java.sql.ParameterMetaData |
getParameterMetaData() |
java.lang.String |
getPreparedSql() |
QueryBindings |
getQueryBindings() |
QueryInfo |
getQueryInfo() |
int |
getUpdateCount() |
protected void |
initQuery() |
boolean |
isNull(int paramIndex) |
protected boolean |
isResultSetProducingQuery()
Checks if the given SQL query is a result set producing query.
|
protected ClientPreparedStatement |
prepareBatchedInsertSQL(JdbcConnection localConn,
int numBatches)
Returns a prepared statement for the number of batched parameters, used when re-writing batch INSERTs.
|
void |
realClose(boolean calledExplicitly,
boolean closeOpenResults)
Closes this statement, and frees resources.
|
void |
setArray(int i,
java.sql.Array x) |
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x) |
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length) |
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
long length) |
void |
setBigDecimal(int parameterIndex,
java.math.BigDecimal x) |
void |
setBigInteger(int parameterIndex,
java.math.BigInteger x) |
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x) |
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length) |
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
long length) |
void |
setBlob(int i,
java.sql.Blob x) |
void |
setBlob(int parameterIndex,
java.io.InputStream inputStream) |
void |
setBlob(int parameterIndex,
java.io.InputStream inputStream,
long length) |
void |
setBoolean(int parameterIndex,
boolean x) |
void |
setByte(int parameterIndex,
byte x) |
void |
setBytes(int parameterIndex,
byte[] x) |
void |
setBytes(int parameterIndex,
byte[] x,
boolean escapeIfNeeded) |
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader) |
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length) |
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setClob(int i,
java.sql.Clob x) |
void |
setClob(int parameterIndex,
java.io.Reader reader) |
void |
setClob(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setDate(int parameterIndex,
java.sql.Date x) |
void |
setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal) |
void |
setDouble(int parameterIndex,
double x) |
void |
setFloat(int parameterIndex,
float x) |
void |
setInt(int parameterIndex,
int x) |
void |
setLong(int parameterIndex,
long x) |
void |
setNCharacterStream(int parameterIndex,
java.io.Reader value) |
void |
setNCharacterStream(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setNClob(int parameterIndex,
java.sql.NClob value) |
void |
setNClob(int parameterIndex,
java.io.Reader reader) |
void |
setNClob(int parameterIndex,
java.io.Reader reader,
long length) |
void |
setNString(int parameterIndex,
java.lang.String x)
Set a parameter to a Java String value.
|
void |
setNull(int parameterIndex,
int sqlType) |
void |
setNull(int parameterIndex,
int sqlType,
java.lang.String typeName) |
void |
setNull(int parameterIndex,
MysqlType mysqlType) |
void |
setObject(int parameterIndex,
java.lang.Object parameterObj) |
void |
setObject(int parameterIndex,
java.lang.Object parameterObj,
int targetSqlType) |
void |
setObject(int parameterIndex,
java.lang.Object parameterObj,
int targetSqlType,
int scale) |
void |
setObject(int parameterIndex,
java.lang.Object parameterObj,
java.sql.SQLType targetSqlType) |
void |
setObject(int parameterIndex,
java.lang.Object x,
java.sql.SQLType targetSqlType,
int scaleOrLength) |
protected int |
setOneBatchedParameterSet(java.sql.PreparedStatement batchedStatement,
int batchedParamIndex,
java.lang.Object paramSet) |
void |
setRef(int i,
java.sql.Ref x) |
protected void |
setRetrieveGeneratedKeys(boolean flag) |
void |
setRowId(int parameterIndex,
java.sql.RowId x) |
void |
setShort(int parameterIndex,
short x) |
void |
setSQLXML(int parameterIndex,
java.sql.SQLXML xmlObject) |
void |
setString(int parameterIndex,
java.lang.String x) |
void |
setTime(int parameterIndex,
java.sql.Time x) |
void |
setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal) |
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x) |
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal) |
void |
setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
Deprecated.
|
void |
setURL(int parameterIndex,
java.net.URL arg) |
java.lang.String |
toString()
Returns this PreparedStatement represented as a string.
|
addBatch, cancel, checkCancelTimeout, checkClosed, checkNullOrEmptyQuery, clearAttributes, clearBatchedArgs, clearWarnings, close, closeAllOpenResults, closeOnCompletion, closeQuery, containsOnDuplicateKeyInString, createStreamingResultSet, disableStreamingResults, doPingInstead, enableStreamingResults, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeSimpleNonQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdateInternal, generatePingResultSet, getBatchedArgs, getBatchedGeneratedKeys, getBatchedGeneratedKeys, getCancelTimeoutMutex, getConnection, getCurrentDatabase, getExceptionInterceptor, getExecuteTime, getFetchDirection, getFetchSize, getGeneratedKeys, getGeneratedKeysInternal, getGeneratedKeysInternal, getId, getLargeMaxRows, getLargeUpdateCount, getLastInsertID, getLocalInfileInputStream, getLongUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getOpenResultSetCount, getQuery, getQueryAttributesBindings, getQueryTimeout, getResultFetchSize, getResultSet, getResultSetConcurrency, getResultSetFactory, getResultSetHoldability, getResultSetInternal, getResultSetType, getResultType, getServerStatementId, getSession, getStatementExecuting, getTimeoutInMillis, getWarnings, handleExceptionForBatch, hasDeadlockOrTimeoutRolledBackTx, implicitlyCloseAllOpenResults, isClearWarningsCalled, isClosed, isCloseOnCompletion, isNonResultSetProducingQuery, isPoolable, isResultSetProducingQuery, isWrapperFor, processMultiCountsAndKeys, removeOpenResultSet, resetCancelledState, setAttribute, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setCursorName, setEscapeProcessing, setExecuteTime, setFetchDirection, setFetchSize, setHoldResultsOpenOverClose, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPingTarget, setPoolable, setQueryTimeout, setResultFetchSize, setResultType, setTimeoutInMillis, setupStreamingTimeout, startQueryTimer, statementBegins, stopQueryTimer, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearAttributes, disableStreamingResults, enableStreamingResults, getExceptionInterceptor, getLocalInfileInputStream, getOpenResultSetCount, getQuery, getResultSetInternal, removeOpenResultSet, setAttribute, setHoldResultsOpenOverClose, setLocalInfileInputStream, setPingTargetcancel, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutaddBatch, checkCancelTimeout, clearBatchedArgs, closeQuery, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getExecuteTime, getId, getQueryAttributesBindings, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setExecuteTime, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, statementBegins, stopQueryTimerprotected boolean batchHasPlainStatements
protected MysqlParameterMetadata parameterMetaData
protected java.lang.String batchedValuesClause
protected int rewrittenBatchSize
protected ClientPreparedStatement(JdbcConnection conn, java.lang.String db) throws java.sql.SQLException
conn - the connection that created usdb - the database in use when we were createdjava.sql.SQLException - if an error occurspublic ClientPreparedStatement(JdbcConnection conn, java.lang.String sql, java.lang.String db) throws java.sql.SQLException
conn - the connection creating this statementsql - the SQL for this statementdb - the database this statement should be issued againstjava.sql.SQLException - if a database error occurs.public ClientPreparedStatement(JdbcConnection conn, java.lang.String sql, java.lang.String db, QueryInfo cachedQueryInfo) throws java.sql.SQLException
conn - the connection creating this statementsql - the SQL for this statementdb - the database this statement should be issued againstcachedQueryInfo - already created QueryInfo or null.java.sql.SQLException - if a database access error occursprotected static ClientPreparedStatement getInstance(JdbcConnection conn, java.lang.String sql, java.lang.String db) throws java.sql.SQLException
conn - the connection creating this statementsql - the SQL for this statementdb - the database this statement should be issued againstjava.sql.SQLException - if a database access error occursprotected static ClientPreparedStatement getInstance(JdbcConnection conn, java.lang.String sql, java.lang.String db, QueryInfo cachedQueryInfo) throws java.sql.SQLException
conn - the connection creating this statementsql - the SQL for this statementdb - the database this statement should be issued againstcachedQueryInfo - already created QueryInfo or null.java.sql.SQLException - if a database access error occursprotected void initQuery()
initQuery in class StatementImplpublic QueryBindings getQueryBindings()
getQueryBindings in interface JdbcPreparedStatementpublic java.lang.String toString()
toString in class java.lang.Objectpublic void addBatch()
throws java.sql.SQLException
addBatch in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void addBatch(java.lang.String sql)
throws java.sql.SQLException
addBatch in interface java.sql.StatementaddBatch in class StatementImpljava.sql.SQLExceptionpublic void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.StatementclearBatch in class StatementImpljava.sql.SQLExceptionpublic void clearParameters()
throws java.sql.SQLException
clearParameters in interface java.sql.PreparedStatementjava.sql.SQLExceptionprotected boolean checkReadOnlySafeStatement()
throws java.sql.SQLException
java.sql.SQLException - if a database access error occurs or this method is called on a closed PreparedStatementpublic boolean execute()
throws java.sql.SQLException
execute in interface java.sql.PreparedStatementjava.sql.SQLExceptionprotected long[] executeBatchInternal()
throws java.sql.SQLException
executeBatchInternal in class StatementImpljava.sql.SQLExceptionprotected long[] executePreparedBatchAsMultiStatement(int batchTimeout)
throws java.sql.SQLException
batchTimeout - timeout for the batch executionjava.sql.SQLException - if a database access error occurs or this method is called on a closed PreparedStatementprotected int setOneBatchedParameterSet(java.sql.PreparedStatement batchedStatement,
int batchedParamIndex,
java.lang.Object paramSet)
throws java.sql.SQLException
java.sql.SQLExceptionprotected long[] executeBatchWithMultiValuesClause(int batchTimeout)
throws java.sql.SQLException
batchTimeout - timeout for the batch executionjava.sql.SQLException - if a database access error occurs or this method is called on a closed PreparedStatementprotected long[] executeBatchSerially(int batchTimeout)
throws java.sql.SQLException
batchTimeout - timeout for the batch executionjava.sql.SQLException - if an error occursprotected <M extends Message> ResultSetInternalMethods executeInternal(int maxRowsToRetrieve, M sendPacket, boolean createStreamingResultSet, boolean queryIsSelectOnly, ColumnDefinition metadata, boolean isBatch) throws java.sql.SQLException
M - extends MessagemaxRowsToRetrieve - 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?metadata - use this metadata instead of the one provided on wireisBatch - is this a batch query?java.sql.SQLException - if an error occurs.public java.sql.ResultSet executeQuery()
throws java.sql.SQLException
executeQuery in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic int executeUpdate()
throws java.sql.SQLException
executeUpdate in interface java.sql.PreparedStatementjava.sql.SQLExceptionprotected long executeUpdateInternal(boolean clearBatchedGeneratedKeysAndWarnings,
boolean isBatch)
throws java.sql.SQLException
java.sql.SQLExceptionprotected long executeUpdateInternal(QueryBindings bindings, boolean isReallyBatch) throws java.sql.SQLException
bindings - bindings objectisReallyBatch - is it a batched statement?java.sql.SQLException - if a database error occursprotected boolean containsOnDuplicateKeyUpdate()
protected ClientPreparedStatement prepareBatchedInsertSQL(JdbcConnection localConn, int numBatches) throws java.sql.SQLException
localConn - the connection creating this statementnumBatches - number of entries in a batchjava.sql.SQLException - if a database access error occurs or this method is called on a closed PreparedStatementprotected void setRetrieveGeneratedKeys(boolean flag)
throws java.sql.SQLException
java.sql.SQLExceptionpublic byte[] getBytesRepresentation(int parameterIndex)
throws java.sql.SQLException
getBytesRepresentation in interface JdbcPreparedStatementjava.sql.SQLExceptionpublic java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.PreparedStatementjava.sql.SQLExceptionprotected boolean isResultSetProducingQuery()
true if the query produces a result set, false otherwise.public java.sql.ParameterMetaData getParameterMetaData()
throws java.sql.SQLException
getParameterMetaData in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic QueryInfo getQueryInfo()
getQueryInfo in interface JdbcPreparedStatementpublic boolean isNull(int paramIndex)
throws java.sql.SQLException
isNull in interface JdbcPreparedStatementjava.sql.SQLExceptionpublic void realClose(boolean calledExplicitly,
boolean closeOpenResults)
throws java.sql.SQLException
StatementImplrealClose in interface JdbcPreparedStatementrealClose in class StatementImplcalledExplicitly - was this called from close()?closeOpenResults - should open result sets be closed?java.sql.SQLException - if an error occurspublic java.lang.String getPreparedSql()
getPreparedSql in interface JdbcPreparedStatementpublic int getUpdateCount()
throws java.sql.SQLException
getUpdateCount in interface java.sql.StatementgetUpdateCount in class StatementImpljava.sql.SQLExceptionpublic long executeLargeUpdate()
throws java.sql.SQLException
executeLargeUpdate in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic ParameterBindings getParameterBindings() throws java.sql.SQLException
getParameterBindings in interface JdbcPreparedStatementjava.sql.SQLExceptionprotected int getParameterIndexOffset()
protected void checkBounds(int paramIndex,
int parameterIndexOffset)
throws java.sql.SQLException
java.sql.SQLExceptionpublic final int getCoreParameterIndex(int paramIndex)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setArray(int i,
java.sql.Array x)
throws java.sql.SQLException
setArray in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setAsciiStream(int parameterIndex,
java.io.InputStream x)
throws java.sql.SQLException
setAsciiStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
setAsciiStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setAsciiStream(int parameterIndex,
java.io.InputStream x,
long length)
throws java.sql.SQLException
setAsciiStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBigDecimal(int parameterIndex,
java.math.BigDecimal x)
throws java.sql.SQLException
setBigDecimal in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBinaryStream(int parameterIndex,
java.io.InputStream x)
throws java.sql.SQLException
setBinaryStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
setBinaryStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBinaryStream(int parameterIndex,
java.io.InputStream x,
long length)
throws java.sql.SQLException
setBinaryStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBlob(int i,
java.sql.Blob x)
throws java.sql.SQLException
setBlob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBlob(int parameterIndex,
java.io.InputStream inputStream)
throws java.sql.SQLException
setBlob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBlob(int parameterIndex,
java.io.InputStream inputStream,
long length)
throws java.sql.SQLException
setBlob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBoolean(int parameterIndex,
boolean x)
throws java.sql.SQLException
setBoolean in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setByte(int parameterIndex,
byte x)
throws java.sql.SQLException
setByte in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBytes(int parameterIndex,
byte[] x)
throws java.sql.SQLException
setBytes in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBytes(int parameterIndex,
byte[] x,
boolean escapeIfNeeded)
throws java.sql.SQLException
setBytes in interface JdbcPreparedStatementjava.sql.SQLExceptionpublic void setCharacterStream(int parameterIndex,
java.io.Reader reader)
throws java.sql.SQLException
setCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length)
throws java.sql.SQLException
setCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setCharacterStream(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setClob(int parameterIndex,
java.io.Reader reader)
throws java.sql.SQLException
setClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setClob(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setClob(int i,
java.sql.Clob x)
throws java.sql.SQLException
setClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setDate(int parameterIndex,
java.sql.Date x)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
throws java.sql.SQLException
setDate in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setDouble(int parameterIndex,
double x)
throws java.sql.SQLException
setDouble in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setFloat(int parameterIndex,
float x)
throws java.sql.SQLException
setFloat in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setInt(int parameterIndex,
int x)
throws java.sql.SQLException
setInt in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setLong(int parameterIndex,
long x)
throws java.sql.SQLException
setLong in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setBigInteger(int parameterIndex,
java.math.BigInteger x)
throws java.sql.SQLException
setBigInteger in interface JdbcPreparedStatementjava.sql.SQLExceptionpublic void setNCharacterStream(int parameterIndex,
java.io.Reader value)
throws java.sql.SQLException
setNCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNCharacterStream(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setNCharacterStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNClob(int parameterIndex,
java.io.Reader reader)
throws java.sql.SQLException
setNClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNClob(int parameterIndex,
java.io.Reader reader,
long length)
throws java.sql.SQLException
setNClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNClob(int parameterIndex,
java.sql.NClob value)
throws java.sql.SQLException
setNClob in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNString(int parameterIndex,
java.lang.String x)
throws java.sql.SQLException
setNString in interface java.sql.PreparedStatementparameterIndex - the first parameter is 1...x - the parameter valuejava.sql.SQLException - if a database access error occurspublic void setNull(int parameterIndex,
int sqlType)
throws java.sql.SQLException
setNull in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNull(int parameterIndex,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
setNull in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setNull(int parameterIndex,
MysqlType mysqlType)
throws java.sql.SQLException
setNull in interface JdbcPreparedStatementjava.sql.SQLExceptionpublic void setObject(int parameterIndex,
java.lang.Object parameterObj)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setObject(int parameterIndex,
java.lang.Object parameterObj,
int targetSqlType)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setObject(int parameterIndex,
java.lang.Object parameterObj,
java.sql.SQLType targetSqlType)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setObject(int parameterIndex,
java.lang.Object parameterObj,
int targetSqlType,
int scale)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setObject(int parameterIndex,
java.lang.Object x,
java.sql.SQLType targetSqlType,
int scaleOrLength)
throws java.sql.SQLException
setObject in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setRef(int i,
java.sql.Ref x)
throws java.sql.SQLException
setRef in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setRowId(int parameterIndex,
java.sql.RowId x)
throws java.sql.SQLException
setRowId in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setShort(int parameterIndex,
short x)
throws java.sql.SQLException
setShort in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setSQLXML(int parameterIndex,
java.sql.SQLXML xmlObject)
throws java.sql.SQLException
setSQLXML in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setString(int parameterIndex,
java.lang.String x)
throws java.sql.SQLException
setString in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setTime(int parameterIndex,
java.sql.Time x)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
throws java.sql.SQLException
setTime in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setTimestamp(int parameterIndex,
java.sql.Timestamp x)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
throws java.sql.SQLException
setTimestamp in interface java.sql.PreparedStatementjava.sql.SQLException@Deprecated
public void setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
setUnicodeStream in interface java.sql.PreparedStatementjava.sql.SQLExceptionpublic void setURL(int parameterIndex,
java.net.URL arg)
throws java.sql.SQLException
setURL in interface java.sql.PreparedStatementjava.sql.SQLException