Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 810e0b9

Browse files
author
Dave Cramer
committed
exposed the addDataType method to the PGConnection, allows users to add datatypes
1 parent 6ff82c6 commit 810e0b9

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/interfaces/jdbc/org/postgresql/PGConnection.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright (c) 2003, PostgreSQL Global Development Group
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.4 2003/03/07 18:39:41 barry Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/Attic/PGConnection.java,v 1.5 2003/04/14 10:39:51 davec Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -44,6 +44,28 @@ public interface PGConnection
4444
*/
4545
public Fastpath getFastpathAPI() throws SQLException;
4646

47+
/*
48+
* This allows client code to add a handler for one of org.postgresql's
49+
* more unique data types.
50+
*
51+
* <p><b>NOTE:</b> This is not part of JDBC, but an extension.
52+
*
53+
* <p>The best way to use this is as follows:
54+
*
55+
* <p><pre>
56+
* ...
57+
* ((org.postgresql.PGConnection)myconn).addDataType("mytype","my.class.name");
58+
* ...
59+
* </pre>
60+
*
61+
* <p>where myconn is an open Connection to org.postgresql.
62+
*
63+
* <p>The handling class must extend org.postgresql.util.PGobject
64+
*
65+
* @see org.postgresql.util.PGobject
66+
*/
67+
public void addDataType(String type, String name);
68+
4769

4870
/** @deprecated */
4971
public Encoding getEncoding() throws SQLException;

0 commit comments

Comments
 (0)