Over a million developers have joined DZone.

Introducing CQLC: A Query DSL for Cassandra’s CQL in Go, Inspired by jOOQ

· Java Zone

Learn more about how the Java language, tools and frameworks have been the foundation of countless enterprise systems, brought to you in partnership with Salesforce.

This morning, we’ve had very nice feedback about our work on the jOOQ User Group by Ben Hood, who has been a long-time jOOQ user and ideas/bug report contributor. He has taken inspiration from our software to build CQLC, a fluent API / query DSL for Cassandra’s CQL written in Go. Citing Ben:

I think JOOQ is the best thing since sliced bread when it comes to dealing with SQL databases on the JVM. I’ve been writing some CQL based apps in Go, and I’ve really missed JOOQ. So I decided to build a JOOQ for Go/Cassandra.

cqlc generates Go code from your Cassandra schema so that you can write type safe CQL statements in Go with a natural query syntax.

It’s aimed at people using CQL in Golang apps who are looking to reduce boilerplate code. [...] I think it reinforces the pragmatism of the underlying concept behind JOOQ.

The project is available here:


I’ve written a blog post to explain what motivated me to do this here:


That’s great news for Cassandra and CQL! NoSQL databases will not profit from jOOQ directly any time soon – unless they implement actual SQL. We have studied Cassandra’s CQL syntax in the past and we’ve come to the conclusion that formal jOOQ support would be overkill, similar to JCR-SQL2 support or CMIS SQL support. 90% of the jOOQ API wouldn’t work.

So if you're a Go developer using Cassandra, do have a look at CQLC!

Discover how the Force.com Web Services Connector (WSC) is a code-generation tool and runtime library for use with Force.com Web services, brought to you in partnership with Salesforce.


Published at DZone with permission of Lukas Eder, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}