Examples of addFrom()


Examples of org.jooq.SelectQuery.addFrom()

            log.info("SKIPPING", "position function test");
            return;
        }

        SelectQuery q = create().selectQuery();
        q.addFrom(VLibrary());

        Field<Integer> position = position(VLibrary_AUTHOR(), "o").as("p");
        q.addSelect(VLibrary_AUTHOR());
        q.addSelect(position);
View Full Code Here

Examples of org.jooq.SelectQuery.addFrom()

            .when(2, "B")
            .otherwise("C");

        SelectQuery query = create().selectQuery();
        query.addSelect(case1, case2, case3);
        query.addFrom(TBook());
        query.addOrderBy(TBook_PUBLISHED_IN());
        query.execute();

        Result<Record> result = query.getResult();
        assertEquals(null, result.getValue(0, case1));
View Full Code Here

Examples of org.jooq.SelectQuery.addFrom()

            .when(TBook_PUBLISHED_IN().equal(1988), "probably coelho")
            .otherwise("don't know").as("case3");

        query = create().selectQuery();
        query.addSelect(case4);
        query.addFrom(TBook());
        query.addOrderBy(TBook_PUBLISHED_IN());
        query.execute();

        result = query.getResult();
View Full Code Here

Examples of org.jooq.SelectQuery.addFrom()

        Field<Integer> f5 = TBook_PUBLISHED_IN().sub(4).mul(8).neg();

        SelectQuery q2 = create().selectQuery();
        q2.addSelect(f4);
        q2.addSelect(f5);
        q2.addFrom(TBook());
        q2.addConditions(TBook_TITLE().equal("1984"));
        q2.execute();

        result = q2.getResult();
        assertEquals(Integer.valueOf((1948 + 3) / 7), result.getValue(0, f4));
View Full Code Here

Examples of org.jooq.SelectQuery.addFrom()

   * Run this code providing your own database connection.
   */
  public static void firstRun() throws Exception {
    // Create the query
    SelectQuery q = create().selectQuery();
    q.addFrom(T_AUTHOR);
    q.addJoin(T_BOOK, TAuthor.ID.equal(TBook.AUTHOR_ID));
    q.addConditions(TAuthor.YEAR_OF_BIRTH.greaterThan(1920));
    q.addConditions(TAuthor.FIRST_NAME.equal("Paulo"));
    q.addOrderBy(TBook.TITLE);

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.