mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +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:
72
src/interfaces/jdbc/org/postgresql/PGConnection.java
Normal file
72
src/interfaces/jdbc/org/postgresql/PGConnection.java
Normal file
@ -0,0 +1,72 @@
|
||||
package org.postgresql;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Properties;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.core.Encoding;
|
||||
import org.postgresql.fastpath.Fastpath;
|
||||
import org.postgresql.largeobject.LargeObjectManager;
|
||||
|
||||
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.1 2002/07/23 03:59:55 barry Exp $
|
||||
* This interface defines PostgreSQL extentions to the java.sql.Connection interface.
|
||||
* Any java.sql.Connection object returned by the driver will also implement this
|
||||
* interface
|
||||
*/
|
||||
public interface PGConnection
|
||||
{
|
||||
/*
|
||||
* Get the character encoding to use for this connection.
|
||||
*/
|
||||
public Encoding getEncoding() throws SQLException;
|
||||
|
||||
/*
|
||||
* This method returns the java.sql.Types type for a postgres datatype name
|
||||
*/
|
||||
public int getSQLType(String pgTypeName) throws SQLException;
|
||||
|
||||
/*
|
||||
* This returns the java.sql.Types type for a postgres datatype OID
|
||||
*/
|
||||
public int getSQLType(int oid) throws SQLException;
|
||||
|
||||
/*
|
||||
* This returns the postgres datatype name from the
|
||||
* postgres datatype OID
|
||||
*/
|
||||
public String getPGType(int oid) throws SQLException;
|
||||
|
||||
/*
|
||||
* This returns the postgres datatype OID from the
|
||||
* postgres datatype name
|
||||
*/
|
||||
public int getPGType(String typeName) throws SQLException;
|
||||
|
||||
/*
|
||||
* This returns the LargeObject API for the current connection.
|
||||
*/
|
||||
public LargeObjectManager getLargeObjectAPI() throws SQLException;
|
||||
|
||||
/*
|
||||
* This returns the Fastpath API for the current connection.
|
||||
*/
|
||||
public Fastpath getFastpathAPI() throws SQLException;
|
||||
|
||||
/*
|
||||
* This method is used internally to return an object based around
|
||||
* org.postgresql's more unique data types.
|
||||
*
|
||||
* <p>It uses an internal Hashtable to get the handling class. If the
|
||||
* type is not supported, then an instance of org.postgresql.util.PGobject
|
||||
* is returned.
|
||||
*
|
||||
* You can use the getValue() or setValue() methods to handle the returned
|
||||
* object. Custom objects can have their own methods.
|
||||
*
|
||||
* @return PGobject for this type, and set to value
|
||||
* @exception SQLException if value is not correct for this type
|
||||
* @see org.postgresql.util.Serialize
|
||||
*/
|
||||
public Object getObject(String type, String value) throws SQLException;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user