From: Dave Cramer Date: Tue, 8 Apr 2003 17:26:39 +0000 (+0000) Subject: added addDataType to the interface X-Git-Tag: REL7_3_3~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ee2c293545cbc11c3ee7510d97a1a808c5d9f38;p=thirdparty%2Fpostgresql.git added addDataType to the interface --- diff --git a/src/interfaces/jdbc/org/postgresql/PGConnection.java b/src/interfaces/jdbc/org/postgresql/PGConnection.java index a45fddcb1cf..f69617efc4b 100644 --- a/src/interfaces/jdbc/org/postgresql/PGConnection.java +++ b/src/interfaces/jdbc/org/postgresql/PGConnection.java @@ -7,7 +7,7 @@ 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.3 2002/09/06 21:23:05 momjian Exp $ +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.3.2.1 2003/04/08 17:26:39 davec 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 @@ -68,6 +68,28 @@ public interface PGConnection */ public Object getObject(String type, String value) throws SQLException; + /* + * This allows client code to add a handler for one of org.postgresql's + * more unique data types. + * + *

NOTE: This is not part of JDBC, but an extension. + * + *

The best way to use this is as follows: + * + *

+	 * ...
+	 * ((org.postgresql.PGConnection)myconn).addDataType("mytype","my.class.name");
+	 * ...
+	 * 
+ * + *

where myconn is an open Connection to org.postgresql. + * + *

The handling class must extend org.postgresql.util.PGobject + * + * @see org.postgresql.util.PGobject + */ + public void addDataType(String type, String name); + /* * This method returns any notifications that have been received