import org.postgresql.util.PSQLException;
-/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.5 2002/08/23 20:45:49 barry Exp $
+/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.6 2002/09/01 23:40:36 davec Exp $
* This class defines methods of the jdbc2 specification. This class extends
* org.postgresql.jdbc1.AbstractJdbc1ResultSet which provides the jdbc1
* methods. The real Statement class (for jdbc2) is org.postgresql.jdbc2.Jdbc2ResultSet
}
- public boolean first() throws SQLException {
+ public boolean first() throws SQLException
+ {
if (rows.size() <= 0)
return false;
+ onInsertRow = false;
current_row = 0;
this_row = (byte[][]) rows.elementAt(current_row);
}
- public synchronized void cancelRowUpdates() throws SQLException {
- if (doingUpdates) {
+ public synchronized void cancelRowUpdates() throws SQLException
+ {
+ if (doingUpdates)
+ {
doingUpdates = false;
clearRowBuffer();
}
- public synchronized void deleteRow() throws SQLException {
+ public synchronized void deleteRow() throws SQLException
+ {
if ( !isUpdateable() ) {
throw new PSQLException( "postgresql.updateable.notupdateable" );
}
}
- public synchronized void moveToInsertRow() throws SQLException {
- if (!updateable) {
+ public synchronized void moveToInsertRow() throws SQLException
+ {
+ if ( !isUpdateable() )
+ {
throw new PSQLException( "postgresql.updateable.notupdateable" );
}
- if (insertStatement != null) {
+ if (insertStatement != null)
+ {
insertStatement = null;
}
}
- private synchronized void clearRowBuffer() throws SQLException {
+ private synchronized void clearRowBuffer() throws SQLException
+ {
// rowBuffer is the temporary storage for the row
rowBuffer = new byte[fields.length][];
* Is this ResultSet updateable?
*/
- boolean isUpdateable() throws SQLException {
+ boolean isUpdateable() throws SQLException
+ {
if (updateable) return true;