Examples of UBookTableRecord


Examples of org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTableRecord

        assertEquals(BOOK_TITLES.subList(0, 2),
            create().select().from(table(new UBookArrayRecord(ora(), r1, r2))).fetch(1));

        // Unnesting tables
        assertEquals(emptyList(),
            create().select().from(table(new UBookTableRecord(ora(), (UBookTypeRecord[]) null))).fetch(0));
        assertEquals(emptyList(),
            create().select().from(table(new UBookTableRecord(ora()))).fetch(0));
        assertEquals(asList(1),
            create().select().from(table(new UBookTableRecord(ora(), r1))).fetch(0));
        assertEquals(BOOK_TITLES.subList(0, 1),
            create().select().from(table(new UBookTableRecord(ora(), r1))).fetch(1));
        assertEquals(asList(1, 2),
            create().select().from(table(new UBookTableRecord(ora(), r1, r2))).fetch(0));
        assertEquals(BOOK_TITLES.subList(0, 2),
            create().select().from(table(new UBookTableRecord(ora(), r1, r2))).fetch(1));

        // Unnesting arrays from functions
        assertEquals(emptyList(),
            create().select().from(table(fArrays4((UBookArrayRecord) null))).fetch(0));
        assertEquals(emptyList(),
            create().select().from(table(fArrays4(new UBookArrayRecord(ora(), (UBookTypeRecord[]) null)))).fetch(0));
        assertEquals(emptyList(),
            create().select().from(table(fArrays4(new UBookArrayRecord(ora())))).fetch(0));
        assertEquals(asList(1),
            create().select().from(table(fArrays4(new UBookArrayRecord(ora(), r1)))).fetch(0));
        assertEquals(BOOK_TITLES.subList(0, 1),
            create().select().from(table(fArrays4(new UBookArrayRecord(ora(), r1)))).fetch(1));
        assertEquals(asList(1, 2),
            create().select().from(table(fArrays4(fArrays4(new UBookArrayRecord(ora(), r1, r2))))).fetch(0));
        assertEquals(BOOK_TITLES.subList(0, 2),
            create().select().from(table(fArrays4(fArrays4(new UBookArrayRecord(ora(), r1, r2))))).fetch(1));

        // Unnesting tables from functions
        assertEquals(emptyList(),
            create().select().from(table(fTables4((UBookTableRecord) null))).fetch(0));
        assertEquals(emptyList(),
            create().select().from(table(fTables4(new UBookTableRecord(ora(), (UBookTypeRecord[]) null)))).fetch(0));
        assertEquals(emptyList(),
            create().select().from(table(fTables4(new UBookTableRecord(ora())))).fetch(0));
        assertEquals(asList(1),
            create().select().from(table(fTables4(new UBookTableRecord(ora(), r1)))).fetch(0));
        assertEquals(BOOK_TITLES.subList(0, 1),
            create().select().from(table(fTables4(new UBookTableRecord(ora(), r1)))).fetch(1));
        assertEquals(asList(1, 2),
            create().select().from(table(fTables4(fTables4(new UBookTableRecord(ora(), r1, r2))))).fetch(0));
        assertEquals(BOOK_TITLES.subList(0, 2),
            create().select().from(table(fTables4(fTables4(new UBookTableRecord(ora(), r1, r2))))).fetch(1));

        // Retrieving arrays from functions
        assertNull(fArrays4(ora(), null));
        assertEquals(emptyList(),
            fArrays4(ora(), new UBookArrayRecord(ora(), (UBookTypeRecord[]) null)).getList());
        assertEquals(emptyList(),
            fArrays4(ora(), new UBookArrayRecord(ora())).getList());
        assertEquals(asList(r1),
            fArrays4(ora(), fArrays4(ora(), new UBookArrayRecord(ora(), r1))).getList());
        assertEquals(asList(r1, r2),
            fArrays4(ora(), fArrays4(ora(), new UBookArrayRecord(ora(), r1, r2))).getList());

        // Retrieving tables from functions
        assertNull(fTables4(ora(), null));
        assertEquals(emptyList(),
            fTables4(ora(), new UBookTableRecord(ora(), (UBookTypeRecord[]) null)).getList());
        assertEquals(emptyList(),
            fTables4(ora(), new UBookTableRecord(ora())).getList());
        assertEquals(asList(r1),
            fTables4(ora(), fTables4(ora(), new UBookTableRecord(ora(), r1))).getList());
        assertEquals(asList(r1, r2),
            fTables4(ora(), fTables4(ora(), new UBookTableRecord(ora(), r1, r2))).getList());


    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.