Java's package private visibility is an underrated feature. When you omit any visibility modifier in Java, then the default (for most objects) is package private, i.e. the object is visible only to types in the same package: class YouDontSeeMe {} class YouDontSeeMeEither {} In fact, a compilation unit (the .java file) can contain multiple such … Continue reading How to Generate Package Private Code with jOOQ’s Code Generator
Tag: code generator
How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ
Microsoft T-SQL supports a language feature called table-valued parameter (TVP), which is a parameter of a table type that can be passed to a stored procedure or function. For example, you may write: CREATE TYPE u_number_table AS TABLE (column_value INTEGER); CREATE FUNCTION f_cross_multiply ( @numbers u_number_table READONLY ) RETURNS @result TABLE ( i1 INTEGER, i2 … Continue reading How to Pass a Table Valued Parameter to a T-SQL Function with jOOQ
Why You Should Use jOOQ With Code Generation
I'm answering many jOOQ questions on Stack Overflow, and a lot of times. The problem has the same cause: People not using jOOQ's code generator. The main reason people seem not to be using it, is because it takes some extra time to set up, but as with anything well designed, the initial investment will … Continue reading Why You Should Use jOOQ With Code Generation
Quickly Trying out jOOQ with Jbang!
jbang is a relatively new utility that ... ... lets students, educators and professional developers create, edit and run self-contained source-only Java programs with unprecedented ease. Sounds exciting. How does it work with jOOQ? Very easy! Set it up like this (other installation options here): curl -Ls https://sh.jbang.dev | bash -s - app setup And … Continue reading Quickly Trying out jOOQ with Jbang!
How to Detect Slow Queries with jOOQ
Just now, we implemented a nice little feature in jOOQ's code generator: https://github.com/jOOQ/jOOQ/issues/4974 It detects whenever the jOOQ code generator runs a slow query to reverse engineer schema meta information. Why? In our development and integration test environment, we don't have huge schemas with all the different performance edge cases put in place. For instance, … Continue reading How to Detect Slow Queries with jOOQ