To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

JOOQ Object Oriented Querying

From Wikipedia, the free encyclopedia

jOOQ
Developer(s)Data Geekery GmbH
Stable release
3.19.2 / January 12, 2024; 0 days ago (2024-01-12)[1]
Repositorygithub.com/jOOQ/jOOQ
Written inJava
Operating systemCross-platform
PlatformJava
TypeObject–relational mapping
LicenseDual-licensed: ASL 2.0 and commercial
Websitewww.jooq.org

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.[citation needed]

YouTube Encyclopedic

  • 1/5
    Views:
    3 313
    26 677
    16 025
    812
    11 860
  • JOOQ, Joy of SQL by Kevin Davin
  • Getting Started with jOOQ : Building SQL Queries in Java
  • SpringBoot : Configure jOOQ with Spring Boot and MySQL | Type Safe SQL | JavaTechie
  • JOOQ, joy of SQL by Kevin Davin
  • Spring Tips: jOOQ

Transcription

Paradigm

jOOQ claims that SQL should come first in any database integration. Thus, it does not introduce a new textual query language, but rather allows for constructing plain SQL from jOOQ objects and code generated from a database schema. jOOQ uses JDBC to call the underlying SQL queries.[citation needed]

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.[citation needed]

jOOQ's closeness to SQL has advantages over typical object–relational mapping libraries.[citation needed] SQL has many features that cannot be used in an object oriented programming paradigm; this set of differences is referred to as the object–relational impedance mismatch. By being close to SQL, jOOQ helps to prevent syntax errors and type mapping problems.[citation needed] 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.[citation needed]

Example

A nested query selecting from an aliased table

  -- Select authors with books that are sold out
  SELECT * FROM AUTHOR a
        WHERE EXISTS (SELECT 1
                   FROM BOOK
                  WHERE BOOK.STATUS = 'SOLD OUT'
                    AND BOOK.AUTHOR_ID = a.ID);

And its equivalent in jOOQ DSL:

  // 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:

  // Use the aliased table in the select statement
  final Author a = AUTHOR.as("a");

  create.selectFrom(a)
        .where(exists(selectOne()
                     .from(BOOK)
                     .where(BOOK.STATUS.equal(BOOK_STATUS.SOLD_OUT))
                     .and(BOOK.AUTHOR_ID.equal(a.ID))));

See also

References

  1. ^ "Tags · jOOQ/jOOQ". github.com. Retrieved 2024-01-12.

External links

This page was last edited on 12 January 2024, at 16:59
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.