mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Initial restructuring to add jdbc3 support. There was a significant amount
of duplicated code between the jdbc1 and jdbc2. This checkin restructures the code so that the duplication is removed so that the jdbc3 support can be added without adding yet another copy of everything. Also many classes were renamed to avoid confusion with multiple different objects having the same name. The timestamp tests were also updated to add support for testing timestamp without time zone in addition to timestamp with time zone Modified Files: jdbc/Makefile jdbc/build.xml jdbc/example/ImageViewer.java jdbc/example/basic.java jdbc/example/blobtest.java jdbc/example/threadsafe.java jdbc/org/postgresql/Driver.java.in jdbc/org/postgresql/Field.java jdbc/org/postgresql/core/QueryExecutor.java jdbc/org/postgresql/fastpath/Fastpath.java jdbc/org/postgresql/jdbc1/CallableStatement.java jdbc/org/postgresql/jdbc1/DatabaseMetaData.java jdbc/org/postgresql/jdbc1/PreparedStatement.java jdbc/org/postgresql/jdbc2/Array.java jdbc/org/postgresql/jdbc2/CallableStatement.java jdbc/org/postgresql/jdbc2/DatabaseMetaData.java jdbc/org/postgresql/jdbc2/PreparedStatement.java jdbc/org/postgresql/jdbc2/UpdateableResultSet.java jdbc/org/postgresql/largeobject/LargeObjectManager.java jdbc/org/postgresql/largeobject/PGblob.java jdbc/org/postgresql/largeobject/PGclob.java jdbc/org/postgresql/test/jdbc2/BlobTest.java jdbc/org/postgresql/test/jdbc2/ConnectionTest.java jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java jdbc/org/postgresql/test/jdbc2/TimestampTest.java jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java jdbc/org/postgresql/util/Serialize.java Added Files: jdbc/org/postgresql/PGConnection.java jdbc/org/postgresql/PGStatement.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java jdbc/org/postgresql/jdbc1/Jdbc1Connection.java jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java jdbc/org/postgresql/jdbc1/Jdbc1Statement.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java jdbc/org/postgresql/jdbc2/Jdbc2Connection.java jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java jdbc/org/postgresql/jdbc2/Jdbc2Statement.java Removed Files: jdbc/org/postgresql/Connection.java jdbc/org/postgresql/ResultSet.java jdbc/org/postgresql/Statement.java jdbc/org/postgresql/jdbc1/Connection.java jdbc/org/postgresql/jdbc1/ResultSet.java jdbc/org/postgresql/jdbc1/Statement.java jdbc/org/postgresql/jdbc2/Connection.java jdbc/org/postgresql/jdbc2/ResultSet.java jdbc/org/postgresql/jdbc2/Statement.java
This commit is contained in:
@@ -205,7 +205,7 @@ public class ImageViewer implements ItemListener
|
||||
stat = db.createStatement();
|
||||
|
||||
// Also, get the LargeObjectManager for this connection
|
||||
lom = ((org.postgresql.Connection)db).getLargeObjectAPI();
|
||||
lom = ((org.postgresql.PGConnection)db).getLargeObjectAPI();
|
||||
|
||||
// Now refresh the image selection list
|
||||
refreshList();
|
||||
@@ -299,7 +299,7 @@ public class ImageViewer implements ItemListener
|
||||
try
|
||||
{
|
||||
// fetch the large object manager
|
||||
LargeObjectManager lom = ((org.postgresql.Connection)db).getLargeObjectAPI();
|
||||
LargeObjectManager lom = ((org.postgresql.PGConnection)db).getLargeObjectAPI();
|
||||
|
||||
db.setAutoCommit(false);
|
||||
|
||||
|
@@ -6,7 +6,7 @@ import java.text.*;
|
||||
|
||||
/*
|
||||
*
|
||||
* $Id: basic.java,v 1.11 2001/11/25 23:26:56 barry Exp $
|
||||
* $Id: basic.java,v 1.12 2002/07/23 03:59:54 barry Exp $
|
||||
*
|
||||
* This example tests the basic components of the JDBC driver, and shows
|
||||
* how even the simplest of queries can be implemented.
|
||||
@@ -87,9 +87,8 @@ public class basic
|
||||
st.executeUpdate("insert into basic values (3,1)");
|
||||
|
||||
// This shows how to get the oid of a just inserted row
|
||||
// updated for 7.1
|
||||
st.executeUpdate("insert into basic values (4,1)");
|
||||
long insertedOID = ((org.postgresql.Statement)st).getLastOID();
|
||||
long insertedOID = ((org.postgresql.PGStatement)st).getLastOID();
|
||||
System.out.println("Inserted row with oid " + insertedOID);
|
||||
|
||||
// Now change the value of b from 1 to 8
|
||||
|
@@ -76,7 +76,7 @@ public class blobtest
|
||||
// objects, however the unique methods available to postgresql makes
|
||||
// things a little easier.
|
||||
System.out.println("Gaining access to large object api");
|
||||
lobj = ((org.postgresql.Connection)db).getLargeObjectAPI();
|
||||
lobj = ((org.postgresql.PGConnection)db).getLargeObjectAPI();
|
||||
|
||||
int oid = ownapi_test1();
|
||||
ownapi_test2(oid);
|
||||
|
@@ -301,7 +301,7 @@ public class threadsafe
|
||||
//st = c.createStatement();
|
||||
|
||||
// create a blob
|
||||
lom = ((org.postgresql.Connection)c).getLargeObjectAPI();
|
||||
lom = ((org.postgresql.PGConnection)c).getLargeObjectAPI();
|
||||
oid = lom.create();
|
||||
System.out.println("Thread 3 has created a blob of oid " + oid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user