]> granicus.if.org Git - postgresql/commitdiff
exposed the addDataType method to the PGConnection, allows users to add datatypes
authorDave Cramer <davec@fastcrypt.com>
Mon, 14 Apr 2003 10:39:51 +0000 (10:39 +0000)
committerDave Cramer <davec@fastcrypt.com>
Mon, 14 Apr 2003 10:39:51 +0000 (10:39 +0000)
src/interfaces/jdbc/org/postgresql/PGConnection.java

index 1a10347a18f07c8b2bd0db115e2f9aa53630d53c..e2eb81dc44764afb502b9503d995c7436f7baf77 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (c) 2003, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.4 2003/03/07 18:39:41 barry Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.5 2003/04/14 10:39:51 davec Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -44,6 +44,28 @@ public interface PGConnection
         */
        public Fastpath getFastpathAPI() throws SQLException;
 
+        /*
+         * This allows client code to add a handler for one of org.postgresql's
+         * more unique data types.
+         *
+         * <p><b>NOTE:</b> This is not part of JDBC, but an extension.
+         *
+         * <p>The best way to use this is as follows:
+         *
+         * <p><pre>
+         * ...
+         * ((org.postgresql.PGConnection)myconn).addDataType("mytype","my.class.name");
+         * ...
+         * </pre>
+         *
+         * <p>where myconn is an open Connection to org.postgresql.
+         *
+         * <p>The handling class must extend org.postgresql.util.PGobject
+         *
+         * @see org.postgresql.util.PGobject
+         */
+        public void addDataType(String type, String name);
+
 
        /** @deprecated */
        public Encoding getEncoding() throws SQLException;