PreparedStatement
object. This object can then be used to efficiently execute this statement multiple times. Note: The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type Integer, then setInt should be used.
If arbitrary parameter type conversions are required, then the setObject method should be used with a target SQL type.
For instance, this is just a dirty copy/paste from the PostgreSQL driver ! Implementation has to be completly checked and revised.
java.sql.PreparedStatement
PreparedStatement.java の 68 行で定義されています。
Public メソッド | |
PreparedStatement (Connection connection, String sqlStatement) throws SQLException | |
void | close () throws SQLException |
java.sql.ResultSet | executeQuery () throws SQLException |
int | executeUpdate () throws SQLException |
void | setNull (int parameterIndex, int sqlType) throws SQLException |
void | setBoolean (int parameterIndex, boolean x) throws SQLException |
void | setByte (int parameterIndex, byte x) throws SQLException |
void | setShort (int parameterIndex, short x) throws SQLException |
void | setInt (int parameterIndex, int x) throws SQLException |
void | setLong (int parameterIndex, long x) throws SQLException |
void | setFloat (int parameterIndex, float x) throws SQLException |
void | setDouble (int parameterIndex, double x) throws SQLException |
void | setBigDecimal (int parameterIndex, BigDecimal x) throws SQLException |
void | setBlob (int parameterIndex, java.sql.Blob x) throws SQLException |
void | setString (int parameterIndex, String x) throws SQLException |
void | setBytes (int parameterIndex, byte x[]) throws SQLException |
void | setDate (int parameterIndex, java.sql.Date x) throws SQLException |
void | setTime (int parameterIndex, Time x) throws SQLException |
void | setTimestamp (int parameterIndex, Timestamp x) throws SQLException |
void | setAsciiStream (int parameterIndex, InputStream x, int length) throws SQLException |
void | setUnicodeStream (int parameterIndex, InputStream x, int length) throws SQLException |
void | setBinaryStream (int parameterIndex, InputStream x, int length) throws SQLException |
void | clearParameters () throws SQLException |
void | setObject (int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException |
void | setObject (int parameterIndex, Object x, int targetSqlType) throws SQLException |
void | setObject (int parameterIndex, Object x) throws SQLException |
boolean | execute () throws SQLException |
String | toString () |
void | addBatch () throws SQLException |
java.sql.ResultSetMetaData | getMetaData () throws SQLException |
void | setArray (int i, Array x) throws SQLException |
void | setBlob (int i, Blob x) throws SQLException |
void | setCharacterStream (int i, java.io.Reader x, int length) throws SQLException |
void | setClob (int i, Clob x) throws SQLException |
void | setNull (int i, int t, String s) throws SQLException |
void | setRef (int i, Ref x) throws SQLException |
void | setDate (int i, java.sql.Date d, java.util.Calendar cal) throws SQLException |
void | setTime (int i, Time t, java.util.Calendar cal) throws SQLException |
void | setTimestamp (int i, Timestamp t, java.util.Calendar cal) throws SQLException |
void | setURL (int parameterIndex, java.net.URL x) throws SQLException |
ParameterMetaData | getParameterMetaData () throws SQLException |
Protected メソッド | |
synchronized String | compileQuery () throws SQLException |
String | doEscapeProcessing (String x) |
void | setGeneratedKeysFlag (int autoGeneratedKeys) |
Protected 変数 | |
String | sql |
Private メソッド | |
void | set (int paramIndex, String s) throws SQLException |
Private 変数 | |
String[] | templateStrings |
String[] | inStrings |
StringBuffer | sbuf = new StringBuffer() |
|
Constructor. Splits the SQL statement into segments - separated by the arguments. When we rebuild the thing with the arguments, we can substitute the args and join the whole thing together.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.PreparedStatement.inStrings, org.objectweb.cjdbc.driver.PreparedStatement.sql, と org.objectweb.cjdbc.driver.PreparedStatement.templateStrings.
|
|
This parses the query and adds it to the current batch
参照先 org.objectweb.cjdbc.driver.PreparedStatement.compileQuery().
|
|
In general, parameter values remain in force for repeated used of a
参照先 org.objectweb.cjdbc.driver.PreparedStatement.inStrings. 参照元 org.objectweb.cjdbc.driver.PreparedStatement.PreparedStatement().
|
|
Release objects for garbage collection and call Statement.close().
org.objectweb.cjdbc.driver.Statementを再定義しています。 PreparedStatement.java の 122 行で定義されています。 参照先 org.objectweb.cjdbc.driver.PreparedStatement.inStrings, org.objectweb.cjdbc.driver.PreparedStatement.sql, と org.objectweb.cjdbc.driver.PreparedStatement.templateStrings.
|
|
Helper - this compiles the SQL query from the various parameters This is identical to toString() except it throws an exception if a parameter is unused.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.inStrings, org.objectweb.cjdbc.driver.PreparedStatement.sbuf, と org.objectweb.cjdbc.driver.PreparedStatement.templateStrings. 参照元 org.objectweb.cjdbc.driver.PreparedStatement.addBatch(), org.objectweb.cjdbc.driver.PreparedStatement.execute(), org.objectweb.cjdbc.driver.PreparedStatement.executeQuery(), と org.objectweb.cjdbc.driver.PreparedStatement.executeUpdate().
|
|
Escape the input string.
参照先 org.objectweb.cjdbc.driver.Connection.getEscapeChar(), org.objectweb.cjdbc.driver.Connection.isEscapeBackslash(), org.objectweb.cjdbc.driver.Connection.isEscapeSingleQuote(), と org.objectweb.cjdbc.driver.PreparedStatement.sbuf. 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setString().
|
|
Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by
参照先 org.objectweb.cjdbc.driver.PreparedStatement.compileQuery().
|
|
A Prepared SQL query is executed and its
参照先 org.objectweb.cjdbc.driver.PreparedStatement.compileQuery(), と org.objectweb.cjdbc.driver.PreparedStatement.sql.
|
|
Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.compileQuery(), と org.objectweb.cjdbc.driver.PreparedStatement.sql.
|
|
Returns the
参照先 org.objectweb.cjdbc.driver.Statement.getResultSet().
|
|
Retrieves the number, types and properties of this
|
|
|
|
|
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. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from ASCII to the database char format. Note: this stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.setBinaryStream().
|
|
Sets a parameter to a java.lang.BigDecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
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. JDBC will read the data from the stream as needed, until it reaches end-of-file. Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.setBytes(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setAsciiStream(), org.objectweb.cjdbc.driver.PreparedStatement.setBlob(), と org.objectweb.cjdbc.driver.PreparedStatement.setUnicodeStream().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.setBinaryStream().
|
|
Sets a parameter to a
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.setBytes(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets a parameter to a Java boolean value. The driver converts this to a SQL BIT value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanFalse(), org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanTrue(), と org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set().
|
|
Sets a parameter to a Java array of bytes. The driver converts this to a SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARYs) when it sends it to the database. Implementation note: with org.postgresql, this creates a large object, and stores the objects oid in this column.
参照先 org.objectweb.cjdbc.driver.Connection.escapeChar, org.objectweb.cjdbc.driver.Connection.getBlobFilter(), org.objectweb.cjdbc.driver.PreparedStatement.sbuf, と org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setBinaryStream(), org.objectweb.cjdbc.driver.PreparedStatement.setBlob(), org.objectweb.cjdbc.driver.PreparedStatement.setCharacterStream(), と org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.setBytes().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.setString().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.setDate().
|
|
Sets a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setDate(), と org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets a parameter to a Java double value. The driver converts this to a SQL DOUBLE value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Set the auto generated key flag defined in Statement
参照元 org.objectweb.cjdbc.driver.Connection.prepareStatement().
|
|
Sets a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets a parameter to a Java long value. The driver converts this to a SQL BIGINT value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.setNull().
|
|
Sets a parameter to SQL NULL. Note: you must specify the parameters SQL type (although PostgreSQL ignores it)
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setNull(), と org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
This stores an Object into a parameter.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), org.objectweb.cjdbc.driver.PreparedStatement.setBigDecimal(), org.objectweb.cjdbc.driver.PreparedStatement.setBlob(), org.objectweb.cjdbc.driver.PreparedStatement.setBoolean(), org.objectweb.cjdbc.driver.PreparedStatement.setBytes(), org.objectweb.cjdbc.driver.PreparedStatement.setDate(), org.objectweb.cjdbc.driver.PreparedStatement.setDouble(), org.objectweb.cjdbc.driver.PreparedStatement.setFloat(), org.objectweb.cjdbc.driver.PreparedStatement.setInt(), org.objectweb.cjdbc.driver.PreparedStatement.setLong(), org.objectweb.cjdbc.driver.PreparedStatement.setShort(), org.objectweb.cjdbc.driver.PreparedStatement.setString(), org.objectweb.cjdbc.driver.PreparedStatement.setTime(), org.objectweb.cjdbc.driver.PreparedStatement.setTimestamp(), と org.objectweb.cjdbc.driver.PreparedStatement.setURL().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets the value of a parameter using an object; use the The given Java object will be converted to the targetSqlType before being sent to the database.
Note that this method may be used to pass database-specific abstract data types. This is done by using a Driver-specific Java type and using a
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), org.objectweb.cjdbc.driver.PreparedStatement.setBlob(), org.objectweb.cjdbc.driver.PreparedStatement.setBoolean(), org.objectweb.cjdbc.driver.PreparedStatement.setBytes(), org.objectweb.cjdbc.driver.PreparedStatement.setDate(), org.objectweb.cjdbc.driver.PreparedStatement.setNull(), org.objectweb.cjdbc.driver.PreparedStatement.setString(), org.objectweb.cjdbc.driver.PreparedStatement.setTime(), org.objectweb.cjdbc.driver.PreparedStatement.setTimestamp(), と org.objectweb.cjdbc.driver.PreparedStatement.setURL(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
|
|
Sets a parameter to a Java short value. The driver converts this to a SQL SMALLINT value when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Sets a parameter to a Java String value. The driver converts this to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments size relative to the driver's limits on VARCHARs) when it sends it to the database.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.doEscapeProcessing(), org.objectweb.cjdbc.driver.Connection.isEscapeBackslash(), org.objectweb.cjdbc.driver.Connection.isEscapeSingleQuote(), と org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setClob(), と org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.setTime().
|
|
Sets a parameter to a
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject(), と org.objectweb.cjdbc.driver.PreparedStatement.setTime().
|
|
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.setTimestamp().
|
|
Sets a parameter to a
参照先 org.objectweb.cjdbc.driver.PreparedStatement.set(). 参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject(), と org.objectweb.cjdbc.driver.PreparedStatement.setTimestamp().
|
|
When a very large Unicode value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format. ** DEPRECIATED IN JDBC 2 ** Note: this stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
参照先 org.objectweb.cjdbc.driver.PreparedStatement.setBinaryStream().
|
|
Sets the designated parameter to the given
参照元 org.objectweb.cjdbc.driver.PreparedStatement.setObject().
|
|
Returns the SQL statement with the current template values substituted.
Note: : This is identical to
参照先 org.objectweb.cjdbc.driver.PreparedStatement.inStrings, org.objectweb.cjdbc.driver.PreparedStatement.sbuf, と org.objectweb.cjdbc.driver.PreparedStatement.templateStrings.
|
|
PreparedStatement.java の 74 行で定義されています。 参照元 org.objectweb.cjdbc.driver.PreparedStatement.clearParameters(), org.objectweb.cjdbc.driver.PreparedStatement.close(), org.objectweb.cjdbc.driver.PreparedStatement.compileQuery(), org.objectweb.cjdbc.driver.PreparedStatement.PreparedStatement(), org.objectweb.cjdbc.driver.PreparedStatement.set(), と org.objectweb.cjdbc.driver.PreparedStatement.toString(). |
|
PreparedStatement.java の 77 行で定義されています。 参照元 org.objectweb.cjdbc.driver.PreparedStatement.compileQuery(), org.objectweb.cjdbc.driver.PreparedStatement.doEscapeProcessing(), org.objectweb.cjdbc.driver.PreparedStatement.setBytes(), と org.objectweb.cjdbc.driver.PreparedStatement.toString(). |
|
PreparedStatement.java の 72 行で定義されています。 参照元 org.objectweb.cjdbc.driver.PreparedStatement.close(), org.objectweb.cjdbc.driver.PreparedStatement.executeQuery(), org.objectweb.cjdbc.driver.PreparedStatement.executeUpdate(), と org.objectweb.cjdbc.driver.PreparedStatement.PreparedStatement(). |
|
PreparedStatement.java の 73 行で定義されています。 参照元 org.objectweb.cjdbc.driver.PreparedStatement.close(), org.objectweb.cjdbc.driver.PreparedStatement.compileQuery(), org.objectweb.cjdbc.driver.PreparedStatement.PreparedStatement(), と org.objectweb.cjdbc.driver.PreparedStatement.toString(). |