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, sendFractionalSeconds, session, updateCount, USES_VARIABLES_FALSE, USES_VARIABLES_TRUE, USES_VARIABLES_UNKNOWN, useUsageAdvisor, warningChain
MAX_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,
ParseInfo cachedParseInfo)
Creates a new PreparedStatement object.
|
Modifier and Type | Method and Description |
---|---|
void |
addBatch() |
void |
addBatch(java.lang.String sql) |
java.lang.String |
asSql() |
java.lang.String |
asSql(boolean quoteStreamsAndUnknowns) |
protected void |
checkBounds(int paramIndex,
int parameterIndexOffset) |
protected boolean |
checkReadOnlySafeStatement()
Check to see if the statement is safe for read-only slaves after failover.
|
void |
clearBatch() |
void |
clearParameters() |
protected boolean |
containsOnDuplicateKeyUpdateInSQL() |
boolean |
execute() |
protected long[] |
executeBatchedInserts(int batchTimeout)
Rewrites the already prepared statement into a multi-value insert
statement of 'statementsPerBatch' values and executes the entire batch
using this new statement.
|
protected long[] |
executeBatchInternal() |
protected long[] |
executeBatchSerially(int batchTimeout)
Executes the current batch of statements by executing them one-by-one.
|
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 of 'statementsPerBatch' values 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) |
protected 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,
ParseInfo cachedParseInfo)
Creates a prepared statement instance
|
java.sql.ResultSetMetaData |
getMetaData() |
byte[] |
getOrigBytes(int parameterIndex) |
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() |
ParseInfo |
getParseInfo() |
java.lang.String |
getPreparedSql() |
QueryBindings<?> |
getQueryBindings() |
int |
getUpdateCount() |
protected void |
initQuery() |
boolean |
isNull(int paramIndex) |
protected boolean |
isSelectQuery() |
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 checkForIntroducer,
boolean escapeForMBChars) |
void |
setBytesNoEscape(int parameterIndex,
byte[] parameterAsBytes)
Used by updatable result sets for refreshRow() because the parameter has
already been escaped for updater or inserter prepared statements.
|
void |
setBytesNoEscapeNoQuotes(int parameterIndex,
byte[] parameterAsBytes) |
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 |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar targetCalendar,
int fractionalLength) |
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, checkForDml, checkNullOrEmptyQuery, 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, findStartOfStatement, 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, getQueryTimeout, getResultFetchSize, getResultSet, getResultSetConcurrency, getResultSetFactory, getResultSetHoldability, getResultSetInternal, getResultSetType, getResultType, getServerStatementId, getSession, getStatementExecuting, getTimeoutInMillis, getWarnings, handleExceptionForBatch, hasDeadlockOrTimeoutRolledBackTx, implicitlyCloseAllOpenResults, isClearWarningsCalled, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, processMultiCountsAndKeys, removeOpenResultSet, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setCursorName, setEscapeProcessing, setExecuteTime, setFetchDirection, setFetchSize, setHoldResultsOpenOverClose, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPingTarget, setPoolable, setQueryTimeout, setResultFetchSize, setResultType, setTimeoutInMillis, setupStreamingTimeout, startQueryTimer, statementBegins, stopQueryTimer, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
disableStreamingResults, enableStreamingResults, getExceptionInterceptor, getLocalInfileInputStream, getOpenResultSetCount, getQuery, removeOpenResultSet, setHoldResultsOpenOverClose, setLocalInfileInputStream, setPingTarget
cancel, 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, setQueryTimeout
addBatch, checkCancelTimeout, clearBatchedArgs, closeQuery, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getExecuteTime, getId, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setExecuteTime, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, statementBegins, stopQueryTimer
protected 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, ParseInfo cachedParseInfo) throws java.sql.SQLException
conn
- the connection creating this statementsql
- the SQL for this statementdb
- the database this statement should be issued againstcachedParseInfo
- already created parseInfo 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, ParseInfo cachedParseInfo) throws java.sql.SQLException
conn
- the connection creating this statementsql
- the SQL for this statementdb
- the database this statement should be issued againstcachedParseInfo
- already created parseInfo or null.java.sql.SQLException
- if a database access error occursprotected void initQuery()
initQuery
in class StatementImpl
public QueryBindings<?> getQueryBindings()
getQueryBindings
in interface JdbcPreparedStatement
public java.lang.String toString()
toString
in class java.lang.Object
public void addBatch() throws java.sql.SQLException
addBatch
in interface java.sql.PreparedStatement
java.sql.SQLException
public void addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
addBatch
in class StatementImpl
java.sql.SQLException
public java.lang.String asSql() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String asSql(boolean quoteStreamsAndUnknowns) throws java.sql.SQLException
java.sql.SQLException
public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
clearBatch
in class StatementImpl
java.sql.SQLException
public void clearParameters() throws java.sql.SQLException
clearParameters
in interface java.sql.PreparedStatement
java.sql.SQLException
protected 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.PreparedStatement
java.sql.SQLException
protected long[] executeBatchInternal() throws java.sql.SQLException
executeBatchInternal
in class StatementImpl
java.sql.SQLException
protected 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.SQLException
protected long[] executeBatchedInserts(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 Message
maxRowsToRetrieve
- 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.PreparedStatement
java.sql.SQLException
public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface java.sql.PreparedStatement
java.sql.SQLException
protected long executeUpdateInternal(boolean clearBatchedGeneratedKeysAndWarnings, boolean isBatch) throws java.sql.SQLException
java.sql.SQLException
protected 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 containsOnDuplicateKeyUpdateInSQL()
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.SQLException
public byte[] getBytesRepresentation(int parameterIndex) throws java.sql.SQLException
getBytesRepresentation
in interface JdbcPreparedStatement
java.sql.SQLException
public byte[] getOrigBytes(int parameterIndex) throws java.sql.SQLException
getOrigBytes
in interface JdbcPreparedStatement
java.sql.SQLException
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
protected boolean isSelectQuery() throws java.sql.SQLException
java.sql.SQLException
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
getParameterMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
public ParseInfo getParseInfo()
getParseInfo
in interface JdbcPreparedStatement
public boolean isNull(int paramIndex) throws java.sql.SQLException
isNull
in interface JdbcPreparedStatement
java.sql.SQLException
public void realClose(boolean calledExplicitly, boolean closeOpenResults) throws java.sql.SQLException
StatementImpl
realClose
in interface JdbcPreparedStatement
realClose
in class StatementImpl
calledExplicitly
- 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 JdbcPreparedStatement
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
getUpdateCount
in class StatementImpl
java.sql.SQLException
public long executeLargeUpdate() throws java.sql.SQLException
executeLargeUpdate
in interface java.sql.PreparedStatement
java.sql.SQLException
public ParameterBindings getParameterBindings() throws java.sql.SQLException
getParameterBindings
in interface JdbcPreparedStatement
java.sql.SQLException
protected int getParameterIndexOffset()
protected void checkBounds(int paramIndex, int parameterIndexOffset) throws java.sql.SQLException
java.sql.SQLException
protected final int getCoreParameterIndex(int paramIndex) throws java.sql.SQLException
java.sql.SQLException
public void setArray(int i, java.sql.Array x) throws java.sql.SQLException
setArray
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setAsciiStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setAsciiStream(int parameterIndex, java.io.InputStream x, long length) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws java.sql.SQLException
setBigDecimal
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int parameterIndex, java.io.InputStream x) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int parameterIndex, java.io.InputStream x, long length) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int i, java.sql.Blob x) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int parameterIndex, java.io.InputStream inputStream) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int parameterIndex, java.io.InputStream inputStream, long length) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBoolean(int parameterIndex, boolean x) throws java.sql.SQLException
setBoolean
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setByte(int parameterIndex, byte x) throws java.sql.SQLException
setByte
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBytes(int parameterIndex, byte[] x) throws java.sql.SQLException
setBytes
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBytes(int parameterIndex, byte[] x, boolean checkForIntroducer, boolean escapeForMBChars) throws java.sql.SQLException
setBytes
in interface JdbcPreparedStatement
java.sql.SQLException
public void setBytesNoEscape(int parameterIndex, byte[] parameterAsBytes) throws java.sql.SQLException
JdbcPreparedStatement
setBytesNoEscape
in interface JdbcPreparedStatement
parameterIndex
- the parameter to set.parameterAsBytes
- the parameter as a string.java.sql.SQLException
- if an error occurspublic void setBytesNoEscapeNoQuotes(int parameterIndex, byte[] parameterAsBytes) throws java.sql.SQLException
setBytesNoEscapeNoQuotes
in interface JdbcPreparedStatement
java.sql.SQLException
public void setCharacterStream(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setCharacterStream(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int i, java.sql.Clob x) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDate(int parameterIndex, java.sql.Date x) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDouble(int parameterIndex, double x) throws java.sql.SQLException
setDouble
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setFloat(int parameterIndex, float x) throws java.sql.SQLException
setFloat
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setInt(int parameterIndex, int x) throws java.sql.SQLException
setInt
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setLong(int parameterIndex, long x) throws java.sql.SQLException
setLong
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBigInteger(int parameterIndex, java.math.BigInteger x) throws java.sql.SQLException
setBigInteger
in interface JdbcPreparedStatement
java.sql.SQLException
public void setNCharacterStream(int parameterIndex, java.io.Reader value) throws java.sql.SQLException
setNCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNCharacterStream(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
setNCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNClob(int parameterIndex, java.io.Reader reader) throws java.sql.SQLException
setNClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNClob(int parameterIndex, java.io.Reader reader, long length) throws java.sql.SQLException
setNClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNClob(int parameterIndex, java.sql.NClob value) throws java.sql.SQLException
setNClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNString(int parameterIndex, java.lang.String x) throws java.sql.SQLException
setNString
in interface java.sql.PreparedStatement
parameterIndex
- 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.PreparedStatement
java.sql.SQLException
public void setNull(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLException
setNull
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNull(int parameterIndex, MysqlType mysqlType) throws java.sql.SQLException
setNull
in interface JdbcPreparedStatement
java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object parameterObj) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object parameterObj, int targetSqlType) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object parameterObj, java.sql.SQLType targetSqlType) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object parameterObj, int targetSqlType, int scale) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object x, java.sql.SQLType targetSqlType, int scaleOrLength) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setRef(int i, java.sql.Ref x) throws java.sql.SQLException
setRef
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setRowId(int parameterIndex, java.sql.RowId x) throws java.sql.SQLException
setRowId
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setShort(int parameterIndex, short x) throws java.sql.SQLException
setShort
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setSQLXML(int parameterIndex, java.sql.SQLXML xmlObject) throws java.sql.SQLException
setSQLXML
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setString(int parameterIndex, java.lang.String x) throws java.sql.SQLException
setString
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTime(int parameterIndex, java.sql.Time x) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar targetCalendar, int fractionalLength) throws java.sql.SQLException
java.sql.SQLException
@Deprecated public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setUnicodeStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setURL(int parameterIndex, java.net.URL arg) throws java.sql.SQLException
setURL
in interface java.sql.PreparedStatement
java.sql.SQLException