zio/zio-quill
{ "createdAt": "2015-07-20T22:15:04Z", "defaultBranch": "master", "description": "Compile-time Language Integrated Queries for Scala", "fullName": "zio/zio-quill", "homepage": "https://zio.dev/zio-quill", "language": "Scala", "name": "zio-quill", "pushedAt": "2025-11-26T00:17:26Z", "stargazersCount": 2167, "topics": [ "cassandra", "database", "jdbc", "linq", "mysql", "postgres", "scala", "scalajs", "spark", "sparksql" ], "updatedAt": "2025-10-28T13:16:56Z", "url": "https://github.com/zio/zio-quill"}[//] !: # (This file was autogenerated using zio-sbt-website plugin via sbt generateReadme command.)
[//] !: # (So please do not edit it manually. Instead, change “docs/index.md” file or sbt setting keys)
[//] !: # (e.g. “readmeDocumentation” and “readmeSupport”.)
ZIO Quill
Section titled “ZIO Quill”Quill provides a Quoted Domain Specific Language (QDSL) to express queries in Scala and execute them in a target language.
Introduction
Section titled “Introduction”The library’s core is designed to support multiple target languages, currently featuring specializations for Structured Query Language (SQL) and Cassandra Query Language (CQL).
- Boilerplate-free mapping: The database schema is mapped using simple case classes.
- Quoted DSL: Queries are defined inside a
quoteblock. Quill parses each quoted block of code (quotation) at compile time and translates them to an internal Abstract Syntax Tree (AST) - Compile-time query generation: The
ctx.runcall reads the quotation’s AST and translates it to the target language at compile time, emitting the query string as a compilation message. As the query string is known at compile time, the runtime overhead is very low and similar to using the database driver directly. - Compile-time query validation: If configured, the query is verified against the database at compile time and the compilation fails if it is not valid. The query validation does not alter the database state.
Scala 3 Support
Section titled “Scala 3 Support”ProtoQuill provides Scala 3 support for Quill rebuilding on top of new metaprogramming capabilities from the ground > up! It is published to maven-central as the
quill-<module>_3line of artifacts.
Doobie Support
Section titled “Doobie Support”See [here]!(contexts.md#quill-doobie) for Doobie integration instructions.
Example
Section titled “Example”
Note: The GIF example uses Eclipse, which shows compilation messages to the user.
Documentation
Section titled “Documentation”Learn more on the ZIO Quill homepage!
Contributing
Section titled “Contributing”For the general guidelines, see ZIO contributor’s guide.
Code of Conduct
Section titled “Code of Conduct”See the Code of Conduct
Support
Section titled “Support”Come chat with us on [![Badge-Discord]][Link-Discord].
[Badge-Discord] !: https://img.shields.io/discord/629491597070827530?logo=discord “chat on discord” [Link-Discord] !: https://discord.gg/2ccFBr4 “Discord”
Maintainers
Section titled “Maintainers”- @deusaquilus (lead maintainer)
- @fwbrasil (creator)
- @jilen
- @juliano
- @mentegy
- @mdedetrich
Former maintainers:
Section titled “Former maintainers:”- @gustavoamigo
- @godenji
- @lvicentesanchez
- @mxl
You can notify all current maintainers using the handle @getquill/maintainers.
Acknowledgement
Section titled “Acknowledgement”The project was created having Philip Wadler’s talk “A practical theory of language-integrated query” as its initial inspiration. The development was heavily influenced by the following papers:
- A Practical Theory of Language-Integrated Query
- Everything old is new again: Quoted Domain Specific Languages
- The Flatter, the Better
License
Section titled “License”[License]!(LICENSE)