Skip to content

zio/zio-quill

Folders and files

NameName
Last commit message
Last commit date
Jan 18, 2025
Dec 6, 2024
Sep 10, 2024
Jan 20, 2025
Dec 5, 2024
Dec 5, 2024
Dec 5, 2024
Oct 19, 2023
Oct 1, 2023
Dec 6, 2024
Dec 5, 2024
Dec 6, 2024
Oct 22, 2023
Oct 22, 2023
Oct 22, 2023
Dec 5, 2024
Dec 10, 2023
Oct 22, 2023
Dec 5, 2024
Dec 5, 2024
Dec 6, 2024
Dec 6, 2024
Dec 6, 2024
Oct 22, 2023
Dec 10, 2023
Oct 1, 2023
May 30, 2023
Dec 6, 2024
May 15, 2017
Jul 26, 2024
Sep 24, 2023
Jul 26, 2024
Jun 5, 2023
Nov 30, 2015
Jun 25, 2023
Jan 20, 2025
May 9, 2016
Jul 22, 2020
Sep 9, 2024
Dec 6, 2024
Apr 20, 2023
Mar 4, 2016
May 24, 2016

Repository files navigation

ZIO Quill

Quill provides a Quoted Domain Specific Language (QDSL) to express queries in Scala and execute them in a target language.

Production Ready CI Badge Sonatype Releases Sonatype Snapshots javadoc ZIO Quill

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).

  1. Boilerplate-free mapping: The database schema is mapped using simple case classes.
  2. Quoted DSL: Queries are defined inside a quote block. Quill parses each quoted block of code (quotation) at compile time and translates them to an internal Abstract Syntax Tree (AST)
  3. Compile-time query generation: The ctx.run call 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.
  4. 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

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>_3 line of artifacts.

Doobie Support

See here for Doobie integration instructions.

Example

example

Note: The GIF example uses Eclipse, which shows compilation messages to the user.

Documentation

Learn more on the ZIO Quill homepage!

Contributing

For the general guidelines, see ZIO contributor's guide.

Code of Conduct

See the Code of Conduct

Support

Come chat with us on Badge-Discord.

Maintainers

  • @deusaquilus (lead maintainer)
  • @fwbrasil (creator)
  • @jilen
  • @juliano
  • @mentegy
  • @mdedetrich

Former maintainers:

  • @gustavoamigo
  • @godenji
  • @lvicentesanchez
  • @mxl

You can notify all current maintainers using the handle @getquill/maintainers.

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:

License

License