Package org.jooq.test.oracle2.generatedclasses

Examples of org.jooq.test.oracle2.generatedclasses.UDTs


    public void testOracleDateAsTimestamp() throws Exception {
        Timestamp now = new Timestamp(System.currentTimeMillis() / 1000 * 1000);

        // A record with nulls
        // -------------------
        DateAsTimestampT_976Record record = ora().newRecord(DATE_AS_TIMESTAMP_T_976);
        record.setId(1);
        assertEquals(1, record.store());
        assertNull(record.getD());
        assertNull(record.getT());
        assertNull(record.getO());

        record.refresh();
        assertNull(record.getD());
        assertNull(record.getT());
        assertNull(record.getO());
        assertEquals(record, ora().fetchOne(DATE_AS_TIMESTAMP_T_976, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_ID.equal(1)));

        // A record with values
        // --------------------
        DateAsTimestampT_976ObjectTypeRecord o = ora().newRecord(DATE_AS_TIMESTAMP_T_976_OBJECT_TYPE);
        o.setD(now);
        // [#1034] TODO: Check proper use of Timestamp in array records
        DateAsTimestampT_976VarrayTypeRecord t = new DateAsTimestampT_976VarrayTypeRecord(ora());
//        t.set(now, now);

        record = ora().newRecord(DATE_AS_TIMESTAMP_T_976);
        record.setId(2);
        record.setD(now);
        record.setO(o);
        record.setT(t);
        record.store();
        assertEquals(record, ora().fetchOne(DATE_AS_TIMESTAMP_T_976, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_ID.equal(2)));

        // Procedures and packages
        // -----------------------
        assertEquals(now, org.jooq.test.oracle2.generatedclasses.Routines.p_976(ora(), now));
View Full Code Here


        assertNull(record.getO());
        assertEquals(record, ora().fetchOne(DATE_AS_TIMESTAMP_T_976, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_ID.equal(1)));

        // A record with values
        // --------------------
        DateAsTimestampT_976ObjectTypeRecord o = ora().newRecord(DATE_AS_TIMESTAMP_T_976_OBJECT_TYPE);
        o.setD(now);
        // [#1034] TODO: Check proper use of Timestamp in array records
        DateAsTimestampT_976VarrayTypeRecord t = new DateAsTimestampT_976VarrayTypeRecord(ora());
//        t.set(now, now);

        record = ora().newRecord(DATE_AS_TIMESTAMP_T_976);
View Full Code Here

        // A record with values
        // --------------------
        DateAsTimestampT_976ObjectTypeRecord o = ora().newRecord(DATE_AS_TIMESTAMP_T_976_OBJECT_TYPE);
        o.setD(now);
        // [#1034] TODO: Check proper use of Timestamp in array records
        DateAsTimestampT_976VarrayTypeRecord t = new DateAsTimestampT_976VarrayTypeRecord(ora());
//        t.set(now, now);

        record = ora().newRecord(DATE_AS_TIMESTAMP_T_976);
        record.setId(2);
        record.setD(now);
View Full Code Here

TOP

Related Classes of org.jooq.test.oracle2.generatedclasses.UDTs

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.