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

📄 tinysqlresultset.java

📁 TinySQL是一个轻量级的纯java数据库引擎
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
     * JDBC 2.0
     *
     * <p>Moves the cursor to the last row in the result set.  
     *
     * @return true if the cursor is on a valid row;
         * false if there are no rows in the result set
     * @exception SQLException if a database access error occurs or the
     * result set type is TYPE_FORWARD_ONLY.
     */
    public boolean last() throws SQLException {
      return false;
    }

    /**
     * JDBC 2.0
     *
     * <p>Retrieves the current row number.  The first row is number 1, the
     * second number 2, and so on.  
     *
     * @return the current row number; 0 if there is no current row
     * @exception SQLException if a database access error occurs
     */
    public int getRow() throws SQLException {
      return 0;
    }

    /**
     * JDBC 2.0
     *
     * <p>Moves the cursor to the given row number in the result set.
     *
     * <p>If the row number is positive, the cursor moves to 
         * the given row number with respect to the
     * beginning of the result set.  The first row is row 1, the second
     * is row 2, and so on. 
     *
     * <p>If the given row number is negative, the cursor moves to
         * an absolute row position with respect to
     * the end of the result set.  For example, calling
         * <code>absolute(-1)</code> positions the 
     * cursor on the last row, <code>absolute(-2)</code> indicates the next-to-last
     * row, and so on.
     *
     * <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 <code>absolute(1)</code> is the same
         * as calling <code>first()</code>.
     * Calling <code>absolute(-1)</code> is the same as calling <code>last()</code>.
     *
     * @return true if the cursor is on the result set; false otherwise
     * @exception SQLException if a database access error occurs or 
     * row is 0, or result set type is TYPE_FORWARD_ONLY.
     */
    public boolean absolute( int row ) throws SQLException {
      return false;
    }

    /**
     * JDBC 2.0
     *
     * <p>Moves the cursor 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 <code>relative(0)</code> is valid, but does
     * not change the cursor position.
     *
     * <p>Note: Calling <code>relative(1)</code>
         * is different from calling <code>next()</code>
     * because is makes sense to call <code>next()</code> 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 the cursor is on a row; false otherwise
     * @exception SQLException if a database access error occurs, there
     * is no current row, or the result set type is TYPE_FORWARD_ONLY
     */
    public boolean relative( int rows ) throws SQLException {
      return false;
    }

    /**
     * JDBC 2.0
     *
     * <p>Moves the cursor to the previous row in the result set.  
     *
     * <p>Note: <code>previous()</code> is not the same as
         * <code>relative(-1)</code> because it
     * makes sense to call</code>previous()</code> when there is no current row.
     *
     * @return true if the cursor is on a valid row; false if it is off the result set
     * @exception SQLException if a database access error occurs or the
     * result set type is TYPE_FORWARD_ONLY
     */
    public boolean previous() throws SQLException {
      return false;
    }

    //---------------------------------------------------------------------
    // 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
     *
     * Gives 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 the fetch direction is not 
     * FETCH_FORWARD.
     */
    public void setFetchDirection(int direction) throws SQLException {
      return ;
    }

    /**
     * JDBC 2.0
     *
     * Returns the fetch direction for this result set.
     *
         * @return the current fetch direction for this result set
     * @exception SQLException if a database access error occurs
     */
    public int getFetchDirection() throws SQLException {
      return FETCH_FORWARD;
    }

    /**
     * JDBC 2.0
     *
     * 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 this result
     * set.  If the fetch size specified is zero, 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 created 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.
     */
    public void setFetchSize(int rows) throws SQLException {
      if (rows <= 0)
    		throw new SQLException ("Condition 0 <= rows <= this.getMaxRows() is not satisfied");
    
      result.setFetchSize (rows);
    }

    /**
     * JDBC 2.0
     *
     * Returns the fetch size for this result set.
     *
         * @return the current fetch size for this result set
     * @exception SQLException if a database access error occurs
     */
    public int getFetchSize() throws SQLException {
      return result.getFetchSize ();
    }

    /**
     * JDBC 2.0
         * The type for a <code>ResultSet</code> object whose cursor may
         * move only forward.
     */
    int TYPE_FORWARD_ONLY = 1003;

    /**
     * JDBC 2.0
         * The type for a <code>ResultSet</code> object that is scrollable
         * but generally not sensitive to changes made by others.
         * 
     */
    int TYPE_SCROLL_INSENSITIVE = 1004;

    /**
     * JDBC 2.0
         * The type for a <code>ResultSet</code> object that is scrollable
         * and generally sensitive to changes made by others.
     */
    int TYPE_SCROLL_SENSITIVE = 1005;

    /**
     * JDBC 2.0
     *
     * Returns the type of this result set.  The type is determined by
     * the statement that created the result set.
     *
     * @return TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or
         * TYPE_SCROLL_SENSITIVE
     * @exception SQLException if a database access error occurs
     */
    public int getType() throws SQLException {
      return result.getType (); 
    }

    /**
     * JDBC 2.0
         * The concurrency mode for a <code>ResultSet</code> object
         * that may NOT be updated.
     *  
     */
    int CONCUR_READ_ONLY = 1007;

    /**
     * JDBC 2.0
         * The concurrency mode for a <code>ResultSet</code> object
         * that may be updated.
     * 
     */
    int CONCUR_UPDATABLE = 1008;

    /**
     * JDBC 2.0
     *
     * Returns the concurrency mode of this result set.  The concurrency
     * used is determined by the statement that created the result set.
     *
     * @return the concurrency type, CONCUR_READ_ONLY or CONCUR_UPDATABLE
     * @exception SQLException if a database access error occurs
     */
    public int getConcurrency() throws SQLException {
      return CONCUR_READ_ONLY;
    }

    //---------------------------------------------------------------------
    // Updates
    //---------------------------------------------------------------------

    /**
     * JDBC 2.0
     *
     * Indicates whether the current row has been updated.  The value returned 
     * depends on whether or not the result set can detect updates.
     *
     * @return true if the row has been visibly updated by the owner or
     * another, and updates are detected
     * @exception SQLException if a database access error occurs
     * 
     * @see DatabaseMetaData#updatesAreDetected
     */
    public boolean rowUpdated() throws SQLException {
      return false;
    }

    /**
     * JDBC 2.0
     *
     * Indicates whether the current row has had an insertion.  The value returned 
     * depends on whether or not the result set can detect visible inserts.
     *
     * @return true if a row has had an insertion and insertions are detected
     * @exception SQLException if a database access error occurs
     * 
     * @see DatabaseMetaData#insertsAreDetected
     */
    public boolean rowInserted() throws SQLException {
      return false;
    }

    /**
     * JDBC 2.0
     *
     * Indicates whether a row has been deleted.  A deleted row may leave
     * a visible "hole" in a result set.  This method can be used to
     * detect holes in a result set.  The value returned depends on whether 
     * or not the result set can detect deletions.
     *
     * @return true if a row was deleted and deletions are detected
     * @exception SQLException if a database access error occurs
     * 
     * @see DatabaseMetaData#deletesAreDetected
     */
    public boolean rowDeleted() throws SQLException {
      return false;
    }

    /**
     * JDBC 2.0
     * 
     * Give a nullable column a null value.
     * 
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
     * methods are called to update the database.
     *
     * @param columnIndex the first column is 1, the second is 2, ...
     * @exception SQLException if a database access error occurs
     */
    public void updateNull(int columnIndex) throws SQLException  {
      throw new SQLException("tinySQL does not support updateNull.");
    }

    /**
     * JDBC 2.0
     * 
     * Updates a column with a boolean value.
     *
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
     * methods are called to update the database.
     *
     * @param columnIndex the first column is 1, the second is 2, ...
     * @param x the new column value
     * @exception SQLException if a database access error occurs
     */
    public void updateBoolean(int columnIndex, boolean x) throws SQLException {
      throw new SQLException("tinySQL does not support updateBoolean.");
    }

    /**
     * JDBC 2.0
     *   
     * Updates a column with a byte value.
     *
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
     * methods are called to update the database.
     *
     * @param columnIndex the first column is 1, the second is 2, ...
     * @param x the new column value
     * @exception SQLException if a database access error occurs
     */
    public void updateByte(int columnIndex, byte x) throws SQLException {
      throw new SQLException("tinySQL does not support updateByte.");
    }

    /**
     * JDBC 2.0
     *   
     * Updates a column with a short value.
     *
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
     * methods are called to update the database.
     *
     * @param columnIndex the first column is 1, the second is 2, ...
     * @param x the new column value
     * @exception SQLException if a database access error occurs
     */
    public void updateShort(int columnIndex, short x) throws SQLException {
      throw new SQLException("tinySQL does not support updateShort.");
    }

    /**
     * JDBC 2.0
     *   
     * Updates a column with an integer value.
     *
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
     * methods are called to update the database.
     *
     * @param columnIndex the first column is 1, the second is 2, ...
     * @param x the new column value
     * @exception SQLException if a database access error occurs
     */
    public void updateInt(int columnIndex, int x) throws SQLException {
      throw new SQLException("tinySQL does not support updateInt.");
    }

    /**
     * JDBC 2.0
     *   
     * Updates a column with a long value.
     *
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 
     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
     * methods are called to update the database.
     *
     * @param columnIndex the first column is 1, the second is 2, ...
     * @param x the new column value
     * @exception SQLException if a database access error occurs
     */
    public void updateLong(int columnIndex, long x) throws SQLException {
      throw new SQLException("tinySQL does not support updateLong.");
    }

    /**
     * JDBC 2.0
     *  
     * Updates a column with a float value.
     *
     * The <code>updateXXX</code> methods are used to update column values in the
     * current row, or the insert row.  The <code>updateXXX</code> methods do not 

⌨️ 快捷键说明

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