com.mysql.jdbc
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.ParseInfo
StatementImpl.CancelTask
Modifier and Type | Field and Description |
---|---|
protected static int |
BLOB_STREAM_READ_BUF_SIZE |
protected boolean |
isCached |
batchCommandIndex, batchedValuesClause, batchHasPlainStatements, firstCharOfStmt, hasLimitClause, isLoadDataQuery, isNull, numberOfExecutions, originalSql, parameterCount, parameterMetaData, parameterTypes, parseInfo, rewrittenBatchSize, serverSupportsFracSecs, useTrueBoolean, usingAnsiMode
batchedArgs, batchedGeneratedKeys, cancelTimeoutMutex, charConverter, charEncoding, clearWarningsCalled, connection, connectionId, continueBatchOnError, currentCatalog, doEscapeProcessing, eventSink, generatedKeysResults, holdResultsOpenOverClose, isClosed, lastInsertId, lastQueryIsOnDupKeyUpdate, maxFieldSize, maxRows, maxRowsChanged, 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.
|
protected void |
setTimeInternal(int parameterIndex,
java.sql.Time x,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward)
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 |
setTimestampInternal(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward) |
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, setRetrieveGeneratedKeys
cancel, 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, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, processMultiCountsAndKeys, removeOpenResultSet, resetCancelledState, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setHoldResultsOpenOverClose, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPingTarget, setPoolable, setQueryTimeout, setResultSetConcurrency, setResultSetType, statementBegins, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cancel, clearWarnings, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
protected 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.SQLException
public void addBatch() throws java.sql.SQLException
addBatch
in interface java.sql.PreparedStatement
addBatch
in class PreparedStatement
java.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 PreparedStatement
java.sql.SQLException
protected MySQLConnection checkClosed() throws java.sql.SQLException
StatementImpl
checkClosed
in class StatementImpl
java.sql.SQLException
- if this statement has been closedpublic void clearParameters() throws java.sql.SQLException
PreparedStatement
clearParameters
in interface java.sql.PreparedStatement
clearParameters
in class PreparedStatement
java.sql.SQLException
- if a database access error occursPreparedStatement.clearParameters()
protected void setClosed(boolean flag)
public void close() throws java.sql.SQLException
StatementImpl
Note: 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.sql.Statement
close
in class StatementImpl
java.sql.SQLException
- if a database access error occursStatement.close()
protected int[] executeBatchSerially(int batchTimeout) throws java.sql.SQLException
PreparedStatement
executeBatchSerially
in class PreparedStatement
java.sql.SQLException
- if an error occursprotected ResultSetInternalMethods executeInternal(int maxRowsToRetrieve, Buffer sendPacket, boolean createStreamingResultSet, boolean queryIsSelectOnly, Field[] metadataFromCache, boolean isBatch) throws java.sql.SQLException
PreparedStatement
executeInternal
in class PreparedStatement
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?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
PreparedStatement
fillSendPacket
in class PreparedStatement
java.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
PreparedStatement
fillSendPacket
in class PreparedStatement
batchedParameterStrings
- 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.SQLException
public ServerPreparedStatement.BindValue[] getParameterBindValues()
PreparedStatement.executeBatch()
,
addBatch()
byte[] getBytes(int parameterIndex) throws java.sql.SQLException
java.sql.SQLException
com.mysql.jdbc.PreparedStatement#getBytes(int)
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
PreparedStatement
getMetaData
in interface java.sql.PreparedStatement
getMetaData
in class PreparedStatement
java.sql.SQLException
- if a database-access error occurs.PreparedStatement.getMetaData()
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
getParameterMetaData
in interface java.sql.PreparedStatement
getParameterMetaData
in class PreparedStatement
java.sql.SQLException
PreparedStatement.getParameterMetaData()
boolean isNull(int paramIndex)
isNull
in class PreparedStatement
PreparedStatement.isNull(int)
protected void realClose(boolean calledExplicitly, boolean closeOpenResults) throws java.sql.SQLException
realClose
in class PreparedStatement
calledExplicitly
- 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
PreparedStatement
setArray
in interface java.sql.PreparedStatement
setArray
in class PreparedStatement
i
- the first parameter is 1, the second is 2, ...x
- an object representing an SQL arrayjava.sql.SQLException
- because this method is not implemented.NotImplemented
- DOCUMENT ME!PreparedStatement.setArray(int, java.sql.Array)
public void setAsciiStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
PreparedStatement
Note: 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.PreparedStatement
setAsciiStream
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setBigDecimal
in interface java.sql.PreparedStatement
setBigDecimal
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
Note: 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.PreparedStatement
setBinaryStream
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setBlob
in interface java.sql.PreparedStatement
setBlob
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setBoolean
in interface java.sql.PreparedStatement
setBoolean
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setByte
in interface java.sql.PreparedStatement
setByte
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setBytes
in interface java.sql.PreparedStatement
setBytes
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
Note: 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.PreparedStatement
setCharacterStream
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setClob
in interface java.sql.PreparedStatement
setClob
in class PreparedStatement
parameterIndex
- 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.PreparedStatement
setDate
in class PreparedStatement
parameterIndex
- 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.PreparedStatement
setDate
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setDouble
in interface java.sql.PreparedStatement
setDouble
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setFloat
in interface java.sql.PreparedStatement
setFloat
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setInt
in interface java.sql.PreparedStatement
setInt
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setLong
in interface java.sql.PreparedStatement
setLong
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
Note: You must specify the parameters SQL type (although MySQL ignores it)
setNull
in interface java.sql.PreparedStatement
setNull
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
Note: You must specify the parameter's SQL type.
setNull
in interface java.sql.PreparedStatement
setNull
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setRef
in interface java.sql.PreparedStatement
setRef
in class PreparedStatement
i
- 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 occursNotImplemented
- DOCUMENT ME!PreparedStatement.setRef(int, java.sql.Ref)
public void setShort(int parameterIndex, short x) throws java.sql.SQLException
PreparedStatement
setShort
in interface java.sql.PreparedStatement
setShort
in class PreparedStatement
parameterIndex
- 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
PreparedStatement
setString
in interface java.sql.PreparedStatement
setString
in class PreparedStatement
parameterIndex
- 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.PreparedStatement
setTime
in class PreparedStatement
parameterIndex
- 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.PreparedStatement
setTime
in class PreparedStatement
parameterIndex
- the first parameter is 1...));x
- the parameter valuecal
- the timezone to usejava.sql.SQLException
- if a database access error occursprotected void setTimeInternal(int parameterIndex, java.sql.Time x, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward) throws java.sql.SQLException
parameterIndex
- the first parameter is 1...));x
- the parameter valuetz
- 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.PreparedStatement
setTimestamp
in class PreparedStatement
parameterIndex
- 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.PreparedStatement
setTimestamp
in class PreparedStatement
parameterIndex
- 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 setTimestampInternal(int parameterIndex, java.sql.Timestamp x, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward) throws java.sql.SQLException
java.sql.SQLException
protected void setType(ServerPreparedStatement.BindValue oldValue, int bufferType) throws java.sql.SQLException
java.sql.SQLException
public void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length) throws java.sql.SQLException
setUnicodeStream
in interface java.sql.PreparedStatement
setUnicodeStream
in class PreparedStatement
parameterIndex
- DOCUMENT ME!x
- DOCUMENT ME!length
- DOCUMENT ME!java.sql.SQLException
- DOCUMENT ME!NotImplemented
- DOCUMENT ME!PreparedStatement.setUnicodeStream(int,
java.io.InputStream, int)
public void setURL(int parameterIndex, java.net.URL x) throws java.sql.SQLException
setURL
in interface java.sql.PreparedStatement
setURL
in class PreparedStatement
java.sql.SQLException
PreparedStatement.setURL(int, java.net.URL)
public java.lang.String toString()
PreparedStatement
toString
in class PreparedStatement
Object.toString()
protected long getServerStatementId()
public boolean canRewriteAsMultiValueInsertAtSqlLevel() throws java.sql.SQLException
canRewriteAsMultiValueInsertAtSqlLevel
in class PreparedStatement
java.sql.SQLException
public boolean canRewriteAsMultivalueInsertStatement() throws java.sql.SQLException
java.sql.SQLException
protected int getLocationOfOnDuplicateKeyUpdate() throws java.sql.SQLException
getLocationOfOnDuplicateKeyUpdate
in class PreparedStatement
java.sql.SQLException
protected boolean isOnDuplicateKeyUpdate() throws java.sql.SQLException
java.sql.SQLException
protected long[] computeMaxParameterSetSizeAndBatchSize(int numBatchedArgs) throws java.sql.SQLException
computeMaxParameterSetSizeAndBatchSize
in class PreparedStatement
java.sql.SQLException
protected int setOneBatchedParameterSet(java.sql.PreparedStatement batchedStatement, int batchedParamIndex, java.lang.Object paramSet) throws java.sql.SQLException
setOneBatchedParameterSet
in class PreparedStatement
java.sql.SQLException
protected boolean containsOnDuplicateKeyUpdateInSQL()
containsOnDuplicateKeyUpdateInSQL
in class PreparedStatement
protected PreparedStatement prepareBatchedInsertSQL(MySQLConnection localConn, int numBatches) throws java.sql.SQLException
PreparedStatement
prepareBatchedInsertSQL
in class PreparedStatement
java.sql.SQLException