abstractjdbc3statement.java
来自「PostgreSQL7.4.6 for Linux」· Java 代码 · 共 1,375 行 · 第 1/4 页
JAVA
1,375 行
package org.postgresql.jdbc3;import java.math.BigDecimal;import java.sql.*;import java.util.Calendar;/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc3/Attic/AbstractJdbc3Statement.java,v 1.3 2003/09/17 05:07:38 barry Exp $ * This class defines methods of the jdbc3 specification. This class extends * org.postgresql.jdbc2.AbstractJdbc2Statement which provides the jdbc2 * methods. The real Statement class (for jdbc2) is org.postgresql.jdbc3.Jdbc3Statement */public abstract class AbstractJdbc3Statement extends org.postgresql.jdbc2.AbstractJdbc2Statement{ public AbstractJdbc3Statement (AbstractJdbc3Connection c) { super(c); } public AbstractJdbc3Statement(AbstractJdbc3Connection connection, String sql) throws SQLException { super(connection, sql); } /** * Moves to this <code>Statement</code> object's next result, deals with * any current <code>ResultSet</code> object(s) according to the instructions * specified by the given flag, and returns * <code>true</code> if the next result is a <code>ResultSet</code> object. * * <P>There are no more results when the following is true: * <PRE> * <code>(!getMoreResults() && (getUpdateCount() == -1)</code> * </PRE> * * @param current one of the following <code>Statement</code> * constants indicating what should happen to current * <code>ResultSet</code> objects obtained using the method * <code>getResultSet</code: * <code>CLOSE_CURRENT_RESULT</code>, * <code>KEEP_CURRENT_RESULT</code>, or * <code>CLOSE_ALL_RESULTS</code> * @return <code>true</code> if the next result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there are no * more results * @exception SQLException if a database access error occurs * @since 1.4 * @see #execute */ public boolean getMoreResults(int current) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Retrieves any auto-generated keys created as a result of executing this * <code>Statement</code> object. If this <code>Statement</code> object did * not generate any keys, an empty <code>ResultSet</code> * object is returned. * * @return a <code>ResultSet</code> object containing the auto-generated key(s) * generated by the execution of this <code>Statement</code> object * @exception SQLException if a database access error occurs * @since 1.4 */ public ResultSet getGeneratedKeys() throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Executes the given SQL statement and signals the driver with the * given flag about whether the * auto-generated keys produced by this <code>Statement</code> object * should be made available for retrieval. * * @param sql must be an SQL <code>INSERT</code>, <code>UPDATE</code> or * <code>DELETE</code> statement or an SQL statement that * returns nothing * @param autoGeneratedKeys a flag indicating whether auto-generated keys * should be made available for retrieval; * one of the following constants: * <code>Statement.RETURN_GENERATED_KEYS</code> * <code>Statement.NO_GENERATED_KEYS</code> * @return either the row count for <code>INSERT</code>, <code>UPDATE</code> * or <code>DELETE</code> statements, or <code>0</code> for SQL * statements that return nothing * @exception SQLException if a database access error occurs, the given * SQL statement returns a <code>ResultSet</code> object, or * the given constant is not one of those allowed * @since 1.4 */ public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Executes the given SQL statement and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. The driver will ignore the array if the SQL statement * is not an <code>INSERT</code> statement. * * @param sql an SQL <code>INSERT</code>, <code>UPDATE</code> or * <code>DELETE</code> statement or an SQL statement that returns nothing, * such as an SQL DDL statement * @param columnIndexes an array of column indexes indicating the columns * that should be returned from the inserted row * @return either the row count for <code>INSERT</code>, <code>UPDATE</code>, * or <code>DELETE</code> statements, or 0 for SQL statements * that return nothing * @exception SQLException if a database access error occurs or the SQL * statement returns a <code>ResultSet</code> object * @since 1.4 */ public int executeUpdate(String sql, int columnIndexes[]) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Executes the given SQL statement and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. The driver will ignore the array if the SQL statement * is not an <code>INSERT</code> statement. * * @param sql an SQL <code>INSERT</code>, <code>UPDATE</code> or * <code>DELETE</code> statement or an SQL statement that returns nothing * @param columnNames an array of the names of the columns that should be * returned from the inserted row * @return either the row count for <code>INSERT</code>, <code>UPDATE</code>, * or <code>DELETE</code> statements, or 0 for SQL statements * that return nothing * @exception SQLException if a database access error occurs * * @since 1.4 */ public int executeUpdate(String sql, String columnNames[]) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Executes the given SQL statement, which may return multiple results, * and signals the driver that any * auto-generated keys should be made available * for retrieval. The driver will ignore this signal if the SQL statement * is not an <code>INSERT</code> statement. * <P> * In some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. * <P> * The <code>execute</code> method executes an SQL statement and indicates the * form of the first result. You must then use the methods * <code>getResultSet</code> or <code>getUpdateCount</code> * to retrieve the result, and <code>getMoreResults</code> to * move to any subsequent result(s). * * @param sql any SQL statement * @param autoGeneratedKeys a constant indicating whether auto-generated * keys should be made available for retrieval using the method * <code>getGeneratedKeys</code>; one of the following constants: * <code>Statement.RETURN_GENERATED_KEYS</code> or * <code>Statement.NO_GENERATED_KEYS</code> * @return <code>true</code> if the first result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there are * no results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults * @see #getGeneratedKeys * * @since 1.4 */ public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Executes the given SQL statement, which may return multiple results, * and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. This array contains the indexes of the columns in the * target table that contain the auto-generated keys that should be made * available. The driver will ignore the array if the given SQL statement * is not an <code>INSERT</code> statement. * <P> * Under some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. * <P> * The <code>execute</code> method executes an SQL statement and indicates the * form of the first result. You must then use the methods * <code>getResultSet</code> or <code>getUpdateCount</code> * to retrieve the result, and <code>getMoreResults</code> to * move to any subsequent result(s). * * @param sql any SQL statement * @param columnIndexes an array of the indexes of the columns in the * inserted row that should be made available for retrieval by a * call to the method <code>getGeneratedKeys</code> * @return <code>true</code> if the first result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there * are no results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults * * @since 1.4 */ public boolean execute(String sql, int columnIndexes[]) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Executes the given SQL statement, which may return multiple results, * and signals the driver that the * auto-generated keys indicated in the given array should be made available * for retrieval. This array contains the names of the columns in the * target table that contain the auto-generated keys that should be made * available. The driver will ignore the array if the given SQL statement * is not an <code>INSERT</code> statement. * <P> * In some (uncommon) situations, a single SQL statement may return * multiple result sets and/or update counts. Normally you can ignore * this unless you are (1) executing a stored procedure that you know may * return multiple results or (2) you are dynamically executing an * unknown SQL string. * <P> * The <code>execute</code> method executes an SQL statement and indicates the * form of the first result. You must then use the methods * <code>getResultSet</code> or <code>getUpdateCount</code> * to retrieve the result, and <code>getMoreResults</code> to * move to any subsequent result(s). * * @param sql any SQL statement * @param columnNames an array of the names of the columns in the inserted * row that should be made available for retrieval by a call to the * method <code>getGeneratedKeys</code> * @return <code>true</code> if the next result is a <code>ResultSet</code> * object; <code>false</code> if it is an update count or there * are no more results * @exception SQLException if a database access error occurs * @see #getResultSet * @see #getUpdateCount * @see #getMoreResults * @see #getGeneratedKeys * * @since 1.4 */ public boolean execute(String sql, String columnNames[]) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Retrieves the result set holdability for <code>ResultSet</code> objects * generated by this <code>Statement</code> object. * * @return either <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code> * @exception SQLException if a database access error occurs * * @since 1.4 */ public int getResultSetHoldability() throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Sets the designated parameter to the given <code>java.net.URL</code> value. * The driver converts this to an SQL <code>DATALINK</code> value * when it sends it to the database. * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the <code>java.net.URL</code> object to be set * @exception SQLException if a database access error occurs * @since 1.4 */ public void setURL(int parameterIndex, java.net.URL x) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Retrieves the number, types and properties of this * <code>PreparedStatement</code> object's parameters. * * @return a <code>ParameterMetaData</code> object that contains information * about the number, types and properties of this * <code>PreparedStatement</code> object's parameters * @exception SQLException if a database access error occurs * @see ParameterMetaData * @since 1.4 */ public ParameterMetaData getParameterMetaData() throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Registers the OUT parameter named * <code>parameterName</code> to the JDBC type * <code>sqlType</code>. All OUT parameters must be registered * before a stored procedure is executed. * <p> * The JDBC type specified by <code>sqlType</code> for an OUT * parameter determines the Java type that must be used * in the <code>get</code> method to read the value of that parameter. * <p> * If the JDBC type expected to be returned to this output parameter * is specific to this particular database, <code>sqlType</code> * should be <code>java.sql.Types.OTHER</code>. The method * {@link #getObject} retrieves the value. * @param parameterName the name of the parameter * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>. * If the parameter is of JDBC type <code>NUMERIC</code> * or <code>DECIMAL</code>, the version of * <code>registerOutParameter</code> that accepts a scale value * should be used. * @exception SQLException if a database access error occurs * @since 1.4 * @see Types */ public void registerOutParameter(String parameterName, int sqlType) throws SQLException { throw org.postgresql.Driver.notImplemented(); } /** * Registers the parameter named * <code>parameterName</code> to be of JDBC type
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?