• Stars
    star
    2,135
  • Rank 19,609 (Top 0.5 %)
  • Language
    Scala
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated 28 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Compile-time Language Integrated Queries for Scala

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

More Repositories

1

zio

ZIO β€” A type-safe, composable library for async and concurrent programming in Scala
Scala
3,825
star
2

zio-http

A next-generation Scala framework for building scalable, correct, and efficient HTTP clients and servers
Scala
689
star
3

zio-prelude

A lightweight, distinctly Scala take on functional abstractions, with tight ZIO integration
Scala
428
star
4

zio-json

Fast, secure JSON library with tight ZIO integration.
Scala
381
star
5

zio-kafka

A Kafka client for ZIO and ZIO Streams
Scala
320
star
6

zio-actors

A high-performance, purely-functional library for building, composing, and supervising typed actors based on ZIO
Scala
264
star
7

zio-microservice

ZIO-powered microservices via HTTP and other protocols.
Scala
238
star
8

zio-sql

Type-safe, composable SQL for ZIO applications
Scala
225
star
9

zio-config

Easily use and document any config from anywhere in ZIO apps
Scala
211
star
10

zio-intellij

A companion IntelliJ IDEA plugin for the ZIO library ecosystem.
Scala
203
star
11

zio-keeper

A ZIO library for building distributed systems
Scala
196
star
12

zio-nio

A small, unopinionated ZIO interface to NIO.
Scala
186
star
13

zio-protoquill

Quill for Scala 3
Scala
182
star
14

zio-akka-cluster

ZIO wrapper for Akka Cluster
Scala
162
star
15

interop-cats

ZIO instances for cats-effect type classes
Scala
152
star
16

zio-logging

Powerful logging for ZIO 2.0 applications, with compatibility with many logging backends out-of-the-box.
Scala
152
star
17

zio-direct

Direct-Style Programming for ZIO
Scala
146
star
18

zio-query

Add efficient pipelining, batching, and caching to any data source
Scala
140
star
19

izumi-reflect

TypeTag without scala-reflect. Supports Scala 2 and Scala 3.
Scala
132
star
20

zio-flow

Resilient, distributed applications powered by ZIO
Scala
132
star
21

zio-aws

Low level ZIO interface for the full AWS
Scala
131
star
22

zio-schema

Compositional, type-safe schema definitions, which enable auto-derivation of codecs and migrations.
Scala
122
star
23

zio-cli

Rapidly build powerful command-line applications powered by ZIO
Scala
116
star
24

zio-redis

A ZIO-based redis client
Scala
111
star
25

zio-telemetry

ZIO-powered OpenTelemetry library
Scala
107
star
26

zio-petclinic

An idiomatic pet clinic application written with ZIO.
Scala
92
star
27

zio-zmx

Monitoring, Metrics and Diagnostics for ZIO
Scala
86
star
28

zio-shield

Enforce best coding practices with ZIO
Scala
84
star
29

zio-cache

A ZIO native cache with a simple and compositional interface
Scala
83
star
30

zio-sqs

ZIO-powered client for AWS SQS
Scala
82
star
31

zio-jdbc

A small, idiomatic ZIO interface to JDBC.
Scala
69
star
32

zio-process

A simple ZIO library for interacting with external processes and command-line programs
Scala
61
star
33

zio-analytics

Distributed stream processing using ZIO
Scala
60
star
34

zio-openai

Scala
58
star
35

zio-metrics-legacy

⛔️ DEPRECATED
Scala
57
star
36

zio-optics

Easily modify parts of larger data structures
Scala
56
star
37

zio-quickstarts

A minimal quickstart ZIO application for writing a RESTful Web Service
Scala
52
star
38

interop-reactive-streams

Interoperability Layer Between ZIO and Reactive Streams
Scala
45
star
39

zio-s3

An S3 client for ZIO
Scala
39
star
40

zio-lambda

AWS Lambda Runtime built with ZIO
Scala
37
star
41

zio-dynamodb

Simple, type-safe, and efficient access to DynamoDB
Scala
36
star
42

zio-macros

Macros to scrap ZIO boilerplate
Scala
31
star
43

zio-rocksdb

A ZIO-based interface to RocksDB.
Scala
31
star
44

zio-metrics-connectors

Monitoring, Metrics and Diagnostics for ZIO
Scala
30
star
45

zio-ftp

A simple, idiomatic (S)FTP client for ZIO
Scala
29
star
46

zio-crypto

Fast, secure cryptographic primitives in a ZIO & ZIO Streams friendly package.
Scala
28
star
47

zio-connect

Sources, Sinks and Pipelines for channeling data
Scala
28
star
48

zio-parser

Scala
26
star
49

zio-constraintless

An advanced library for building DSLs that allows defering the existence of type class instances until interpretation.
Scala
24
star
50

zio-codec

High-performance codecs for ZIO applications
Scala
23
star
51

zio-project-seed.g8

giter8 template used to start new ZIO projects for the ZIO organization
Scala
23
star
52

zio-lambda-old

ZIO-powered custom runtime for AWS Lambda
Scala
19
star
53

zio-insight-ui

TypeScript
18
star
54

zio-profiling

Scala
18
star
55

zio-webhooks

A microlibrary for reliable and persistent webhook delivery
Scala
18
star
56

zio-mock

Scala
17
star
57

interop-java

Scala
17
star
58

zio-gcp

A ZIO-based interface to Google Cloud API
Scala
16
star
59

interop-twitter

Scala
16
star
60

caliban-deriving

Full-featured, robust deriving for Caliban.
Scala
15
star
61

zio-test-intellij

An optional ZIO Test runner support module for the ZIO IntelliJ plugin
Shell
15
star
62

zio-delegate

Scala
15
star
63

zio-insight

Toolset for ZIO developers
Scala
12
star
64

zio-wasm

WASM AST and syntax based on zio-parser.
Scala
12
star
65

zio-deriving

Scala
9
star
66

zio-memberlist

Cluster membership and failure detection
Scala
9
star
67

zio-sbt

SBT Plugins For ZIO Projects
Scala
9
star
68

zio-spark

A simple, type-safe ZIO interface to Spark
Scala
9
star
69

interop-monix

Scala
8
star
70

interop-scalaz

Scala
8
star
71

zio-morphir

Scala
6
star
72

zio-uring

Scala
6
star
73

interop-guava

Scala
6
star
74

zio-concurrent

Concurrency utilities for ZIO.
JavaScript
6
star
75

interop-future

Scala
5
star
76

zio-quickstart-graphql-webservice

Quickstart for Writing GraphQL Servers
Scala
4
star
77

zio-cron

ZIO Cron
3
star
78

zio-simple-seed.g8

Scala
3
star
79

zio-meta

Scala
2
star
80

zio-direct-intellij

Scala
2
star
81

zio-insight-server

Scala
2
star
82

zio-docs

Experimenting with a new way of maintaining dev.zio
JavaScript
1
star
83

zio-distributed

The future home of ZIO Distributed!
Scala
1
star
84

zio-bson

Scala
1
star
85

zio-quickstart-hello-world

A minimal working example of ZIO Application
Scala
1
star