Package org.postgresql.core

Examples of org.postgresql.core.BaseConnection


    {
        Properties props = new Properties();
        props.setProperty("disableColumnSanitiser", Boolean.TRUE.toString());
        conn = TestUtil.openDB(props);
        assertTrue(conn instanceof BaseConnection);
        BaseConnection bc = (BaseConnection)conn;
        assertTrue(
        "Expected state [TRUE] of base connection configuration failed test."  
        , bc.isColumnSanitiserDisabled());
        /* Quoted columns will be stored with case preserved. Driver will
         * receive column names as defined in db server. */
        TestUtil.createTable(conn, "allmixedup",
        "id int primary key, \"DESCRIPTION\" varchar(40), \"fOo\" varchar(3)");
        Statement data = conn.createStatement();
View Full Code Here


    public void setUp() throws SQLException
    {
        Connection conn = getDataSourceConnection();
        assertTrue(conn instanceof BaseConnection);
        BaseConnection bc = (BaseConnection)conn;
        assertTrue(
        "Expected state [TRUE] of base connection configuration failed test."
        , bc.isColumnSanitiserDisabled());
        Statement insert = conn.createStatement();
        TestUtil.createTable( conn, "allmixedup",
        "id int primary key, \"DESCRIPTION\" varchar(40), \"fOo\" varchar(3)");
        insert.execute(TestUtil.insertSQL("allmixedup",
                "1,'mixed case test', 'bar'"));
View Full Code Here

    {
        Properties props = new Properties();
        props.setProperty("disableColumnSanitiser", Boolean.FALSE.toString());
        conn = TestUtil.openDB(props);
        assertTrue(conn instanceof BaseConnection);
        BaseConnection bc = (BaseConnection)conn;
        assertFalse("Expected state [FALSE] of base connection configuration failed test.", bc.isColumnSanitiserDisabled());
        TestUtil.createTable( conn,"allmixedup",
                "id int primary key, \"DESCRIPTION\" varchar(40), \"fOo\" varchar(3)");
        Statement data = conn.createStatement();
        data.execute(TestUtil.insertSQL("allmixedup",
                "1,'mixed case test', 'bar'"));
View Full Code Here

            }

            if (connection instanceof BaseConnection) {

                // if we do have a valid postgresql connection use this one:
                final BaseConnection postgresBaseConnection = (BaseConnection) connection;
                sb.append(postgresBaseConnection.getTimestampUtils().toString(null, tmpd));
            } else {

                // no valid postgresql connection - use that one:
                sb.append(postgresJDBCDriverReusedTimestampUtils.toString(null, tmpd));
            }
View Full Code Here

TOP

Related Classes of org.postgresql.core.BaseConnection

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.