jOOQΒΆ

Java jOOQ

jOOQ is an internal DSL and source code generator, modelling the SQL language as a type-safe Java API to help you write better SQL.

// Fetch records, with filtering and sorting.
Result<Record> result = db.select()
        .from(AUTHOR)
        .where(AUTHOR.NAME.like("Ja%"))
        .orderBy(AUTHOR.NAME)
        .fetch();

// Iterate and display records.
for (Record record : result) {
    Integer id = record.getValue(AUTHOR.ID);
    String name = record.getValue(AUTHOR.NAME);
    System.out.println("id: " + id + ", name: " + name);
}

Connect to CrateDB using jOOQ.

https://github.com/crate/cratedb-examples/tree/main/by-language/java-jooq