📄 jdbcstatement.java
字号:
* * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 /** * <!-- start generic documentation --> * 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. <p> * <!-- end generic documentation --> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB 1.7.1 does not support this feature. <p> * * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public int executeUpdate(String sql, int columnIndexes[]) throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 /** * <!-- start generic documentation --> * 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. <p> * <!-- end generic documentation --> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB 1.7.1 does not support this feature. <p> * * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public int executeUpdate(String sql, String columnNames[]) throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 /** * <!-- start generic documentation --> * 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). <p> * <!-- end generic documentation --> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB 1.7.1 does not support this feature. <p> * * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 /** * <!-- start generic documentation --> * 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). <p> * <!-- end generic documentation --> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB 1.7.1 does not support this feature. <p> * * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public boolean execute(String sql, int columnIndexes[]) throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 /** * <!-- start generic documentation --> * 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). <p> * <!-- end generic documentation --> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB 1.7.1 does not support this feature. <p> * * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public boolean execute(String sql, String columnNames[]) throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 /** * <!-- start generic documentation --> * Retrieves the result set holdability for <code>ResultSet</code> objects * generated by this <code>Statement</code> object. <p> * <!-- end generic documentation --> * * <!-- start release-specific documentation --> * <span class="ReleaseSpecificDocumentation"> * <b>HSQLDB-Specific Information:</b> <p> * * HSQLDB 1.7.1 does not support this feature. <p> * * Calling this method always throws a <CODE>SQLException</CODE>, * stating that the function is not supported. <p> * * </span> * <!-- end release-specific documentation --> * * @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 JDK 1.4, HSQLDB 1.7 *///#ifdef JDBC3/* public int getResultSetHoldability() throws SQLException { throw Trace.error(Trace.FUNCTION_NOT_SUPPORTED, "JDBC3"); }*///#endif JDBC3 // -------------------- Internal Implementation ---------------------------- /** * Constructs a new jdbcStatement using the specified connection. * * @param c the connection on which this statement will execute */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -