When to Use Bind Values, and When to Use Inline Values in SQL

Users of jOOQ, PL/SQL, T-SQL are spoiled as they hardly ever need to worry about bind values. Consider the following statements: Using jOOQ public int countActors(String firstName, String lastName) { return ctx.selectCount() .from(ACTOR) .where(ACTOR.FIRST_NAME.eq(firstName)) .and(ACTOR.LAST_NAME.eq(lastName)) .fetchOneInto(int.class); ); } The method parameters firstName and lastName will be automatically mapped to bind values in the generated SQL … Continue reading When to Use Bind Values, and When to Use Inline Values in SQL

Array, list, set, map, tuple, record literals in Java

Occasionally, when I'm thrilled by the power and expressiveness of JavaScript, I find myself missing one or two features in the Java world. Apart from lambda expressions / closures or whatever you want to call "anonymous functions", it's the use of advanced literals for common data types, such as arrays, lists, sets, maps, etc. In … Continue reading Array, list, set, map, tuple, record literals in Java