Package org.jooq.util.maven.example.postgres

Examples of org.jooq.util.maven.example.postgres.PublicFactory.select()


    public void testFetch() throws Exception {
        Connection connection = DriverManager.getConnection("jdbc:postgresql:postgres", "postgres", "test");
        PublicFactory create = new PublicFactory(connection);

        Result<Record> books =
        create.select(TBook.ID, TBook.TITLE)
              .from(TBook.T_BOOK)
              .orderBy(TBook.ID)
              .fetch();

        assertEquals(Data.BOOK_IDS, books.getValues(0));
View Full Code Here


    public void testFetchInto() throws Exception {
        Connection connection = DriverManager.getConnection("jdbc:postgresql:postgres", "postgres", "test");
        PublicFactory create = new PublicFactory(connection);

        List<TBookRecord> books =
        create.select(TBook.ID, TBook.TITLE)
              .from(TBook.T_BOOK)
              .orderBy(TBook.ID)
              .fetchInto(TBookRecord.class);

        for (int i = 0; i < Data.BOOK_IDS.size(); i++) {
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.