Save This Page
Home » MySQL-JDBC-5.1.11 » com.mysql.jdbc » [javadoc | source]
com.mysql.jdbc
public class: ServerPreparedStatement [javadoc | source]
java.lang.Object
   com.mysql.jdbc.StatementImpl
      com.mysql.jdbc.PreparedStatement
         com.mysql.jdbc.ServerPreparedStatement

All Implemented Interfaces:
    PreparedStatement, Statement

Direct Known Subclasses:
    JDBC4ServerPreparedStatement

JDBC Interface for MySQL-4.1 and newer server-side PreparedStatements.
Nested Class Summary:
static class  ServerPreparedStatement.BatchedBindValues   
public static class  ServerPreparedStatement.BindValue   
Field Summary
protected static final  int BLOB_STREAM_READ_BUF_SIZE     
protected  boolean isCached     
Fields inherited from com.mysql.jdbc.PreparedStatement:
batchHasPlainStatements,  firstCharOfStmt,  hasLimitClause,  isLoadDataQuery,  numberOfExecutions,  originalSql,  parameterCount,  parameterMetaData,  parameterTypes,  parseInfo,  useTrueBoolean,  usingAnsiMode,  batchedValuesClause,  rewrittenBatchSize
Fields inherited from com.mysql.jdbc.StatementImpl:
PING_MARKER,  cancelTimeoutMutex,  statementCounter,  USES_VARIABLES_FALSE,  USES_VARIABLES_TRUE,  USES_VARIABLES_UNKNOWN,  wasCancelled,  wasCancelledByTimeout,  batchedArgs,  charConverter,  charEncoding,  connection,  connectionId,  currentCatalog,  doEscapeProcessing,  eventSink,  isClosed,  lastInsertId,  maxFieldSize,  maxRows,  maxRowsChanged,  openResults,  pedantic,  pointOfOrigin,  profileSQL,  results,  resultSetConcurrency,  resultSetType,  statementId,  timeoutInMillis,  updateCount,  useUsageAdvisor,  warningChain,  holdResultsOpenOverClose,  batchedGeneratedKeys,  retrieveGeneratedKeys,  continueBatchOnError,  pingTarget,  useLegacyDatetimeCode,  lastQueryIsOnDupKeyUpdate
Constructor:
 protected ServerPreparedStatement(ConnectionImpl conn,
    String sql,
    String catalog,
    int resultSetType,
    int resultSetConcurrency) throws SQLException 
    Creates a new ServerPreparedStatement object.
    Parameters:
    conn - the connection creating us.
    sql - the SQL containing the statement to prepare.
    catalog - the catalog in use when we were created.
    Throws:
    SQLException - If an error occurs
Method from com.mysql.jdbc.ServerPreparedStatement Summary:
addBatch,   asSql,   canRewriteAsMultiValueInsertAtSqlLevel,   canRewriteAsMultivalueInsertStatement,   checkClosed,   clearParameters,   close,   computeMaxParameterSetSizeAndBatchSize,   containsOnDuplicateKeyUpdateInSQL,   executeBatchSerially,   executeInternal,   fillSendPacket,   fillSendPacket,   getBinding,   getBytes,   getInstance,   getLocationOfOnDuplicateKeyUpdate,   getMetaData,   getParameterMetaData,   getServerStatementId,   isNull,   isOnDuplicateKeyUpdate,   prepareBatchedInsertSQL,   rePrepare,   realClose,   setArray,   setAsciiStream,   setBigDecimal,   setBinaryStream,   setBlob,   setBoolean,   setByte,   setBytes,   setCharacterStream,   setClob,   setClosed,   setDate,   setDate,   setDouble,   setFloat,   setInt,   setLong,   setNull,   setNull,   setOneBatchedParameterSet,   setRef,   setShort,   setString,   setTime,   setTime,   setTimeInternal,   setTimestamp,   setTimestamp,   setTimestampInternal,   setType,   setURL,   setUnicodeStream,   toString
Methods from com.mysql.jdbc.PreparedStatement:
addBatch,   addBatch,   asSql,   asSql,   canRewrite,   canRewriteAsMultiValueInsertAtSqlLevel,   checkReadOnlySafeStatement,   clearBatch,   clearParameters,   close,   computeBatchSize,   computeMaxParameterSetSizeAndBatchSize,   containsOnDuplicateKeyUpdateInSQL,   execute,   executeBatch,   executeBatchSerially,   executeBatchedInserts,   executeInternal,   executePreparedBatchAsMultiStatement,   executeQuery,   executeUpdate,   executeUpdate,   executeUpdate,   fillSendPacket,   fillSendPacket,   getBytesRepresentation,   getBytesRepresentationForBatch,   getInstance,   getInstance,   getInstance,   getLocationOfOnDuplicateKeyUpdate,   getMetaData,   getNonRewrittenSql,   getParameterBindings,   getParameterIndexOffset,   getParameterMetaData,   getParseInfo,   getPreparedSql,   getRewrittenBatchSize,   getUpdateCount,   getValuesClause,   isClosed,   isNull,   isSelectQuery,   prepareBatchedInsertSQL,   readFully,   realClose,   setArray,   setAsciiStream,   setAsciiStream,   setAsciiStream,   setBigDecimal,   setBinaryStream,   setBinaryStream,   setBinaryStream,   setBlob,   setBlob,   setBlob,   setBoolean,   setByte,   setBytes,   setBytes,   setBytesNoEscape,   setBytesNoEscapeNoQuotes,   setCharacterStream,   setCharacterStream,   setCharacterStream,   setClob,   setClob,   setClob,   setDate,   setDate,   setDouble,   setFloat,   setInt,   setInternal,   setInternal,   setLong,   setNCharacterStream,   setNCharacterStream,   setNClob,   setNClob,   setNString,   setNull,   setNull,   setObject,   setObject,   setObject,   setOneBatchedParameterSet,   setRef,   setResultSetConcurrency,   setResultSetType,   setRetrieveGeneratedKeys,   setShort,   setString,   setTime,   setTime,   setTimestamp,   setTimestamp,   setURL,   setUnicodeStream,   toString
Methods from com.mysql.jdbc.StatementImpl:
addBatch,   cancel,   checkClosed,   checkForDml,   checkNullOrEmptyQuery,   clearBatch,   clearWarnings,   close,   closeAllOpenResults,   containsOnDuplicateKeyInString,   createStreamingResultSet,   disableStreamingResults,   doPingInstead,   enableStreamingResults,   execute,   execute,   execute,   execute,   executeBatch,   executeQuery,   executeSimpleNonQuery,   executeUpdate,   executeUpdate,   executeUpdate,   executeUpdate,   executeUpdate,   findStartOfStatement,   generatePingResultSet,   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,   getUpdateCount,   getWarnings,   handleExceptionForBatch,   hasDeadlockOrTimeoutRolledBackTx,   isClosed,   isPoolable,   isWrapperFor,   processMultiCountsAndKeys,   realClose,   removeOpenResultSet,   resetCancelledState,   setCursorName,   setEscapeProcessing,   setFetchDirection,   setFetchSize,   setHoldResultsOpenOverClose,   setLocalInfileInputStream,   setMaxFieldSize,   setMaxRows,   setPingTarget,   setPoolable,   setQueryTimeout,   setResultSetConcurrency,   setResultSetType,   unwrap
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.mysql.jdbc.ServerPreparedStatement Detail:
 public synchronized  void addBatch() throws SQLException 
    JDBC 2.0 Add a set of parameters to the batch.
 protected String asSql(boolean quoteStreamsAndUnknowns) throws SQLException 
 public synchronized boolean canRewriteAsMultiValueInsertAtSqlLevel() throws SQLException 
 public synchronized boolean canRewriteAsMultivalueInsertStatement() throws SQLException 
 protected  void checkClosed() throws SQLException 
 public  void clearParameters() throws SQLException 
 public synchronized  void close() throws SQLException 
 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) throws SQLException 
 protected ResultSetInternalMethods executeInternal(int maxRowsToRetrieve,
    Buffer sendPacket,
    boolean createStreamingResultSet,
    boolean queryIsSelectOnly,
    Field[] metadataFromCache,
    boolean isBatch) throws SQLException 
 protected Buffer fillSendPacket() throws SQLException 
 protected Buffer fillSendPacket(byte[][] batchedParameterStrings,
    InputStream[] batchedParameterStreams,
    boolean[] batchedIsStream,
    int[] batchedStreamLengths) throws SQLException 
 protected BindValue getBinding(int parameterIndex,
    boolean forLongData) throws SQLException 
    Returns the structure representing the value that (can be)/(is) bound at the given parameter index.
 byte[] getBytes(int parameterIndex) throws SQLException 
 protected static ServerPreparedStatement getInstance(ConnectionImpl conn,
    String sql,
    String catalog,
    int resultSetType,
    int resultSetConcurrency) throws SQLException 
    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 synchronized int getLocationOfOnDuplicateKeyUpdate() 
 public ResultSetMetaData getMetaData() throws SQLException 
 public ParameterMetaData getParameterMetaData() throws SQLException 
 protected long getServerStatementId() 
 boolean isNull(int paramIndex) 
 protected synchronized boolean isOnDuplicateKeyUpdate() 
 protected PreparedStatement prepareBatchedInsertSQL(ConnectionImpl localConn,
    int numBatches) throws SQLException 
 protected  void rePrepare() throws SQLException 
    Used by Connection when auto-reconnecting to retrieve 'lost' prepared statements.
 protected  void realClose(boolean calledExplicitly,
    boolean closeOpenResults) throws SQLException 
    Closes this connection and frees all resources.
 public  void setArray(int i,
    Array x) throws SQLException 
 public  void setAsciiStream(int parameterIndex,
    InputStream x,
    int length) throws SQLException 
 public  void setBigDecimal(int parameterIndex,
    BigDecimal x) throws SQLException 
 public  void setBinaryStream(int parameterIndex,
    InputStream x,
    int length) throws SQLException 
 public  void setBlob(int parameterIndex,
    Blob x) throws SQLException 
 public  void setBoolean(int parameterIndex,
    boolean x) throws SQLException 
 public  void setByte(int parameterIndex,
    byte x) throws SQLException 
 public  void setBytes(int parameterIndex,
    byte[] x) throws SQLException 
 public  void setCharacterStream(int parameterIndex,
    Reader reader,
    int length) throws SQLException 
 public  void setClob(int parameterIndex,
    Clob x) throws SQLException 
 protected  void setClosed(boolean flag) 
 public  void setDate(int parameterIndex,
    Date x) throws SQLException 
    Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.
 public  void setDate(int parameterIndex,
    Date x,
    Calendar cal) throws SQLException 
    Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.
 public  void setDouble(int parameterIndex,
    double x) throws SQLException 
 public  void setFloat(int parameterIndex,
    float x) throws SQLException 
 public  void setInt(int parameterIndex,
    int x) throws SQLException 
 public  void setLong(int parameterIndex,
    long x) throws SQLException 
 public  void setNull(int parameterIndex,
    int sqlType) throws SQLException 
 public  void setNull(int parameterIndex,
    int sqlType,
    String typeName) throws SQLException 
 protected int setOneBatchedParameterSet(PreparedStatement batchedStatement,
    int batchedParamIndex,
    Object paramSet) throws SQLException 
 public  void setRef(int i,
    Ref x) throws SQLException 
 public  void setShort(int parameterIndex,
    short x) throws SQLException 
 public  void setString(int parameterIndex,
    String x) throws SQLException 
 public  void setTime(int parameterIndex,
    Time x) throws SQLException 
    Set a parameter to a java.sql.Time value.
 public  void setTime(int parameterIndex,
    Time x,
    Calendar cal) throws SQLException 
    Set a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database, using the given timezone.
 public  void setTimeInternal(int parameterIndex,
    Time x,
    Calendar targetCalendar,
    TimeZone tz,
    boolean rollForward) throws SQLException 
    Set a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database, using the given timezone.
 public  void setTimestamp(int parameterIndex,
    Timestamp x) throws SQLException 
    Set a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database.
 public  void setTimestamp(int parameterIndex,
    Timestamp x,
    Calendar cal) throws SQLException 
    Set a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database.
 protected  void setTimestampInternal(int parameterIndex,
    Timestamp x,
    Calendar targetCalendar,
    TimeZone tz,
    boolean rollForward) throws SQLException 
 protected  void setType(BindValue oldValue,
    int bufferType) 
 public  void setURL(int parameterIndex,
    URL x) throws SQLException 
 public  void setUnicodeStream(int parameterIndex,
    InputStream x,
    int length) throws SQLException 
Deprecated!
    DOCUMENT ME!
 public String toString()