Logo Search packages:      
Sourcecode: mysql-connector-java version File versions  Download package

com::mysql::jdbc::ServerPreparedStatement Class Reference

Inheritance diagram for com::mysql::jdbc::ServerPreparedStatement:

com::mysql::jdbc::PreparedStatement com::mysql::jdbc::StatementImpl com::mysql::jdbc::Statement

List of all members.


Detailed Description

JDBC Interface for MySQL-4.1 and newer server-side PreparedStatements.

Author:
Mark Matthews
Version:
$Id: ServerPreparedStatement.java,v 1.1.2.2 2005/05/17 14:58:56 mmatthews Exp $

Definition at line 67 of file ServerPreparedStatement.java.


Public Member Functions

synchronized void addBatch (String sql) throws SQLException
synchronized void addBatch () throws SQLException
void cancel () throws SQLException
synchronized boolean canRewriteAsMultivalueInsertStatement ()
synchronized void clearBatch () throws SQLException
void clearParameters () throws SQLException
void clearWarnings () throws SQLException
void close () throws SQLException
void disableStreamingResults () throws SQLException
void enableStreamingResults () throws SQLException
boolean execute (String sql, String[] generatedKeyNames) throws SQLException
boolean execute (String sql, int[] generatedKeyIndices) throws SQLException
boolean execute (String sql, int returnGeneratedKeys) throws SQLException
boolean execute (String sql) throws SQLException
boolean execute () throws SQLException
synchronized int[] executeBatch () throws SQLException
java.sql.ResultSet executeQuery (String sql) throws SQLException
java.sql.ResultSet executeQuery () throws SQLException
int executeUpdate (String sql, String[] generatedKeyNames) throws SQLException
int executeUpdate (String sql, int[] generatedKeyIndices) throws SQLException
int executeUpdate (String sql, int returnGeneratedKeys) throws SQLException
int executeUpdate (String sql) throws SQLException
int executeUpdate () throws SQLException
byte[] getBytesRepresentation (int parameterIndex) throws SQLException
java.sql.Connection getConnection () throws SQLException
int getFetchDirection () throws SQLException
int getFetchSize () throws SQLException
synchronized java.sql.ResultSet getGeneratedKeys () throws SQLException
long getLastInsertID ()
synchronized InputStream getLocalInfileInputStream ()
long getLongUpdateCount ()
int getMaxFieldSize () throws SQLException
int getMaxRows () throws SQLException
java.sql.ResultSetMetaData getMetaData () throws SQLException
boolean getMoreResults (int current) throws SQLException
boolean getMoreResults () throws SQLException
ParameterBindings getParameterBindings () throws SQLException
ParameterMetaData getParameterMetaData () throws SQLException
int getQueryTimeout () throws SQLException
java.sql.ResultSet getResultSet () throws SQLException
int getResultSetConcurrency () throws SQLException
int getResultSetHoldability () throws SQLException
int getResultSetType () throws SQLException
int getUpdateCount () throws SQLException
java.sql.SQLWarning getWarnings () throws SQLException
synchronized boolean isClosed () throws SQLException
boolean isPoolable () throws SQLException
boolean isWrapperFor (Class iface) throws SQLException
void setArray (int i, Array x) throws SQLException
void setAsciiStream (int parameterIndex, InputStream x, long length) throws SQLException
void setAsciiStream (int parameterIndex, InputStream x) throws SQLException
void setAsciiStream (int parameterIndex, InputStream x, int length) throws SQLException
void setBigDecimal (int parameterIndex, BigDecimal x) throws SQLException
void setBinaryStream (int parameterIndex, InputStream x, long length) throws SQLException
void setBinaryStream (int parameterIndex, InputStream x) throws SQLException
void setBinaryStream (int parameterIndex, InputStream x, int length) throws SQLException
void setBlob (int parameterIndex, InputStream inputStream) throws SQLException
void setBlob (int i, java.sql.Blob x) throws SQLException
void setBlob (int parameterIndex, InputStream inputStream, long length) throws SQLException
void setBlob (int parameterIndex, Blob x) throws SQLException
void setBoolean (int parameterIndex, boolean x) throws SQLException
void setByte (int parameterIndex, byte x) throws SQLException
void setBytes (int parameterIndex, byte[] x) throws SQLException
void setCharacterStream (int parameterIndex, Reader reader, long length) throws SQLException
void setCharacterStream (int parameterIndex, Reader reader) throws SQLException
void setCharacterStream (int parameterIndex, java.io.Reader reader, int length) throws SQLException
void setCharacterStream (int parameterIndex, Reader reader, int length) throws SQLException
void setClob (int parameterIndex, Reader reader, long length) throws SQLException
void setClob (int parameterIndex, Reader reader) throws SQLException
void setClob (int parameterIndex, Clob x) throws SQLException
void setCursorName (String name) throws SQLException
void setDate (int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException
void setDate (int parameterIndex, java.sql.Date x) throws java.sql.SQLException
void setDate (int parameterIndex, Date x, Calendar cal) throws SQLException
void setDate (int parameterIndex, Date x) throws SQLException
void setDouble (int parameterIndex, double x) throws SQLException
void setEscapeProcessing (boolean enable) throws SQLException
void setFetchDirection (int direction) throws SQLException
void setFetchSize (int rows) throws SQLException
void setFloat (int parameterIndex, float x) throws SQLException
void setInt (int parameterIndex, int x) throws SQLException
synchronized void setLocalInfileInputStream (InputStream stream)
void setLong (int parameterIndex, long x) throws SQLException
void setMaxFieldSize (int max) throws SQLException
void setMaxRows (int max) throws SQLException
void setNCharacterStream (int parameterIndex, Reader reader, long length) throws SQLException
void setNCharacterStream (int parameterIndex, Reader value) throws SQLException
void setNClob (int parameterIndex, Reader reader, long length) throws SQLException
void setNClob (int parameterIndex, Reader reader) throws SQLException
void setNString (int parameterIndex, String x) throws SQLException
void setNull (int parameterIndex, int sqlType, String typeName) throws SQLException
void setNull (int parameterIndex, int sqlType) throws SQLException
void setObject (int parameterIndex, Object parameterObj, int targetSqlType, int scale) throws SQLException
void setObject (int parameterIndex, Object parameterObj, int targetSqlType) throws SQLException
void setObject (int parameterIndex, Object parameterObj) throws SQLException
synchronized void setPingTarget (PingTarget pingTarget)
void setPoolable (boolean poolable) throws SQLException
void setQueryTimeout (int seconds) throws SQLException
void setRef (int i, Ref x) throws SQLException
void setShort (int parameterIndex, short x) throws SQLException
void setString (int parameterIndex, String x) throws SQLException
void setTime (int parameterIndex, Time x) throws java.sql.SQLException
void setTime (int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException
void setTime (int parameterIndex, java.sql.Time x) throws SQLException
void setTimeInternal (int parameterIndex, java.sql.Time x, Calendar targetCalendar, TimeZone tz, boolean rollForward) throws SQLException
void setTimestamp (int parameterIndex, Timestamp x) throws java.sql.SQLException
void setTimestamp (int parameterIndex, java.sql.Timestamp x, Calendar cal) throws SQLException
void setTimestamp (int parameterIndex, java.sql.Timestamp x) throws SQLException
void setUnicodeStream (int parameterIndex, InputStream x, int length) throws SQLException
void setURL (int parameterIndex, URL x) throws SQLException
String toString ()
Object unwrap (Class iface) throws java.sql.SQLException

Static Public Attributes

static final byte USES_VARIABLES_FALSE = 0
static final byte USES_VARIABLES_TRUE = 1
static final byte USES_VARIABLES_UNKNOWN = -1

Protected Member Functions

String asSql () throws SQLException
String asSql (boolean quoteStreamsAndUnknowns) throws SQLException
void checkClosed () throws SQLException
void checkForDml (String sql, char firstStatementChar) throws SQLException
void checkNullOrEmptyQuery (String sql) throws SQLException
void closeAllOpenResults ()
int computeBatchSize (int numBatchedArgs)
long[] computeMaxParameterSetSizeAndBatchSize (int numBatchedArgs)
boolean createStreamingResultSet ()
void doPingInstead () throws SQLException
int[] executeBatchedInserts (int batchTimeout) throws SQLException
int[] executeBatchSerially (int batchTimeout) throws SQLException
com.mysql.jdbc.ResultSetInternalMethods executeInternal (int maxRowsToRetrieve, Buffer sendPacket, boolean createStreamingResultSet, boolean queryIsSelectOnly, Field[] metadataFromCache, boolean isBatch) throws SQLException
int[] executePreparedBatchAsMultiStatement (int batchTimeout) throws SQLException
void executeSimpleNonQuery (ConnectionImpl c, String nonQuery) throws SQLException
int executeUpdate (String sql, boolean isBatch) throws SQLException
int executeUpdate (byte[][] batchedParameterStrings, InputStream[] batchedParameterStreams, boolean[] batchedIsStream, int[] batchedStreamLengths, boolean[] batchedIsNull, boolean isReallyBatch) throws SQLException
int executeUpdate (boolean clearBatchedGeneratedKeysAndWarnings, boolean isBatch) throws SQLException
Buffer fillSendPacket (byte[][] batchedParameterStrings, InputStream[] batchedParameterStreams, boolean[] batchedIsStream, int[] batchedStreamLengths) throws SQLException
Buffer fillSendPacket () throws SQLException
int findStartOfStatement (String sql)
ResultSetInternalMethods generatePingResultSet () throws SQLException
void getBatchedGeneratedKeys () throws SQLException
void getBatchedGeneratedKeys (java.sql.Statement batchedStatement) throws SQLException
BindValue getBinding (int parameterIndex, boolean forLongData) throws SQLException
Calendar getCalendarInstanceForSessionOrNew ()
java.sql.ResultSet getGeneratedKeysInternal () throws SQLException
int getId ()
int getParameterIndexOffset ()
ResultSetInternalMethods getResultSetInternal ()
long getServerStatementId ()
SQLException handleExceptionForBatch (int endOfBatchIndex, int numValuesPerBatch, int[] updateCounts, SQLException ex) throws BatchUpdateException
boolean isSelectQuery ()
int processMultiCountsAndKeys (StatementImpl batchedStatement, int updateCountCounter, int[] updateCounts) throws SQLException
void realClose (boolean calledExplicitly, boolean closeOpenResults) throws SQLException
void rePrepare () throws SQLException
synchronized void resetCancelledState ()
 ServerPreparedStatement (ConnectionImpl conn, String sql, String catalog, int resultSetType, int resultSetConcurrency) throws SQLException
void setBytes (int parameterIndex, byte[] x, boolean checkForIntroducer, boolean escapeForMBChars) throws SQLException
void setBytesNoEscape (int parameterIndex, byte[] parameterAsBytes) throws SQLException
void setBytesNoEscapeNoQuotes (int parameterIndex, byte[] parameterAsBytes) throws SQLException
void setClosed (boolean flag)
void setHoldResultsOpenOverClose (boolean holdResultsOpenOverClose)
final void setInternal (int paramIndex, String val) throws SQLException
final void setInternal (int paramIndex, byte[] val) throws SQLException
int setOneBatchedParameterSet (java.sql.PreparedStatement batchedStatement, int batchedParamIndex, Object paramSet) throws SQLException
void setRetrieveGeneratedKeys (boolean retrieveGeneratedKeys)
void setTimestampInternal (int parameterIndex, java.sql.Timestamp x, Calendar targetCalendar, TimeZone tz, boolean rollForward) throws SQLException
void setType (BindValue oldValue, int bufferType)

Static Protected Member Functions

static PreparedStatement getInstance (ConnectionImpl conn, String sql, String catalog, ParseInfo cachedParseInfo) throws SQLException
static PreparedStatement getInstance (ConnectionImpl conn, String sql, String catalog) throws SQLException
static PreparedStatement getInstance (ConnectionImpl conn, String catalog) throws SQLException
static ServerPreparedStatement getInstance (ConnectionImpl conn, String sql, String catalog, int resultSetType, int resultSetConcurrency) throws SQLException
static int readFully (Reader reader, char[] buf, int length) throws IOException

Protected Attributes

List batchedArgs
ArrayList batchedGeneratedKeys = null
String batchedValuesClause
boolean batchHasPlainStatements = false
Object cancelTimeoutMutex = new Object()
SingleByteCharsetConverter charConverter = null
String charEncoding = null
ConnectionImpl connection = null
long connectionId = 0
boolean continueBatchOnError = false
String currentCatalog = null
boolean doEscapeProcessing = true
ProfileEventSink eventSink = null
char firstCharOfStmt = 0
boolean hasLimitClause = false
boolean holdResultsOpenOverClose = false
boolean isCached = false
boolean isClosed = false
boolean isLoadDataQuery = false
long lastInsertId = -1
int maxFieldSize = MysqlIO.getMaxBuf()
int maxRows = -1
boolean maxRowsChanged = false
int numberOfExecutions = 0
List openResults = new ArrayList()
String originalSql = null
int parameterCount
MysqlParameterMetadata parameterMetaData
int[] parameterTypes = null
boolean pedantic = false
PingTarget pingTarget = null
Throwable pointOfOrigin
boolean profileSQL = false
ResultSetInternalMethods results = null
int resultSetConcurrency = 0
int resultSetType = 0
boolean retrieveGeneratedKeys = false
int statementId
int timeoutInMillis = 0
long updateCount = -1
boolean useTrueBoolean = false
boolean useUsageAdvisor = false
boolean usingAnsiMode
SQLWarning warningChain = null
boolean wasCancelled = false
boolean wasCancelledByTimeout = false

Static Protected Attributes

static final int BLOB_STREAM_READ_BUF_SIZE = 8192
static final String PING_MARKER = "/* ping */"
static int statementCounter = 1

Package Functions

byte[] getBytes (int parameterIndex) throws SQLException
ParseInfo getParseInfo ()
boolean isNull (int paramIndex)
void setResultSetConcurrency (int concurrencyFlag)
void setResultSetType (int typeFlag)

Static Package Functions

 [static initializer]

Private Member Functions

void clearParametersInternal (boolean clearServerParameters) throws SQLException
void dumpCloseForTestcase ()
void dumpExecuteForTestcase () throws SQLException
void dumpPrepareForTestcase () throws SQLException
com.mysql.jdbc.ResultSetInternalMethods serverExecute (int maxRowsToRetrieve, boolean createStreamingResultSet, Field[] metadataFromCache) throws SQLException
void serverLongData (int parameterIndex, BindValue longData) throws SQLException
void serverPrepare (String sql) throws SQLException
void serverResetStatement () throws SQLException
void storeBinding (Buffer packet, BindValue bindValue, MysqlIO mysql) throws SQLException
void storeDataTime412AndOlder (Buffer intoBuf, java.util.Date dt) throws SQLException
void storeDateTime (Buffer intoBuf, java.util.Date dt, MysqlIO mysql) throws SQLException
void storeDateTime413AndNewer (Buffer intoBuf, java.util.Date dt) throws SQLException
void storeReader (MysqlIO mysql, int parameterIndex, Buffer packet, Reader inStream) throws SQLException
void storeStream (MysqlIO mysql, int parameterIndex, Buffer packet, InputStream inStream) throws SQLException
void storeTime (Buffer intoBuf, Time tm) throws SQLException
String truncateQueryToLog (String sql)

Private Attributes

boolean detectedLongParameterSwitch = false
int fieldCount
boolean invalid = false
SQLException invalidationException
boolean isSelectQuery
Buffer outByteBuffer
BindValue[] parameterBindings
Field[] parameterFields
Field[] resultFields
boolean sendTypesToServer = false
boolean serverNeedsResetBeforeEachExecution
long serverStatementId
int stringTypeCode = MysqlDefs.FIELD_TYPE_STRING
boolean useAutoSlowLog

Static Private Attributes

static final Constructor JDBC_4_SPS_CTOR
static final byte MAX_DATE_REP_LENGTH = (byte) 5
static final byte MAX_DATETIME_REP_LENGTH = 12
static final byte MAX_TIME_REP_LENGTH = 13

Classes

class  BatchedBindValues
class  BindValue

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index