Quill provides a Quoted Domain Specific Language (QDSL) to express queries in Scala and execute them in a target language.
- 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.
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.
See here for Doobie integration instructions.
Note: The GIF example uses Eclipse, which shows compilation messages to the user.
Learn more on the ZIO Quill homepage!
For the general guidelines, see ZIO contributor's guide.
See the Code of Conduct
- @deusaquilus (lead maintainer)
- @fwbrasil (creator)
You can notify all current maintainers using the handle
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