Typesafe embedded DSLs like jOOQ are extremely powerful for dynamic SQL, because the query you're constructing with the jOOQ DSL is a dynamic query by nature. You're constructing a query expression tree using a convenient API (the "DSL"), even if you think your SQL statement is static. For instance: for (Record rec : ctx.select(ACTOR.FIRST_NAME, ACTOR.LAST_NAME) … Continue reading A Functional Programming Approach to Dynamic SQL with jOOQ
Tag: Query DSL
A SQL query DSL for Scala by ScalikeJDBC
There are a tremendous amount of SQL APIs natively written in Scala. Manuel Bernhardt has summarised a nice collection in his a post. Another collection of Scala SQL APIs can be seen in this Stack Overflow question. One API that we want to focus on in particular is ScalikeJDBC (licensed ASL 2.0), which has recently … Continue reading A SQL query DSL for Scala by ScalikeJDBC
Advanced Java Trickery for Typesafe Query DSLs
When browsing Hacker News, I recently stumbled upon Benji Weber's most interesting attempt at creating typesafe database interaction with Java 8. Benji created a typesafe query DSL somewhat similar to jOOQ with the important difference that it uses Java 8 method references to introspect POJOs and deduce query elements from it. This is best explained by … Continue reading Advanced Java Trickery for Typesafe Query DSLs
Why Did SQLJ Die?
Every now and then, SQLJ pops up somewhere, mostly in a very dusty/enterprisey or in an academic context. If you give SQLJ some thought, though, it isn't such a bad idea. It is: An ANSI and ISO standardPart of the SQL standardQuite easy to understandQuite a powerful extension to JDBC So why did it die … Continue reading Why Did SQLJ Die?
Ecto a Slick Query DSL for the Elixir Language
Elixir? What on earth is Elixir? It is a programming language that somewhat reminds me of Ruby. Here is some example Elixir code: defmodule Hello do IO.puts "Defining the function world" def world do IO.puts "Hello World" end IO.puts "Function world defined" end And it has a Stack Overflow community with around 50 tagged questions … Continue reading Ecto a Slick Query DSL for the Elixir Language
Simplernate. A Query DSL for Hibernate, Inspired by jOOQ
"Simplernate" ! The name is very compelling. And so is the idea - we think. Specifically, because we get most credit for this new project in the following short readme: https://gist.github.com/thermz/eb1b12b2146168a08e68 It reads: Simplernate is (will be) an Hibernate wrapper that help developer to query the database using Hibernate ORM. To do this, Simplernate offers a … Continue reading Simplernate. A Query DSL for Hibernate, Inspired by jOOQ
A Typesafety Comparison of SQL Access APIs
SQL is a very expressive and distinct language. It is one of the few declarative languages which are used by a broad audience in everyday work. As a declarative language, SQL allows to specify what we're expecting as output, not how this output should be produced. As a side-effect of this, ad-hoc record data types … Continue reading A Typesafety Comparison of SQL Access APIs