diff options
author | Peter Mount <peter@retep.org.uk> | 2001-01-18 17:37:15 +0000 |
---|---|---|
committer | Peter Mount <peter@retep.org.uk> | 2001-01-18 17:37:15 +0000 |
commit | 8bc9f0016ba3047f60343176c30553d6b6e999f9 (patch) | |
tree | 8f0915c7484b872025ab827d81355b45e7338f2b /src/interfaces/jdbc/org/postgresql/Connection.java | |
parent | 45b5d792afa60ae24d57cdceaaec0e03cf6abb2a (diff) | |
download | postgresql-8bc9f0016ba3047f60343176c30553d6b6e999f9.tar.gz |
Thu Jan 18 17:37:00 GMT 2001 peter@retep.org.uk
- Added new error message into errors.properties "postgresql.notsensitive"
This is used by jdbc2.ResultSet when a method is called that should
fetch the current value of a row from the database refreshRow() for
example.
- These methods no longer throw the not implemented but the new noupdate
error. This is in preparation for the Updateable ResultSet support
which will overide these methods by extending the existing class to
implement that functionality, but needed to show something other than
notimplemented:
moveToCurrentRow()
moveToInsertRow()
rowDeleted()
rowInserted()
all update*() methods, except those that took the column as a String
as they were already implemented to convert the String to an int.
- getFetchDirection() and setFetchDirection() now throws
"postgresql.notimp" as we only support one direction.
The CursorResultSet will overide this when its implemented.
- Created a new class under jdbc2 UpdateableResultSet which extends
ResultSet and overides the relevent update methods.
This allows us to implement them easily at a later date.
- In jdbc2.Connection, the following methods are now implemented:
createStatement(type,concurrency);
getTypeMap();
setTypeMap(Map);
- The JDBC2 type mapping scheme almost complete, just needs SQLInput &
SQLOutput to be implemented.
- Removed some Statement methods that somehow appeared in Connection.
- In jdbc2.Statement()
getResultSetConcurrency()
getResultSetType()
setResultSetConcurrency()
setResultSetType()
- Finally removed the old 6.5.x driver.
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/Connection.java')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/Connection.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/Connection.java b/src/interfaces/jdbc/org/postgresql/Connection.java index 3ca464d3ad..d852538846 100644 --- a/src/interfaces/jdbc/org/postgresql/Connection.java +++ b/src/interfaces/jdbc/org/postgresql/Connection.java @@ -10,7 +10,7 @@ import org.postgresql.largeobject.*; import org.postgresql.util.*; /** - * $Id: Connection.java,v 1.12 2001/01/18 14:50:14 peter Exp $ + * $Id: Connection.java,v 1.13 2001/01/18 17:37:12 peter Exp $ * * This abstract class is used by org.postgresql.Driver to open either the JDBC1 or * JDBC2 versions of the Connection class. @@ -397,6 +397,23 @@ public abstract class Connection */ public java.sql.ResultSet ExecSQL(String sql) throws SQLException { + return ExecSQL(sql,null); + } + + /** + * Send a query to the backend. Returns one of the ResultSet + * objects. + * + * <B>Note:</B> there does not seem to be any method currently + * in existance to return the update count. + * + * @param sql the SQL statement to be executed + * @param stat The Statement associated with this query (may be null) + * @return a ResultSet holding the results + * @exception SQLException if a database error occurs + */ + public java.sql.ResultSet ExecSQL(String sql,java.sql.Statement stat) throws SQLException + { // added Oct 7 1998 to give us thread safety. synchronized(pg_stream) { // Deallocate all resources in the stream associated @@ -541,7 +558,7 @@ public abstract class Connection if (final_error != null) throw final_error; - return getResultSet(this, fields, tuples, recv_status, update_count, insert_oid); + return getResultSet(this, stat, fields, tuples, recv_status, update_count, insert_oid); } } @@ -852,7 +869,7 @@ public abstract class Connection * This returns a resultset. It must be overridden, so that the correct * version (from jdbc1 or jdbc2) are returned. */ - protected abstract java.sql.ResultSet getResultSet(org.postgresql.Connection conn, Field[] fields, Vector tuples, String status, int updateCount,int insertOID) throws SQLException; + protected abstract java.sql.ResultSet getResultSet(org.postgresql.Connection conn,java.sql.Statement stat, Field[] fields, Vector tuples, String status, int updateCount,int insertOID) throws SQLException; public abstract void close() throws SQLException; |