Package org.postgresql.core

Examples of org.postgresql.core.TypeInfo


    Properties _clientInfo;

    public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException {
        super(host, port, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY);
        }
    }
View Full Code Here


{

    public AbstractJdbc3gConnection(String host, int port, String user, String database, Properties info, String url) throws SQLException {
        super(host, port, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("uuid", Oid.UUID, java.sql.Types.OTHER, "java.util.UUID", Oid.UUID_ARRAY);
        }
    }
View Full Code Here

    Properties _clientInfo;

    public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException {
        super(host, port, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY);
        }
    }
View Full Code Here

{

    public AbstractJdbc3gConnection(HostSpec[] hostSpecs, String user, String database, Properties info, String url) throws SQLException {
        super(hostSpecs, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("uuid", Oid.UUID, java.sql.Types.OTHER, "java.util.UUID", Oid.UUID_ARRAY);
        }
    }
View Full Code Here

    private final Properties _clientInfo;

    public AbstractJdbc4Connection(HostSpec[] hostSpecs, String user, String database, Properties info, String url) throws SQLException {
        super(hostSpecs, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY);
        }

        _clientInfo = new Properties();
        if (haveMinimumServerVersion("9.0")) {
            String appName = info.getProperty("ApplicationName");
View Full Code Here

            TestUtil.createSchema( con, "third_schema" );
            TestUtil.createTable( con, "third_schema.x", "third_schema_field_n float");
            TestUtil.createSchema( con, "last_schema" );
            TestUtil.createTable( con, "last_schema.x", "last_schema_field_n text");
            stmt.execute("SET search_path TO third_schema;");
            TypeInfo typeInfo = con.getTypeInfo();
            int OID = typeInfo.getPGType("x");
            ResultSet rs = stmt.executeQuery("SELECT 'third_schema.x'::regtype::oid");
            assertTrue(rs.next());
            assertEquals(OID, rs.getInt(1));
            assertTrue(!rs.next());
            TestUtil.dropSchema( con, "first_schema" );
View Full Code Here

            TestUtil.createSchema( con, "third_schema" );
            TestUtil.createTable( con, "third_schema.x", "third_schema_field_n float");
            TestUtil.createSchema( con, "last_schema" );
            TestUtil.createTable( con, "last_schema.y", "last_schema_field_n text");
            stmt.execute("SET search_path TO first_schema, second_schema, last_schema, public;");
            TypeInfo typeInfo = con.getTypeInfo();
            int OID = typeInfo.getPGType("y");
            ResultSet rs = stmt.executeQuery("SELECT 'second_schema.y'::regtype::oid");
            assertTrue(rs.next());
            assertEquals(OID, rs.getInt(1));
            assertTrue(!rs.next());
            TestUtil.dropSchema( con, "first_schema" );
View Full Code Here

        try {
            TestUtil.createSchema( con, "first_schema" );
            TestUtil.createTable( con, "first_schema.x", "first_schema_field int4");
            TestUtil.createSchema( con, "second_schema" );
            TestUtil.createTable( con, "second_schema.x", "second_schema_field text");
            TypeInfo typeInfo = con.getTypeInfo();
            int OID = typeInfo.getPGType("x");
            ResultSet rs = stmt.executeQuery("SELECT oid FROM pg_type WHERE typname = 'x' ORDER BY oid DESC LIMIT 1");
            assertTrue(rs.next());
            assertEquals(OID, rs.getInt(1));
            assertTrue(!rs.next());
            TestUtil.dropSchema( con, "first_schema" );
View Full Code Here

    Properties _clientInfo;

    public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException {
        super(host, port, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY);
        }
    }
View Full Code Here

    Properties _clientInfo;

    public AbstractJdbc4Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException {
        super(host, port, user, database, info, url);

        TypeInfo types = getTypeInfo();
        if (haveMinimumServerVersion("8.3")) {
            types.addCoreType("xml", Oid.XML, java.sql.Types.SQLXML, "java.sql.SQLXML", Oid.XML_ARRAY);
        }
    }
View Full Code Here

TOP

Related Classes of org.postgresql.core.TypeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.