|
|||||||||
| Home >> All >> com >> mysql >> jdbc >> jdbc2 >> [ optional overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.mysql.jdbc.jdbc2.optional
Class PreparedStatementWrapper

java.lang.Objectcom.mysql.jdbc.jdbc2.optional.WrapperBase
com.mysql.jdbc.jdbc2.optional.StatementWrapper
com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper
- All Implemented Interfaces:
- java.sql.PreparedStatement, java.sql.Statement
- class PreparedStatementWrapper
- extends StatementWrapper
- implements java.sql.PreparedStatement
- extends StatementWrapper
Wraps prepared statements so that errors can be reported correctly to ConnectionEventListeners.
- Version:
- $Id: PreparedStatementWrapper.java,v 1.1.2.4 2004/08/09 22:15:12 mmatthew Exp $
| Field Summary | |
protected MysqlPooledConnection |
pooledConnection
|
protected java.sql.Statement |
wrappedStmt
|
| Fields inherited from interface java.sql.Statement |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Constructor Summary | |
(package private) |
PreparedStatementWrapper(MysqlPooledConnection conn,
java.sql.PreparedStatement toWrap)
|
| Method Summary | |
void |
addBatch()
This method adds a set of parameters to the batch for JDBC 2.0. |
void |
addBatch(java.lang.String sql)
This method adds a SQL statement to a SQL batch. |
void |
cancel()
This method cancels an outstanding statement, if the database supports that operation. |
protected void |
checkAndFireConnectionError(java.sql.SQLException sqlEx)
Fires connection error event if required, before re-throwing exception |
void |
clearBatch()
This method clears out any SQL statements that have been populated in the current batch. |
void |
clearParameters()
This method clears all of the input parameter that have been set on this statement. |
void |
clearWarnings()
This method clears any SQL warnings that have been attached to this statement. |
void |
close()
This method closes the statement and frees any associated resources. |
boolean |
execute()
This method executes a prepared SQL query. |
boolean |
execute(java.lang.String sql)
This method executes an arbitrary SQL statement of any time. |
boolean |
execute(java.lang.String sql,
int autoGeneratedKeys)
|
boolean |
execute(java.lang.String sql,
int[] columnIndexes)
|
boolean |
execute(java.lang.String sql,
java.lang.String[] columnNames)
|
int[] |
executeBatch()
This method executes the SQL batch and returns an array of update counts - one for each SQL statement in the batch - ordered in the same order the statements were added to the batch. |
java.sql.ResultSet |
executeQuery()
This method executes a prepared SQL query and returns its ResultSet. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
This method executes the specified SQL SELECT statement and returns a (possibly empty) ResultSet with the results of the query. |
int |
executeUpdate()
This method executes an SQL INSERT, UPDATE or DELETE statement. |
int |
executeUpdate(java.lang.String sql)
This method executes the specified SQL INSERT, UPDATE, or DELETE statement and returns the number of rows affected, which may be 0. |
int |
executeUpdate(java.lang.String sql,
int autoGeneratedKeys)
|
int |
executeUpdate(java.lang.String sql,
int[] columnIndexes)
|
int |
executeUpdate(java.lang.String sql,
java.lang.String[] columnNames)
|
java.sql.Connection |
getConnection()
This method returns the Connection instance that was
used to create this object. |
int |
getFetchDirection()
This method returns the current direction that the driver thinks the result set will be accessed int. |
int |
getFetchSize()
This method returns the number of rows the driver believes should be fetched from the database at a time. |
java.sql.ResultSet |
getGeneratedKeys()
|
int |
getMaxFieldSize()
This method returns the maximum length of any column value in bytes. |
int |
getMaxRows()
This method returns the maximum possible number of rows in a result set. |
java.sql.ResultSetMetaData |
getMetaData()
This method returns meta data for the result set from this statement. |
boolean |
getMoreResults()
This method advances the result set pointer to the next result set, which can then be retrieved using getResultSet |
boolean |
getMoreResults(int current)
|
java.sql.ParameterMetaData |
getParameterMetaData()
Returns information about the parameters set on this PreparedStatement (see java.sql.ParameterMetaData for a
detailed description of the provided information). |
int |
getQueryTimeout()
The method returns the number of seconds a statement may be in process before timing out. |
java.sql.ResultSet |
getResultSet()
This method returns the result set of the SQL statement that was executed. |
int |
getResultSetConcurrency()
This method returns the concurrency type of the result set for this statement. |
int |
getResultSetHoldability()
|
int |
getResultSetType()
This method returns the result set type for this statement. |
int |
getUpdateCount()
This method returns the update count of the SQL statement that was executed. |
java.sql.SQLWarning |
getWarnings()
This method returns the first SQL warning attached to this statement. |
void |
setArray(int parameterIndex,
java.sql.Array x)
This method sets the specified parameter from the given Java Array value. |
void |
setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
This method sets the specified parameter from the given Java ASCII InputStream value. |
void |
setBigDecimal(int parameterIndex,
java.math.BigDecimal x)
This method sets the specified parameter from the given Java java.math.BigDecimal value. |
void |
setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
This method sets the specified parameter from the given Java binary InputStream value. |
void |
setBlob(int parameterIndex,
java.sql.Blob x)
This method sets the specified parameter from the given Java Blob value. |
void |
setBoolean(int parameterIndex,
boolean x)
This method sets the specified parameter from the given Java boolean value. |
void |
setByte(int parameterIndex,
byte x)
This method sets the specified parameter from the given Java byte value. |
void |
setBytes(int parameterIndex,
byte[] x)
This method sets the specified parameter from the given Java byte array value. |
void |
setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length)
This method sets the specified parameter from the given Java character Reader value. |
void |
setClob(int parameterIndex,
java.sql.Clob x)
This method sets the specified parameter from the given Java Clob value. |
void |
setCursorName(java.lang.String name)
This method sets the cursor name that will be used by the result set. |
void |
setDate(int parameterIndex,
java.sql.Date x)
This method sets the specified parameter from the given Java java.sql.Date value. |
void |
setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
This method sets the specified parameter from the given Java java.sql.Date value. |
void |
setDouble(int parameterIndex,
double x)
This method sets the specified parameter from the given Java double value. |
void |
setEscapeProcessing(boolean enable)
This method sets the local escape processing mode on or off. |
void |
setFetchDirection(int direction)
This method informs the driver which direction the result set will be accessed in. |
void |
setFetchSize(int rows)
This method informs the driver how many rows it should fetch from the database at a time. |
void |
setFloat(int parameterIndex,
float x)
This method sets the specified parameter from the given Java float value. |
void |
setInt(int parameterIndex,
int x)
This method sets the specified parameter from the given Java int value. |
void |
setLong(int parameterIndex,
long x)
This method sets the specified parameter from the given Java long value. |
void |
setMaxFieldSize(int max)
This method sets the limit for the maximum length of any column in bytes. |
void |
setMaxRows(int max)
This method sets the maximum number of rows that can be present in a result set. |
void |
setNull(int parameterIndex,
int sqlType)
This method populates the specified parameter with a SQL NULL value for the specified type. |
void |
setNull(int parameterIndex,
int sqlType,
java.lang.String typeName)
This method populates the specified parameter with a SQL NULL value for the specified type. |
void |
setObject(int parameterIndex,
java.lang.Object x)
This method sets the specified parameter from the given Java Object value. |
void |
setObject(int parameterIndex,
java.lang.Object x,
int targetSqlType)
This method sets the specified parameter from the given Java Object value. |
void |
setObject(int parameterIndex,
java.lang.Object x,
int targetSqlType,
int scale)
This method sets the specified parameter from the given Java Object value. |
void |
setQueryTimeout(int seconds)
This method sets the number of seconds a statement may be in process before timing out. |
void |
setRef(int parameterIndex,
java.sql.Ref x)
This method sets the specified parameter from the given Java Ref value. |
void |
setShort(int parameterIndex,
short x)
This method sets the specified parameter from the given Java short value. |
void |
setString(int parameterIndex,
java.lang.String x)
This method sets the specified parameter from the given Java String value. |
void |
setTime(int parameterIndex,
java.sql.Time x)
This method sets the specified parameter from the given Java java.sql.Time value. |
void |
setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
This method sets the specified parameter from the given Java java.sql.Time value. |
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x)
This method sets the specified parameter from the given Java java.sql.Timestamp value. |
void |
setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
This method sets the specified parameter from the given Java java.sql.Timestamp value. |
void |
setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
Deprecated. |
void |
setURL(int parameterIndex,
java.net.URL x)
This method sets the specified parameter from the given Java java.net.URL value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
wrappedStmt
protected java.sql.Statement wrappedStmt
pooledConnection
protected MysqlPooledConnection pooledConnection
| Constructor Detail |
PreparedStatementWrapper
PreparedStatementWrapper(MysqlPooledConnection conn, java.sql.PreparedStatement toWrap)
| Method Detail |
setArray
public void setArray(int parameterIndex,
java.sql.Array x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Arrayvalue. The default object type to SQL type mapping will be used.- Specified by:
setArrayin interfacejava.sql.PreparedStatement
setAsciiStream
public void setAsciiStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
ASCII
InputStreamvalue.- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement
setBigDecimal
public void setBigDecimal(int parameterIndex,
java.math.BigDecimal x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.math.BigDecimalvalue.- Specified by:
setBigDecimalin interfacejava.sql.PreparedStatement
setBinaryStream
public void setBinaryStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
binary
InputStreamvalue.- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement
setBlob
public void setBlob(int parameterIndex,
java.sql.Blob x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Blobvalue. The default object type to SQL type mapping will be used.- Specified by:
setBlobin interfacejava.sql.PreparedStatement
setBoolean
public void setBoolean(int parameterIndex,
boolean x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
booleanvalue.- Specified by:
setBooleanin interfacejava.sql.PreparedStatement
setByte
public void setByte(int parameterIndex,
byte x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
bytevalue.- Specified by:
setBytein interfacejava.sql.PreparedStatement
setBytes
public void setBytes(int parameterIndex,
byte[] x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
bytearray value.- Specified by:
setBytesin interfacejava.sql.PreparedStatement
setCharacterStream
public void setCharacterStream(int parameterIndex,
java.io.Reader reader,
int length)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
character
Readervalue.- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement
setClob
public void setClob(int parameterIndex,
java.sql.Clob x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Clobvalue. The default object type to SQL type mapping will be used.- Specified by:
setClobin interfacejava.sql.PreparedStatement
setDate
public void setDate(int parameterIndex,
java.sql.Date x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Datevalue.- Specified by:
setDatein interfacejava.sql.PreparedStatement
setDate
public void setDate(int parameterIndex,
java.sql.Date x,
java.util.Calendar cal)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Datevalue.- Specified by:
setDatein interfacejava.sql.PreparedStatement
setDouble
public void setDouble(int parameterIndex,
double x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
doublevalue.- Specified by:
setDoublein interfacejava.sql.PreparedStatement
setFloat
public void setFloat(int parameterIndex,
float x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
floatvalue.- Specified by:
setFloatin interfacejava.sql.PreparedStatement
setInt
public void setInt(int parameterIndex,
int x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
intvalue.- Specified by:
setIntin interfacejava.sql.PreparedStatement
setLong
public void setLong(int parameterIndex,
long x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
longvalue.- Specified by:
setLongin interfacejava.sql.PreparedStatement
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method returns meta data for the result set from this statement.
- Specified by:
getMetaDatain interfacejava.sql.PreparedStatement
setNull
public void setNull(int parameterIndex,
int sqlType)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method populates the specified parameter with a SQL NULL value
for the specified type.
- Specified by:
setNullin interfacejava.sql.PreparedStatement
setNull
public void setNull(int parameterIndex,
int sqlType,
java.lang.String typeName)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method populates the specified parameter with a SQL NULL value
for the specified type.
- Specified by:
setNullin interfacejava.sql.PreparedStatement
setObject
public void setObject(int parameterIndex,
java.lang.Object x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Objectvalue. The default object type to SQL type mapping will be used.- Specified by:
setObjectin interfacejava.sql.PreparedStatement
setObject
public void setObject(int parameterIndex,
java.lang.Object x,
int targetSqlType)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Objectvalue. The specified SQL object type will be used.- Specified by:
setObjectin interfacejava.sql.PreparedStatement
setObject
public void setObject(int parameterIndex,
java.lang.Object x,
int targetSqlType,
int scale)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Objectvalue. The specified SQL object type will be used.- Specified by:
setObjectin interfacejava.sql.PreparedStatement
getParameterMetaData
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - Returns information about the parameters set on this
PreparedStatement(see java.sql.ParameterMetaData for a detailed description of the provided information).- Specified by:
getParameterMetaDatain interfacejava.sql.PreparedStatement
setRef
public void setRef(int parameterIndex,
java.sql.Ref x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Refvalue. The default object type to SQL type mapping will be used.- Specified by:
setRefin interfacejava.sql.PreparedStatement
setShort
public void setShort(int parameterIndex,
short x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
shortvalue.- Specified by:
setShortin interfacejava.sql.PreparedStatement
setString
public void setString(int parameterIndex,
java.lang.String x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
Stringvalue.- Specified by:
setStringin interfacejava.sql.PreparedStatement
setTime
public void setTime(int parameterIndex,
java.sql.Time x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timevalue.- Specified by:
setTimein interfacejava.sql.PreparedStatement
setTime
public void setTime(int parameterIndex,
java.sql.Time x,
java.util.Calendar cal)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timevalue.- Specified by:
setTimein interfacejava.sql.PreparedStatement
setTimestamp
public void setTimestamp(int parameterIndex,
java.sql.Timestamp x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timestampvalue.- Specified by:
setTimestampin interfacejava.sql.PreparedStatement
setTimestamp
public void setTimestamp(int parameterIndex,
java.sql.Timestamp x,
java.util.Calendar cal)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.sql.Timestampvalue.- Specified by:
setTimestampin interfacejava.sql.PreparedStatement
setURL
public void setURL(int parameterIndex,
java.net.URL x)
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method sets the specified parameter from the given Java
java.net.URLvalue.- Specified by:
setURLin interfacejava.sql.PreparedStatement
setUnicodeStream
public void setUnicodeStream(int parameterIndex,
java.io.InputStream x,
int length)
throws java.sql.SQLException
- Deprecated.
- DOCUMENT ME!
- Specified by:
setUnicodeStreamin interfacejava.sql.PreparedStatement
- DOCUMENT ME!
addBatch
public void addBatch()
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method adds a set of parameters to the batch for JDBC 2.0.
- Specified by:
addBatchin interfacejava.sql.PreparedStatement
clearParameters
public void clearParameters()
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method clears all of the input parameter that have been
set on this statement.
- Specified by:
clearParametersin interfacejava.sql.PreparedStatement
execute
public boolean execute()
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method executes a prepared SQL query.
Some prepared statements return multiple results; the execute method
handles these complex statements as well as the simpler form of
statements handled by executeQuery and executeUpdate.
- Specified by:
executein interfacejava.sql.PreparedStatement
executeQuery
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method executes a prepared SQL query and returns its ResultSet.
- Specified by:
executeQueryin interfacejava.sql.PreparedStatement
executeUpdate
public int executeUpdate()
throws java.sql.SQLException
- Description copied from interface:
java.sql.PreparedStatement - This method executes an SQL INSERT, UPDATE or DELETE statement. SQL
statements that return nothing such as SQL DDL statements can be executed.
- Specified by:
executeUpdatein interfacejava.sql.PreparedStatement
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the
Connectioninstance that was used to create this object.- Specified by:
getConnectionin interfacejava.sql.Statement
setCursorName
public void setCursorName(java.lang.String name) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the cursor name that will be used by the result set.
- Specified by:
setCursorNamein interfacejava.sql.Statement
setEscapeProcessing
public void setEscapeProcessing(boolean enable)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the local escape processing mode on or off. The
default value is on.
- Specified by:
setEscapeProcessingin interfacejava.sql.Statement
setFetchDirection
public void setFetchDirection(int direction)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method informs the driver which direction the result set will
be accessed in.
- Specified by:
setFetchDirectionin interfacejava.sql.Statement
getFetchDirection
public int getFetchDirection()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the current direction that the driver thinks the
result set will be accessed int.
- Specified by:
getFetchDirectionin interfacejava.sql.Statement
setFetchSize
public void setFetchSize(int rows)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method informs the driver how many rows it should fetch from the
database at a time.
- Specified by:
setFetchSizein interfacejava.sql.Statement
getFetchSize
public int getFetchSize()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the number of rows the driver believes should be
fetched from the database at a time.
- Specified by:
getFetchSizein interfacejava.sql.Statement
getGeneratedKeys
public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
- Specified by:
getGeneratedKeysin interfacejava.sql.Statement
setMaxFieldSize
public void setMaxFieldSize(int max)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the limit for the maximum length of any column in bytes.
- Specified by:
setMaxFieldSizein interfacejava.sql.Statement
getMaxFieldSize
public int getMaxFieldSize()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the maximum length of any column value in bytes.
- Specified by:
getMaxFieldSizein interfacejava.sql.Statement
setMaxRows
public void setMaxRows(int max)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the maximum number of rows that can be present in a
result set.
- Specified by:
setMaxRowsin interfacejava.sql.Statement
getMaxRows
public int getMaxRows()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the maximum possible number of rows in a result set.
- Specified by:
getMaxRowsin interfacejava.sql.Statement
getMoreResults
public boolean getMoreResults()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method advances the result set pointer to the next result set,
which can then be retrieved using
getResultSet- Specified by:
getMoreResultsin interfacejava.sql.Statement
getMoreResults
public boolean getMoreResults(int current)
throws java.sql.SQLException
- Specified by:
getMoreResultsin interfacejava.sql.Statement
setQueryTimeout
public void setQueryTimeout(int seconds)
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method sets the number of seconds a statement may be in process
before timing out. A value of 0 means there is no timeout.
- Specified by:
setQueryTimeoutin interfacejava.sql.Statement
getQueryTimeout
public int getQueryTimeout()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - The method returns the number of seconds a statement may be in process
before timing out. A value of 0 means there is no timeout.
- Specified by:
getQueryTimeoutin interfacejava.sql.Statement
getResultSet
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the result set of the SQL statement that was
executed. This should be called only once per result set returned.
- Specified by:
getResultSetin interfacejava.sql.Statement
getResultSetConcurrency
public int getResultSetConcurrency()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the concurrency type of the result set for this
statement. This will be one of the concurrency types defined in
ResultSet.- Specified by:
getResultSetConcurrencyin interfacejava.sql.Statement
getResultSetHoldability
public int getResultSetHoldability()
throws java.sql.SQLException
- Specified by:
getResultSetHoldabilityin interfacejava.sql.Statement
getResultSetType
public int getResultSetType()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the result set type for this statement. This will
be one of the result set types defined in
ResultSet.- Specified by:
getResultSetTypein interfacejava.sql.Statement
getUpdateCount
public int getUpdateCount()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the update count of the SQL statement that was
executed. This should be called only once per executed SQL statement.
- Specified by:
getUpdateCountin interfacejava.sql.Statement
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method returns the first SQL warning attached to this statement.
Subsequent warnings will be chained to this one.
- Specified by:
getWarningsin interfacejava.sql.Statement
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method adds a SQL statement to a SQL batch. A driver is not
required to implement this method.
- Specified by:
addBatchin interfacejava.sql.Statement
cancel
public void cancel()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method cancels an outstanding statement, if the database supports
that operation.
- Specified by:
cancelin interfacejava.sql.Statement
clearBatch
public void clearBatch()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method clears out any SQL statements that have been populated in
the current batch. A driver is not required to implement this method.
- Specified by:
clearBatchin interfacejava.sql.Statement
clearWarnings
public void clearWarnings()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method clears any SQL warnings that have been attached to this
statement.
- Specified by:
clearWarningsin interfacejava.sql.Statement
close
public void close()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method closes the statement and frees any associated resources.
- Specified by:
closein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
executein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
- Specified by:
executein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
executein interfacejava.sql.Statement
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes an arbitrary SQL statement of any time. The
methods
getResultSet,getMoreResultsandgetUpdateCountretrieve the results.- Specified by:
executein interfacejava.sql.Statement
executeBatch
public int[] executeBatch()
throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes the SQL batch and returns an array of update
counts - one for each SQL statement in the batch - ordered in the same
order the statements were added to the batch. A driver is not required
to implement this method.
- Specified by:
executeBatchin interfacejava.sql.Statement
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes the specified SQL SELECT statement and returns a
(possibly empty)
ResultSetwith the results of the query.- Specified by:
executeQueryin interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
executeUpdatein interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
- Specified by:
executeUpdatein interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
executeUpdatein interfacejava.sql.Statement
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
- Description copied from interface:
java.sql.Statement - This method executes the specified SQL INSERT, UPDATE, or DELETE statement
and returns the number of rows affected, which may be 0.
- Specified by:
executeUpdatein interfacejava.sql.Statement
checkAndFireConnectionError
protected void checkAndFireConnectionError(java.sql.SQLException sqlEx) throws java.sql.SQLException
- Fires connection error event if required, before re-throwing exception
|
|||||||||
| Home >> All >> com >> mysql >> jdbc >> jdbc2 >> [ optional overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC