From: Dave Cramer Date: Tue, 8 Apr 2003 17:26:39 +0000 (+0000) Subject: added addDataType to the interface X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f602f70cca0fa1db13dde54190c54229b3b47b86;p=users%2Fbernd%2Fpostgres.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 a66eca8a16..617424d0b9 100644 --- a/src/interfaces/jdbc/org/postgresql/PGConnection.java +++ b/src/interfaces/jdbc/org/postgresql/PGConnection.java @@ -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