| java.lang.Object com.quadcap.jdbc.Statement com.quadcap.jdbc.PreparedStatement
PreparedStatement | public class PreparedStatement extends Statement implements java.sql.PreparedStatement(Code) | | This class implements the java.sql.PreparedStatement
interface, and provides facilities for execution of pre-compiled
SQL statements. This release of QED performs all of the SQL parsing
during the prepare phase, so that subsequent execution of the
compiled statement is considerably faster than directly executing
the statement using the Statement interface.
author: Stan Bailes |
Method Summary | |
public void | addBatch() This QED release doesn't support batch statement execution. | public void | clearParameters() | public boolean | execute() Execute the current SQL statement, returning true
if the statement generates a ResultSet object. | public java.sql.ResultSet | executeQuery() Execute the prepared SQL query statement, returning the
ResultSet object containing the results of the
query. | public int | executeUpdate() Execute the prepared SQL update statement, returning the update
count, meaning the number of rows updated or inserted by this
statement. | public java.sql.ResultSetMetaData | getMetaData() QED doesn't implement this feature, which requires information
about the ResultSet that will be generated by this
PreparedStatement object when it is executed. | ParameterExpression | getParam(int i) | public java.sql.ParameterMetaData | getParameterMetaData() Retrieves the number, types and properties of this
PreparedStatement object's parameters. | public void | setArray(int col, Array val) Set the statement parameter to the specified
ARRAY value. | public void | setAsciiStream(int col, InputStream in, int length) Set the statement parameter to the specified character value using an
InputStream that contains a stream of ASCII bytes. | public void | setBigDecimal(int col, BigDecimal val) Set the statement parameter to the specified
BigDecimal value. | public void | setBinaryStream(int col, InputStream in, int length) Set the statement parameter to the specified binary value using an
InputStream that contains a stream of bytes.
Parameters: col - the parameter index Parameters: is - an input stream containing ASCII bytes. Parameters: length - the number of bytes to read from the streamIf 'length > 0', then the blob's length will be set to the valueof the 'length' parameter. If 'length < 0', then the blob's length will be set to the numberof bytes read. | public void | setBlob(int col, Blob val) Set the statement parameter to the specified
Blob value. | public void | setBoolean(int col, boolean val) Set the statement parameter to the specified
boolean value. | public void | setByte(int col, byte val) Set the statement parameter to the specified
byte value. | public void | setBytes(int col, byte[] val) Set the statement parameter to the specified
byte array value. | public void | setCharacterStream(int col, Reader r, int length) Set the statement parameter to the specified character value using a
Reader that contains a stream of Unicode characters. | public void | setClob(int col, Clob val) Set the statement parameter to the specified
Clob value. | public void | setDate(int col, Date val) Set the statement parameter to the specified
Date value. | public void | setDate(int col, Date val, Calendar cal) Set the statement parameter to the specified
Date value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: cal - a Calendar object that is used for convertingthe database date to the local timezone. | public void | setDouble(int col, double val) Set the statement parameter to the specified
double value. | public void | setFloat(int col, float val) Set the statement parameter to the specified
float value. | public void | setInt(int col, int val) Set the statement parameter to the specified
int value. | public void | setLong(int col, long val) Set the statement parameter to the specified
long value. | public void | setNull(int col, int type) Set the statement parameter to the specified
null value.
Parameters: col - the parameter index Parameters: type - the JDBC type of the parameter. | public void | setNull(int col, int type, String typename) Set the statement parameter to the specified
null value.
Parameters: col - the parameter index Parameters: type - the JDBC type of the parameter. | public void | setObject(int col, Object val) Set the statement parameter to the specified
Object value. | public void | setObject(int col, Object val, int type) Set the statement parameter to the specified
Object value. | public void | setObject(int col, Object val, int type, int scale) Set the statement parameter to the specified
Object value. | final void | setParamValue(int col, Value v) | public void | setRef(int col, Ref val) Set the statement parameter to the specified
REF value. | public void | setShort(int col, short val) Set the statement parameter to the specified
short value. | public void | setString(int col, String val) Set the statement parameter to the specified
String value. | public void | setTime(int col, Time val) Set the statement parameter to the specified
Time value. | public void | setTime(int col, Time val, Calendar cal) Set the statement parameter to the specified
Time value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: cal - a Calendar object that is used for convertingthe database date to the local timezone. | public void | setTimestamp(int col, Timestamp val) Set the statement parameter to the specified
Timestamp value. | public void | setTimestamp(int col, Timestamp val, Calendar cal) Set the statement parameter to the specified
Timestamp value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: cal - a Calendar object that is used for convertingthe database date to the local timezone. | public void | setURL(int parameterIndex, java.net.URL x) Sets the designated parameter to the given java.net.URL
value. | public void | setUnicodeStream(int col, InputStream in, int length) | public String | toString() |
addBatch | public void addBatch() throws SQLException(Code) | | This QED release doesn't support batch statement execution.
exception: SQLException - "not implemented" |
clearParameters | public void clearParameters() throws SQLException(Code) | | Clear the values of any parameters to this prepared statement;
i.e., set them all to NULL
exception: SQLException - may be thrown |
executeQuery | public java.sql.ResultSet executeQuery() throws SQLException(Code) | | Execute the prepared SQL query statement, returning the
ResultSet object containing the results of the
query.
a ResultSet object containing the results ofthe query exception: SQLException - may be thrown |
executeUpdate | public int executeUpdate() throws SQLException(Code) | | Execute the prepared SQL update statement, returning the update
count, meaning the number of rows updated or inserted by this
statement.
the update count exception: SQLException - may be thrown |
getMetaData | public java.sql.ResultSetMetaData getMetaData()(Code) | | QED doesn't implement this feature, which requires information
about the ResultSet that will be generated by this
PreparedStatement object when it is executed.
Instead, first call execute() or
executeQuery() , then call
ResultSet.getMetaData() on the
ResultSet object that is returned.
null |
getParameterMetaData | public java.sql.ParameterMetaData getParameterMetaData() throws SQLException(Code) | | Retrieves the number, types and properties of this
PreparedStatement object's parameters.
QED: Not implemented
a ParameterMetaData object that contains informationabout the number, types and properties of this PreparedStatement object's parameters exception: SQLException - if a database access error occurs See Also: ParameterMetaData since: 1.4 |
setArray | public void setArray(int col, Array val) throws SQLException(Code) | | Set the statement parameter to the specified
ARRAY value.
This QED release doesn't support ARRAY types, so a
"not implemented" exception is thrown
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - "not implemented" |
setAsciiStream | public void setAsciiStream(int col, InputStream in, int length) throws SQLException(Code) | | Set the statement parameter to the specified character value using an
InputStream that contains a stream of ASCII bytes.
The ASCII bytes are converted to Unicode character values before
being inserted into the database.
Parameters: col - the parameter index Parameters: is - an input stream containing ASCII bytes. Parameters: length - the number of bytes to read from the stream an InputStream exception: SQLException - may be thrown |
setBigDecimal | public void setBigDecimal(int col, BigDecimal val) throws SQLException(Code) | | Set the statement parameter to the specified
BigDecimal value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setBinaryStream | public void setBinaryStream(int col, InputStream in, int length) throws SQLException(Code) | | Set the statement parameter to the specified binary value using an
InputStream that contains a stream of bytes.
Parameters: col - the parameter index Parameters: is - an input stream containing ASCII bytes. Parameters: length - the number of bytes to read from the streamIf 'length > 0', then the blob's length will be set to the valueof the 'length' parameter. If 'length < 0', then the blob's length will be set to the numberof bytes read. an InputStream exception: SQLException - may be thrown |
setBlob | public void setBlob(int col, Blob val) throws SQLException(Code) | | Set the statement parameter to the specified
Blob value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setBoolean | public void setBoolean(int col, boolean val) throws SQLException(Code) | | Set the statement parameter to the specified
boolean value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setByte | public void setByte(int col, byte val) throws SQLException(Code) | | Set the statement parameter to the specified
byte value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setBytes | public void setBytes(int col, byte[] val) throws SQLException(Code) | | Set the statement parameter to the specified
byte array value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setCharacterStream | public void setCharacterStream(int col, Reader r, int length) throws SQLException(Code) | | Set the statement parameter to the specified character value using a
Reader that contains a stream of Unicode characters.
Parameters: col - the parameter index Parameters: r - a reader containing the value's characters. Parameters: length - the number of bytes to read from the stream an InputStream exception: SQLException - may be thrown |
setClob | public void setClob(int col, Clob val) throws SQLException(Code) | | Set the statement parameter to the specified
Clob value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setDate | public void setDate(int col, Date val) throws SQLException(Code) | | Set the statement parameter to the specified
Date value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setDate | public void setDate(int col, Date val, Calendar cal) throws SQLException(Code) | | Set the statement parameter to the specified
Date value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: cal - a Calendar object that is used for convertingthe database date to the local timezone. The database date isadjusted based on the Calendar timezone and DST offset. exception: SQLException - may be thrown |
setDouble | public void setDouble(int col, double val) throws SQLException(Code) | | Set the statement parameter to the specified
double value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setFloat | public void setFloat(int col, float val) throws SQLException(Code) | | Set the statement parameter to the specified
float value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setInt | public void setInt(int col, int val) throws SQLException(Code) | | Set the statement parameter to the specified
int value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setLong | public void setLong(int col, long val) throws SQLException(Code) | | Set the statement parameter to the specified
long value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setNull | public void setNull(int col, int type) throws SQLException(Code) | | Set the statement parameter to the specified
null value.
Parameters: col - the parameter index Parameters: type - the JDBC type of the parameter. This is ignored by QEDbecause a null is a null is a null. exception: SQLException - may be thrown |
setNull | public void setNull(int col, int type, String typename) throws SQLException(Code) | | Set the statement parameter to the specified
null value.
Parameters: col - the parameter index Parameters: type - the JDBC type of the parameter. This is ignored by QEDbecause a null is a null is a null. Parameters: typename - the fully qualified type name of the parameter.This is ignored by QEDbecause a null is a null is a null. exception: SQLException - may be thrown |
setObject | public void setObject(int col, Object val) throws SQLException(Code) | | Set the statement parameter to the specified
Object value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setObject | public void setObject(int col, Object val, int type) throws SQLException(Code) | | Set the statement parameter to the specified
Object value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: type - the JDBC type of the parameter. exception: SQLException - may be thrown |
setObject | public void setObject(int col, Object val, int type, int scale) throws SQLException(Code) | | Set the statement parameter to the specified
Object value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: type - the JDBC type of the parameter. Parameters: scale - for numeric types, the precision of the value. exception: SQLException - may be thrown |
setRef | public void setRef(int col, Ref val) throws SQLException(Code) | | Set the statement parameter to the specified
REF value.
This QED release doesn't support ARRAY types, so a
"not implemented" exception is thrown
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - "not implemented" |
setShort | public void setShort(int col, short val) throws SQLException(Code) | | Set the statement parameter to the specified
short value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setString | public void setString(int col, String val) throws SQLException(Code) | | Set the statement parameter to the specified
String value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setTime | public void setTime(int col, Time val) throws SQLException(Code) | | Set the statement parameter to the specified
Time value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setTime | public void setTime(int col, Time val, Calendar cal) throws SQLException(Code) | | Set the statement parameter to the specified
Time value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: cal - a Calendar object that is used for convertingthe database date to the local timezone. The database date isadjusted based on the Calendar timezone and DST offset. exception: SQLException - may be thrown |
setTimestamp | public void setTimestamp(int col, Timestamp val) throws SQLException(Code) | | Set the statement parameter to the specified
Timestamp value.
Parameters: col - the parameter index Parameters: val - the new value exception: SQLException - may be thrown |
setTimestamp | public void setTimestamp(int col, Timestamp val, Calendar cal) throws SQLException(Code) | | Set the statement parameter to the specified
Timestamp value.
Parameters: col - the parameter index Parameters: val - the new value Parameters: cal - a Calendar object that is used for convertingthe database date to the local timezone. The database date isadjusted based on the Calendar timezone and DST offset. exception: SQLException - may be thrown |
setURL | public void setURL(int parameterIndex, java.net.URL x) throws SQLException(Code) | | Sets the designated parameter to the given java.net.URL
value.
The driver converts this to an SQL DATALINK value
when it sends it to the database.
QED simply converts the URL to a string
Parameters: parameterIndex - the first parameter is 1, the second is 2, ... Parameters: x - the java.net.URL object to be set exception: SQLException - if a database access error occurs since: 1.4 |
|
|