Library / SDK
zio/zio-quill avatar
zio/zio-quill

ZIO Quill translates a quote block into SQL or CQL at compile time, and Scala 3 users must leave this repository for ProtoQuill

Compile-time Language Integrated Queries for Scala

2,165 stars356 forksScalaApache-2.0

At a glance

What is it?
zio/zio-quill is a Scala library that parses queries written inside quote blocks and turns them into SQL or Cassandra Query Language during compilation. This review covers the compile-time pipeline, the optional database validation, the module layout, the Scala 3 split and the Docker stack the tests expect.
Who is it for?
ZIO Quill suits Scala 2 teams on JDBC or Cassandra who want queries checked by the compiler and a query string visible in the build output. It is the wrong repository for Scala 3, which the README hands to ProtoQuill.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Scala, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • zio/zio-quill2,165 ★ · -1
Star history
Repository2026-10-082026-11-25
zio/zio-quill2.2k2.2k

-1 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

A quote block becomes an AST, and ctx.run turns that AST into a query string during compilation

Quill describes itself as a Quoted Domain Specific Language (QDSL) for expressing queries in Scala and executing them in a target language. The mechanism has two compile-time stages, and both are spelled out in the project introduction.

First, queries are defined inside a quote block. Quill parses each quoted block of code, which it calls a quotation, at compile time and translates it to an internal Abstract Syntax Tree. Second, the ctx.run call reads the quotation's AST and translates it to the target language, emitting the query string as a compilation message. The database schema is mapped using simple case classes, which the project calls boilerplate-free mapping.

Because the query string is known at compile time, the README says runtime overhead is very low and similar to using the database driver directly. That is the project's own claim, and the repository front page offers no benchmark for it. What you can verify yourself is the other consequence: the SQL appears in the compiler output, so you read the generated query before the program ever runs. The example GIF in the repository uses Eclipse, which shows those compilation messages to the user.

Compile-time validation sends each query to a live database, so the build needs one

The fourth point in the introduction is optional. If configured, the query is verified against the database at compile time, and compilation fails if the query is not valid. The README adds that the validation does not alter the database state.

The cost of that feature is the build environment. A check against a database requires a database the compiler can reach, in every environment that compiles the module with validation switched on. A continuous integration agent without database access cannot run a build that depends on it. The README does not describe how to configure the check or what connection settings it needs, so the setup instructions live on the documentation site at zio.dev/zio-quill.

Teams that skip validation still get the first stage, the translation to a query string, and lose only the check that the string is accepted by a real database.

Two target languages and a long list of modules, one per driver or runtime

The core is designed to support multiple target languages, and today it has specializations for SQL and for Cassandra Query Language. The top-level listing shows that this turns into many modules, each a directory with its own artifact.

For SQL there are quill-sql and quill-jdbc, with quill-jdbc-zio for the ZIO integration and quill-zio beside it. For Cassandra there are quill-cassandra, quill-cassandra-zio and quill-cassandra-pekko. Further directories cover quill-orientdb, quill-spark, quill-doobie, quill-codegen and quill-codegen-jdbc, plus quill-core, quill-engine, quill-util and quill-test-kit as shared pieces.

Test-only modules are named for the databases they exercise: quill-jdbc-test-h2, quill-jdbc-test-mysql, quill-jdbc-test-oracle, quill-jdbc-test-postgres, quill-jdbc-test-sqlite and quill-jdbc-test-sqlserver. The README does not say which of these databases are recommended for production, and it does not rank the modules. The practical step is to pick the module that matches your driver and read its page in the documentation, since each directory name is the only hint the front page gives.

Scala 3 lives in ProtoQuill, published as the quill-module_3 artifacts

The README carries a separate notice for Scala 3. ProtoQuill, a different repository at github.com/zio/zio-protoquill, provides Scala 3 support for Quill, rebuilding on top of the new metaprogramming capabilities from the ground up. It is published to Maven Central as the quill-module_3 line of artifacts.

This repository's badges point at quill-core_2.12, which marks the Scala 2 line. Scala 3 projects are directed to the _3 artifacts instead.

The front page does not say how closely ProtoQuill matches the Scala 2 API, which modules it covers or whether every context in the list above has a _3 counterpart. A team planning a Scala 3 migration should treat that as unanswered and check the ProtoQuill documentation before committing.

Doobie support is a documentation pointer, not a section of the README

A second notice covers Doobie. It says only: see contexts.md, under the heading quill-doobie, for Doobie integration instructions. The quill-doobie directory in the top-level listing is the code behind that pointer.

The pointer itself shows how thin the README is. This file was autogenerated with the zio-sbt-website plugin via the sbt generateReadme command, and the header comments say not to edit it by hand: change docs/index.md or the sbt setting keys readmeDocumentation and readmeSupport instead. What a reader sees on GitHub is therefore a summary generated from the documentation sources, not a place where examples were written.

The front page has no dependency line, no sbt snippet and no quote example in the README. For a first working query the route is the ZIO Quill homepage, which the README links under its Documentation heading.

Running the tests needs Docker for Postgres, MySQL, Cassandra, OrientDB, SQL Server and Oracle

The repository's docker-compose.yml defines the databases the integration tests talk to. Postgres uses the postgres:9.6 image on host port 15432. MySQL uses mysql/mysql-server:8.0.23 on port 13306, and a comment in the file says that image was chosen because it supports ARM64 architecture for M1 Macs. Cassandra is built from build/Dockerfile-cassandra and exposed on 19042. SQL Server is built from build/Dockerfile-sqlserver on 11433. OrientDB uses orientdb:3.2.6 on 12424, and Oracle uses the quillbuilduser/oracle-18-xe-micro-sq image.

The OrientDB entry carries a comment explaining a version bump: OrientDB 3.0.42 did not stay up once started during local testing, so the file moved to 3.2.6, and the same change was made in build.sbt. A separate docker-compose-m1.yml sits next to the main file.

For a contributor the cost is clear. A full local test run means six database containers. A contributor who wants to change one module can narrow the run, but the README says nothing about how, so check the contributor guide linked from the README.

The latest tag is v4.8.6 from July 2025, while the repository saw a push on 21 October 2026

Tagged releases are sparse. v4.8.6 was published on 17 July 2025, v4.8.5 on 24 November 2024 and v4.8.4 on 7 May 2024. The repository is not archived, and the last push came on 21 October 2026, so there has been activity on the branch after the last tag. The README does not explain what that work is.

The maintainer list names six current maintainers: @deusaquilus as lead maintainer, @fwbrasil as creator, and @jilen, @juliano, @mentegy and @mdedetrich. Four former maintainers are listed too: @gustavoamigo, @godenji, @lvicentesanchez and @mxl. The handle @getquill/maintainers notifies all current ones. Community chat happens on Discord, and contribution guidelines and the Code of Conduct are on zio.dev.

The project credits Philip Wadler's talk A practical theory of language-integrated query as its initial inspiration, and names three papers as heavy influences, including Everything old is new again: Quoted Domain Specific Languages and The Flatter, the Better. The license is Apache-2.0, with the text in LICENSE.txt.

Editorial conclusion

ZIO Quill suits Scala 2 teams on JDBC or Cassandra who want queries checked by the compiler and a query string visible in the build output. It is the wrong repository for Scala 3, which the README hands to ProtoQuill. Before adopting, decide whether you can afford compile-time database validation, because that check needs a reachable database in every build that turns it on.

Frequently asked questions

What is ZIO Quill used for?

It lets Scala developers write queries in a quote block and translates them to SQL or Cassandra Query Language at compile time. Its schema mapping uses simple case classes.

Does ZIO Quill support Scala 3?

Scala 3 support is provided by ProtoQuill, a separate repository published to Maven Central as the quill-module_3 line of artifacts.

Does ZIO Quill check queries against the database?

If configured, it verifies the query against the database at compile time and fails the compilation if the query is not valid. The validation does not alter the database state.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. zio/zio-quill on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/zio-zio-quill.svg)](https://hysenlabs.com/projects/zio-zio-quill)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/zio-zio-quill.svg)](https://hysenlabs.com/projects/zio-zio-quill)

Was this useful?