Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

boolean com::mysql::jdbc::ResultSet::prev (  )  throws java.sql.SQLException [inline]

The prev method is not part of JDBC, but because of the architecture of this driver it is possible to move both forward and backward within the result set.

If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read

Returns:
true if the new current is valid; false if there are no more rows
Exceptions:
java.sql.SQLException if a database access error occurs

Reimplemented in com::mysql::jdbc::UpdatableResultSet.

Definition at line 2919 of file ResultSet.java.

                                                       {
        checkClosed();

        int rowIndex = this.rowData.getCurrentRowNumber();

        if ((rowIndex - 1) >= 0) {
            rowIndex--;
            this.rowData.setCurrentRow(rowIndex);
            this.thisRow = this.rowData.getAt(rowIndex);

            return true;
        } else if ((rowIndex - 1) == -1) {
            rowIndex--;
            this.rowData.setCurrentRow(rowIndex);
            this.thisRow = null;

            return false;
        } else {
            return false;
        }
    }


Generated by  Doxygen 1.6.0   Back to index