Reader small image

You're reading from  jOOQ Masterclass

Product typeBook
Published inAug 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781800566897
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Anghel Leonard
Anghel Leonard
author image
Anghel Leonard

Anghel Leonard is a Chief Technology Strategist and independent consultant with 20+ years of experience in the Java ecosystem. In daily work, he is focused on architecting and developing Java distributed applications that empower robust architectures, clean code, and high-performance. Also passionate about coaching, mentoring and technical leadership. He is the author of several books, videos and dozens of articles related to Java technologies.
Read more about Anghel Leonard

Right arrow

Binding values (parameters)

Binding values is another fundamental topic of jOOQ.

The well-known prepared statements and bind values combination is the preferable approach to express SQL statements in JDBC. Among benefits, this combination provides protection against SQL injections, sustains caching (for instance, most connection pools cache prepared statements across connections or rely on JDBC driver caching capabilities as HikariCP does), and reusability capabilities (re-using execution plans for identical SQL statements, regardless of actual bind values).

Having security and performance packed into this combination makes it preferable against static statements (java.sql.Statement) and inlined values, so jOOQ also embraces it as default.

Important Note

By default, jOOQ aligns its support for bind values to JDBC style. In other words, jOOQ relies on java.sql.PreparedStatement and indexed bind values or indexed parameters. Moreover, exactly like JDBC, jOOQ uses a ? (question...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
jOOQ Masterclass
Published in: Aug 2022Publisher: PacktISBN-13: 9781800566897

Author (1)

author image
Anghel Leonard

Anghel Leonard is a Chief Technology Strategist and independent consultant with 20+ years of experience in the Java ecosystem. In daily work, he is focused on architecting and developing Java distributed applications that empower robust architectures, clean code, and high-performance. Also passionate about coaching, mentoring and technical leadership. He is the author of several books, videos and dozens of articles related to Java technologies.
Read more about Anghel Leonard