summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/jdbc1
diff options
context:
space:
mode:
authorPeter Mount <peter@retep.org.uk>2000-06-06 11:06:09 +0000
committerPeter Mount <peter@retep.org.uk>2000-06-06 11:06:09 +0000
commite3cc370d155c3cbf97f179a98d64c2ce1550e25f (patch)
tree76deb5ad984dfe90d78804541217dbf0db4f5878 /src/interfaces/jdbc/org/postgresql/jdbc1
parent0e38f0a1d11ce6c93f4c38f636dcd9e6afee4ce9 (diff)
downloadpostgresql-e3cc370d155c3cbf97f179a98d64c2ce1550e25f.tar.gz
Added org/postgresql/DriverClass.java to the list of files removed by make clean (it's dynamically built)
Fixed Statement, so that the update count is valid when an SQL DELETE operation is done. While fixing the update count, made it easier to get the OID of the last insert as well. Example is in example/basic.java
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc1')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java6
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java18
2 files changed, 20 insertions, 4 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java
index d178fa74ad..f26057b52b 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java
@@ -17,7 +17,7 @@ import org.postgresql.largeobject.*;
import org.postgresql.util.*;
/**
- * $Id: Connection.java,v 1.1 2000/04/17 20:07:48 peter Exp $
+ * $Id: Connection.java,v 1.2 2000/06/06 11:06:04 peter Exp $
*
* A Connection represents a session with a specific database. Within the
* context of a Connection, SQL statements are executed and results are
@@ -378,9 +378,9 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
* This overides the method in org.postgresql.Connection and returns a
* ResultSet.
*/
- protected java.sql.ResultSet getResultSet(org.postgresql.Connection conn, Field[] fields, Vector tuples, String status, int updateCount) throws SQLException
+ protected java.sql.ResultSet getResultSet(org.postgresql.Connection conn, Field[] fields, Vector tuples, String status, int updateCount,int insertOID) throws SQLException
{
- return new org.postgresql.jdbc1.ResultSet((org.postgresql.jdbc1.Connection)conn,fields,tuples,status,updateCount);
+ return new org.postgresql.jdbc1.ResultSet((org.postgresql.jdbc1.Connection)conn,fields,tuples,status,updateCount,insertOID);
}
}
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
index 9ca67ad8b4..497e401bde 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
@@ -69,9 +69,25 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
* @param updateCount the number of rows affected by the operation
* @param cursor the positioned update/delete cursor name
*/
+ public ResultSet(Connection conn, Field[] fields, Vector tuples, String status, int updateCount,int insertOID)
+ {
+ super(conn,fields,tuples,status,updateCount,insertOID);
+ }
+
+ /**
+ * Create a new ResultSet - Note that we create ResultSets to
+ * represent the results of everything.
+ *
+ * @param fields an array of Field objects (basically, the
+ * ResultSet MetaData)
+ * @param tuples Vector of the actual data
+ * @param status the status string returned from the back end
+ * @param updateCount the number of rows affected by the operation
+ * @param cursor the positioned update/delete cursor name
+ */
public ResultSet(Connection conn, Field[] fields, Vector tuples, String status, int updateCount)
{
- super(conn,fields,tuples,status,updateCount);
+ super(conn,fields,tuples,status,updateCount,0);
}
/**