FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Java_Object_Oriented_Querying

JOOQ Object Oriented Querying

Stable release
3.20.5 / June 11, 2025;17 months ago (2025-06-11)
Written inJavaOperating systemCross-platformPlatformJavaTypeObject–relational mappingLicenseDual-licensed: Apache-2.0 and commercialWebsitewww.jooq.orgRepositorygithub.com/jOOQ/jOOQ

jOOQ Object Oriented Querying, commonly known as jOOQ, is a light database-mapping software library in Java that implements the active record pattern. Its purpose is to be both relational and object oriented by providing a domain-specific language to construct queries from classes generated from a database schema.

While it provides abstraction on top of JDBC, jOOQ does not have as much functionality and complexity as standard object–relational mapping libraries such as EclipseLink or Hibernate. Also, variable binding is taken care of. It is also possible in jOOQ to create very complex queries, that involve aliasing, unions, nested selects and complex joins. jOOQ also supports database-specific features, such as UDTs, enum types, stored procedures and native functions. // Use the aliased table in the select statement create.selectFrom(table("AUTHOR").as("a")) .where(exists(selectOne() .from(table("BOOK")) .where(field("BOOK.STATUS").equal(field("BOOK_STATUS.SOLD_OUT"))) .and(field("BOOK.AUTHOR_ID").equal(field("a.ID")))));

Or more simply, using code generation from the database metadata to generate constants:

Category

View original on Wikipedia | Back | FazBrowse Home