Example usage for Java java.sql PreparedStatement fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addBatch() Adds a set of parameters to this PreparedStatement object's batch of commands. |
void | addBatch(String sql) Adds the given SQL command to the current list of commands for this Statement object. |
void | cancel() Cancels this Statement object if both the DBMS and driver support aborting an SQL statement. |
void | clearBatch() Empties this Statement object's current list of SQL commands. |
void | clearParameters() Clears the current parameter values immediately. |
void | clearWarnings() Clears all the warnings reported on this Statement object. |
void | close() Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. |
boolean | execute() Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement. |
boolean | execute(String sql) Executes the given SQL statement, which may return multiple results. |
int[] | executeBatch() Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. |
ResultSet | executeQuery() Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query. |
ResultSet | executeQuery(String sql) Executes the given SQL statement, which returns a single ResultSet object. |
int | executeUpdate() Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT , UPDATE or DELETE ; or an SQL statement that returns nothing, such as a DDL statement. |
int | executeUpdate(String sql) Executes the given SQL statement, which may be an INSERT , UPDATE , or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. |
Class> | getClass() Returns the runtime class of this Object . |
Connection | getConnection() Retrieves the Connection object that produced this Statement object. |
ResultSet | getGeneratedKeys() Retrieves any auto-generated keys created as a result of executing this Statement object. |
int | getMaxRows() Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. |
ResultSetMetaData | getMetaData() Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed. |
boolean | getMoreResults() Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet . |
ParameterMetaData | getParameterMetaData() Retrieves the number, types and properties of this PreparedStatement object's parameters. |
int | getQueryTimeout() Retrieves the number of seconds the driver will wait for a Statement object to execute. |
ResultSet | getResultSet() Retrieves the current result as a ResultSet object. |
int | getUpdateCount() Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. |
SQLWarning | getWarnings() Retrieves the first warning reported by calls on this Statement object. |
boolean | isClosed() Retrieves whether this Statement object has been closed. |
void | setArray(int parameterIndex, Array x) Sets the designated parameter to the given java.sql.Array object. |
void | setAsciiStream(int parameterIndex, java.io.InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void | setAsciiStream(int parameterIndex, java.io.InputStream x, long length) Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void | setBigDecimal(int parameterIndex, BigDecimal x) Sets the designated parameter to the given java.math.BigDecimal value. |
void | setBinaryStream(int parameterIndex, java.io.InputStream x, int length) Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void | setBinaryStream(int parameterIndex, java.io.InputStream x, long length) Sets the designated parameter to the given input stream, which will have the specified number of bytes. |
void | setBinaryStream(int parameterIndex, java.io.InputStream x) Sets the designated parameter to the given input stream. |
void | setBlob(int parameterIndex, Blob x) Sets the designated parameter to the given java.sql.Blob object. |
void | setBlob(int parameterIndex, InputStream inputStream) Sets the designated parameter to a InputStream object. |
void | setBlob(int parameterIndex, InputStream inputStream, long length) Sets the designated parameter to a InputStream object. |
void | setBoolean(int parameterIndex, boolean x) Sets the designated parameter to the given Java boolean value. |
void | setByte(int parameterIndex, byte x) Sets the designated parameter to the given Java byte value. |
void | setBytes(int parameterIndex, byte x[]) Sets the designated parameter to the given Java array of bytes. |
void | setCharacterStream(int parameterIndex, java.io.Reader reader) Sets the designated parameter to the given Reader object. |
void | setCharacterStream(int parameterIndex, java.io.Reader reader, int length) Sets the designated parameter to the given Reader object, which is the given number of characters long. |
void | setCharacterStream(int parameterIndex, java.io.Reader reader, long length) Sets the designated parameter to the given Reader object, which is the given number of characters long. |
void | setClob(int parameterIndex, Clob x) Sets the designated parameter to the given java.sql.Clob object. |
void | setClob(int parameterIndex, Reader reader) Sets the designated parameter to a Reader object. |
void | setClob(int parameterIndex, Reader reader, long length) Sets the designated parameter to a Reader object. |
void | setDate(int parameterIndex, java.sql.Date x) Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. |
void | setDate(int parameterIndex, java.sql.Date x, Calendar cal) Sets the designated parameter to the given java.sql.Date value, using the given Calendar object. |
void | setDouble(int parameterIndex, double x) Sets the designated parameter to the given Java double value. |
void | setEscapeProcessing(boolean enable) Sets escape processing on or off. |
void | setFetchDirection(int direction) Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object. |
void | setFetchSize(int rows) Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet objects generated by this Statement . |
void | setFloat(int parameterIndex, float x) Sets the designated parameter to the given Java float value. |
void | setInt(int parameterIndex, int x) Sets the designated parameter to the given Java int value. |
void | setLong(int parameterIndex, long x) Sets the designated parameter to the given Java long value. |
void | setMaxFieldSize(int max) Sets the limit for the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object. |
void | setMaxRows(int max) Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number. |
void | setNClob(int parameterIndex, Reader reader, long length) Sets the designated parameter to a Reader object. |
void | setNString(int parameterIndex, String value) Sets the designated parameter to the given String object. |
void | setNull(int parameterIndex, int sqlType) Sets the designated parameter to SQL NULL . |
void | setNull(int parameterIndex, int sqlType, String typeName) Sets the designated parameter to SQL NULL . |
void | setObject(int parameterIndex, Object x) Sets the value of the designated parameter using the given object. |
void | setObject(int parameterIndex, Object x, int targetSqlType) Sets the value of the designated parameter with the given object. |
void | setObject(int parameterIndex, Object x, SQLType targetSqlType) Sets the value of the designated parameter with the given object. |
void | setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) Sets the value of the designated parameter with the given object. |
void | setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) Sets the value of the designated parameter with the given object. |
void | setQueryTimeout(int seconds) Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. |
void | setRef(int parameterIndex, Ref x) Sets the designated parameter to the given REF(<structured-type>) value. |
void | setRowId(int parameterIndex, RowId x) Sets the designated parameter to the given java.sql.RowId object. |
void | setShort(int parameterIndex, short x) Sets the designated parameter to the given Java short value. |
void | setSQLXML(int parameterIndex, SQLXML xmlObject) Sets the designated parameter to the given java.sql.SQLXML object. |
void | setString(int parameterIndex, String x) Sets the designated parameter to the given Java String value. |
void | setTime(int parameterIndex, java.sql.Time x) Sets the designated parameter to the given java.sql.Time value. |
void | setTime(int parameterIndex, java.sql.Time x, Calendar cal) Sets the designated parameter to the given java.sql.Time value, using the given Calendar object. |
void | setTimestamp(int parameterIndex, java.sql.Timestamp x) Sets the designated parameter to the given java.sql.Timestamp value. |
void | setTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal) Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object. |
void | setURL(int parameterIndex, java.net.URL x) Sets the designated parameter to the given java.net.URL value. |
String | toString() Returns a string representation of the object. |
T | unwrap(java.lang.Class Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |