⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resultset.java

📁 一个JDBC数据库连接的组件
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
    /**     * JDBC 2.0     *     * <p>Moves to the last row in the result set.       *     * @return true if on a valid row, false if no rows in the result set.     * @exception SQLException if a database-access error occurs, or     * result set type is TYPE_FORWARD_ONLY.     */    boolean last() throws SQLException;    /**     * JDBC 2.0     *     * <p>Determine the current row number.  The first row is number 1, the     * second number 2, etc.       *     * @return the current row number, else return 0 if there is no      * current row, or when on the insert row.     * @exception SQLException if a database-access error occurs.     */    int getRow() throws SQLException;    /**     * JDBC 2.0     *     * <p>Move to an absolute row number in the result set.     *     * <p>If row is positive, moves to an absolute row with respect to the     * beginning of the result set.  The first row is row 1, the second     * is row 2, etc.      *     * <p>If row is negative, moves to an absolute row position with respect to     * the end of result set.  For example, calling absolute(-1) positions the      * cursor on the last row, absolute(-2) indicates the next-to-last     * row, etc.     *     * <p>An attempt to position the cursor beyond the first/last row in     * the result set, leaves the cursor before/after the first/last     * row, respectively.     *     * <p>Note: Calling absolute(1) is the same as calling first().     * Calling absolute(-1) is the same as calling last().     *     * @return true if on the result set, false if off.     * @exception SQLException if a database-access error occurs, or      * row is 0, or result set type is TYPE_FORWARD_ONLY.     */    boolean absolute( int row ) throws SQLException;    /**     * JDBC 2.0     *     * <p>Moves a relative number of rows, either positive or negative.     * Attempting to move beyond the first/last row in the     * result set positions the cursor before/after the     * the first/last row. Calling relative(0) is valid, but does     * not change the cursor position.     *     * <p>Note: Calling relative(1) is different than calling next()     * since is makes sense to call next() when there is no current row,     * for example, when the cursor is positioned before the first row     * or after the last row of the result set.     *     * @return true if on a row, false otherwise.     * @exception SQLException if a database-access error occurs, or there     * is no current row, or result set type is TYPE_FORWARD_ONLY.     */    boolean relative( int rows ) throws SQLException;    /**     * JDBC 2.0     *     * <p>Moves to the previous row in the result set.       *     * <p>Note: previous() is not the same as relative(-1) since it     * makes sense to call previous() when there is no current row.     *     * @return true if on a valid row, false if off the result set.     * @exception SQLException if a database-access error occurs, or     * result set type is TYPE_FORWAR_DONLY.     */    boolean previous() throws SQLException;    //---------------------------------------------------------------------    // Properties    //---------------------------------------------------------------------    /**     * JDBC 2.0     *     * The rows in a result set will be processed in a forward direction;     * first-to-last.     */    int FETCH_FORWARD = 1000;    /**     * JDBC 2.0     *     * The rows in a result set will be processed in a reverse direction;     * last-to-first.     */    int FETCH_REVERSE = 1001;    /**     * JDBC 2.0     *      * The order in which rows in a result set will be processed is unknown.     */    int FETCH_UNKNOWN = 1002;    /**     * JDBC 2.0     *     * Give a hint as to the direction in which the rows in this result set     * will be processed.  The initial value is determined by the statement     * that produced the result set.  The fetch direction may be changed     * at any time.     *     * @exception SQLException if a database-access error occurs, or     * the result set type is TYPE_FORWARD_ONLY and direction is not      * FETCH_FORWARD.     */    void setFetchDirection(int direction) throws SQLException;    /**     * JDBC 2.0     *     * Return the fetch direction for this result set.     *     * @exception SQLException if a database-access error occurs      */    int getFetchDirection() throws SQLException;    /**     * JDBC 2.0     *     * Give the JDBC driver a hint as to the number of rows that should      * be fetched from the database when more rows are needed for this result     * set.  If the fetch size specified is zero, then the JDBC driver      * ignores the value, and is free to make its own best guess as to what     * the fetch size should be.  The default value is set by the statement      * that creates the result set.  The fetch size may be changed at any      * time.     *     * @param rows the number of rows to fetch     * @exception SQLException if a database-access error occurs, or the     * condition 0 <= rows <= this.getMaxRows() is not satisfied.     */    void setFetchSize(int rows) throws SQLException;    /**     * JDBC 2.0     *     * Return the fetch size for this result set.     *     * @exception SQLException if a database-access error occurs      */    int getFetchSize() throws SQLException;    /**     * JDBC 2.0     */    int TYPE_FORWARD_ONLY = 1003;    /**     * JDBC 2.0     */    int TYPE_SCROLL_INSENSITIVE = 1004;    /**     * JDBC 2.0     */    int TYPE_SCROLL_SENSITIVE = 1005;    /**     * JDBC 2.0     *     * Return the type of this result set.  The type is determined based     * on the statement that created the result set.     *     * @return TYPE_FORWARD_ONLY, TYPE_STATIC, TYPE_KEYSET, or      * TYPE_DYNAMIC.     * @exception SQLException if a database-access error occurs     */    int getType() throws SQLException;    /**     * JDBC 2.0     *      *       */    int CONCUR_READ_ONLY = 1007;    /**     * JDBC 2.0     *      *       */    int CONCUR_UPDATABLE = 1008;    /**     * JDBC 2.0     *     * Return the concurrency of this result set.  The concurrency     * used is determined by the statement that created the result set.     *     * @return the concurrency type, CONCUR_READ_ONLY, etc.     * @exception SQLException if a database-access error occurs     */    int getConcurrency() throws SQLException;    //---------------------------------------------------------------------    // Updates    //---------------------------------------------------------------------    /**     * JDBC 2.0     *     * Determine if the current row has been updated.      *     * The value returned depends on whether or not the result set     * can detect changes, see DatabaseMetaData.rowUpdatesAreDetected().     *     * @return true if updated and changes are detected     * @exception SQLException if a database-access error occurs     *      * @see DatabaseMetaData#detectsRowChanges     */    boolean rowUpdated() throws SQLException;    /**     * JDBC 2.0     *     * Determine if the current row has been inserted.      *     * The value returned depends on whether or not the result set     * can detect changes, see DatabaseMetaData.rowInsertsAreDetected().     *     * @return true if inserted and changes are detected     * @exception SQLException if a database-access error occurs     *      * @see DatabaseMetaData#detectsRowChanges     */    boolean rowInserted() throws SQLException;       /**     * JDBC 2.0     *     * Determine if this row has been deleted.  A result set of type     * keyset or static may contain rows that have been deleted.     *     * The value returned depends on whether or not the result set     * can detect changes, see DatabaseMetaData.rowDeletesAreDetected().     *     * @return true if deleted and changes are detected     * @exception SQLException if a database-access error occurs     *      * @see DatabaseMetaData#detectsRowChanges     */    boolean rowDeleted() throws SQLException;    /**      * The updateXXX() methods are used to update column values in the     * current row, or the insert row.       * The updateXXX() methods do not update the underlying     * database, instead, they update an in-memory copy of the data read      * from the database.     *       * The insert row is a special row associated with an updatable     * result set.  It is essentially a buffer where a new row may     * be constructed by calling the updateXXX() methods prior to      * inserting the row into the result set.     *     * To update the underlying database, updateRow(), insertRow, or     * deleteRow may be called.     */    /**     * JDBC 2.0     */    void updateNull(int columnIndex) throws SQLException;      /**     * JDBC 2.0     */    void updateBoolean(int columnIndex, boolean x) throws SQLException;    /**     * JDBC 2.0     */    void updateByte(int columnIndex, byte x) throws SQLException;    /**     * JDBC 2.0     */    void updateShort(int columnIndex, short x) throws SQLException;    /**     * JDBC 2.0     */    void updateInt(int columnIndex, int x) throws SQLException;    /**     * JDBC 2.0     */    void updateLong(int columnIndex, long x) throws SQLException;    /**     * JDBC 2.0     */    void updateFloat(int columnIndex, float x) throws SQLException;    /**     * JDBC 2.0     */    void updateDouble(int columnIndex, double x) throws SQLException;    /**     * JDBC 2.0     */    void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException;    /**     * JDBC 2.0     */    void updateString(int columnIndex, String x) throws SQLException;    /**     * JDBC 2.0     */    void updateBytes(int columnIndex, byte x[]) throws SQLException;    /**     * JDBC 2.0     */    void updateDate(int columnIndex, java.sql.Date x) throws SQLException;    /**     * JDBC 2.0     */    void updateTime(int columnIndex, java.sql.Time x) throws SQLException;    /**     * JDBC 2.0     */    void updateTimestamp(int columnIndex, java.sql.Timestamp x)      throws SQLException;    /**      * JDBC 2.0     */    void updateAsciiStream(int columnIndex, 			   java.io.InputStream x, 			   int length) throws SQLException;    /**      * JDBC 2.0     */    void updateBinaryStream(int columnIndex, 			    java.io.InputStream x,			    int length) throws SQLException;    /**

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -