zio/zio-protoquill
60.2
Adequate · 20 September 2026
18.5k
lines of production code
Scala
primary language
1
measurement over time
What this system is
This system is a Scala-based SQL query library that translates type-safe, macro-driven code into database queries for multiple backends including JDBC, Cassandra, and Doobie. It provides context implementations for various databases such as PostgreSQL, MySQL, and Oracle, supporting features like dynamic filtering, JSON handling, and streaming results. The library has been modernized to support Scala 3 with improved compile-time performance and offers ZIO-native effect handling for asynchronous database operations.
How it got here
2019–2021 — Scala 3 migration and ZIO integration
50 changes.
The project underwent a major migration to Scala 3, introducing a new typed query API, refactoring the macro-based metaprogramming infrastructure, and restructuring the build into a multi-module architecture. Concurrently, it expanded its ecosystem by adding native ZIO support for JDBC and Cassandra contexts, alongside new integrations for Caliban GraphQL and Cassandra database support.
2022–2026 — ZIO and Doobie integration expansion
10 changes.
This period focused on expanding Quill's ecosystem by introducing native JDBC contexts for Doobie and ZIO, enabling developers to use these libraries for database operations. Significant effort was also dedicated to enhancing test coverage for AST serialization, SQL idiom handling, and optional nested product encoding to ensure robustness across these new integrations.
Features
Add Doobie JDBC context support
Users can now execute Quill queries using the Doobie library by instantiating vendor-specific contexts (H2, MySQL, Oracle, Postgres, SQLite, SQLServer) provided in the new \DoobieContext\ object. These contexts extend \DoobieContextBase\, which implements the standard JDBC query, action, batch, and streaming operations using Doobie's \ConnectionIO\ effect type, allowing integration with existing Doobie-based connection management.
quill-doobie/src/main · high confidence
Add JDBC context implementations for multiple databases
This change introduces new JDBC context classes for H2, MySQL, Oracle, PostgreSQL, SQL Server, and SQLite, along with a shared JdbcContextConfig utility. Users can now instantiate database-specific contexts (e.g., PostgresJdbcContext, MysqlJdbcContext) that extend the base JdbcContext and utilize dialect-specific bases, allowing for easier configuration and usage of Quill with these specific database systems.
quill-jdbc/src/main/scala/io/getquill · high confidence
Add Quill-Caliban integration for dynamic GraphQL filtering
This change introduces the \quill-caliban\ module, providing a bridge between Quill's SQL query capabilities and the Caliban GraphQL library. It adds \CalibanIntegration.scala\, which defines custom Caliban \Schema\ and \ArgBuilder\ implementations to automatically translate nested GraphQL input arguments into Quill's \filterByKeys\ and \filterColumns\ methods. The module includes test suites (\CalibanIntegrationSpec\, \CalibanIntegrationNestedSpec\) verifying support for both flat and nested object filtering, along with example applications (\CalibanExample\, \CalibanExampleNested\) demonstrating how to expose Quill-backed queries as GraphQL endpoints.
quill-caliban · high confidence
Added scripts for simulating database latency
New shell scripts were added to the project to help developers simulate realistic network conditions. The \increase\_postgres\_latency.sh\ script applies a 50ms network delay to the PostgreSQL container to better reflect corporate environments where the database is on a separate server. The \start\_containers.sh\ script initializes the environment and includes commented-out commands for applying similar latency to PostgreSQL and MySQL containers, allowing users to easily test batch-query performance under simulated network lag.
scripts · high confidence
Initial implementation of the Cassandra context
This change introduces the core infrastructure for the new Cassandra context, enabling users to query and write to Cassandra databases using Quill. It adds the foundational context traits (CassandraContext, CassandraSessionContext) and a comprehensive encoding/decoding layer that supports standard types (strings, numbers, UUIDs, dates), collections (List, Set, Map), and User-Defined Types (UDTs) via compile-time macros. The implementation also includes a prepared statement cache for performance and a session builder for configuring the underlying Datastax Java driver.
quill-cassandra/src/main/scala/io/getquill/context · high confidence
Introduce Cassandra database context support
Adds a new Cassandra context to Quill, enabling users to query and modify Cassandra databases using Quill's query and action DSLs. This includes synchronous and asynchronous context implementations, configuration handling via Typesafe Config, and support for Cassandra-specific features such as User-Defined Types (UDTs) and query modifiers like ALLOW FILTERING, TTL, and timestamps.
quill-cassandra/src/main/scala/io/getquill · high confidence
Introduce Scala 3 Typed Query API for faster compilation
A new \typedQuery\[T\]\ API is added to the SQL DSL, allowing users to opt into a NamedTuple-based query interface that derives schema information at the type level rather than through heavy macro AST inspection. This provides a faster compilation alternative to the existing \query\[T\]\ macro while producing identical SQL, alongside supporting record-based field access and dynamic query capabilities.
quill-sql/src/main/scala/io/getquill · high confidence
Introduce ZIO-based JDBC context with database-specific implementations
This change introduces a new \quill-jdbc-zio\ module that provides ZIO-native JDBC contexts for PostgreSQL, SQL Server, H2, MySQL, SQLite, and Oracle. Users can now interact with Quill using ZIO effects (ZIO and ZStream) instead of the previous IO-based or standard Scala futures approach. The module includes specific context classes (e.g., \Postgres\, \SqlServer\) that extend base traits to provide database-specific types and dialects, along with ZLayer-based factories for dependency injection of DataSources and Connections. This allows applications to leverage ZIO's effect system for database operations, including transaction management and streaming queries, while maintaining compatibility with existing Quill query syntax.
quill-jdbc-zio/src/main/scala/io/getquill/jdbczio · high confidence
Introduce ZIO-idiomatic JDBC context with streaming and transaction support
The ZIO JDBC context has been rewritten to provide a fully ZIO-native API, replacing previous blocking or non-ZIO execution models. Users can now execute queries, actions, and batch operations as ZIO effects that require a DataSource or Connection, enabling seamless integration with ZIO's environment and resource management. The update adds support for streaming large result sets via ZStream, introduces a \transaction\ method for managing ACID transactions with automatic commit/rollback, and implements prepared statement handling and query translation within the ZIO effect system.
quill-jdbc-zio/src/main/scala/io/getquill/context/qzio · high confidence
Introduces Scala 3 metaprogramming infrastructure for AST handling and configuration
This change adds a new set of Scala 3 macro utilities in the \metaprog\ package to support the internal parsing and transformation of Quill expressions. \ExprModel\ and \ExprAccumulate\ provide a structured way to traverse, match, and extract data from Scala 3 TASTy trees, while \Extractors\ offers pattern matchers for common constructs like infix interpolators. Additionally, \SummonTranspileConfig\ and \SummonParser\ enable the runtime summoning of parser factories and transpilation configuration (such as trace types and disabled phases) directly from the macro context, replacing previous mechanisms with Scala 3-native implementations.
quill-sql/src/main/scala/io/getquill/metaprog · high confidence
Introduces mirror context encoding/decoding infrastructure
Adds the foundational encoding and decoding logic for the mirror context, enabling Quill to serialize and deserialize Scala types to and from database rows. This includes new \Row\ data structures for holding column data, \MirrorEncoders\ and \MirrorDecoders\ traits that define how standard types (such as \String\, \Int\, \UUID\, \Date\, and their \Option\ variants) are mapped, and \ArrayMirrorEncoding\ to support array types. This change provides the necessary infrastructure for the mirror context to function as a bridge between Scala code and database results.
quill-sql/src/main/scala/io/getquill/context/mirror · high confidence
New JDBC encoding and decoding infrastructure for arrays, booleans, and UUIDs
The JDBC context now includes dedicated traits for encoding and decoding JDBC arrays (supporting String, numeric, Date, UUID, and other types), distinct boolean encodings (integer-based vs object-based), and UUID handling (object vs string encoding). This refactors the core encoding/decoding logic into modular traits (ArrayEncoders, ArrayDecoders, BooleanIntEncoding, BooleanObjectEncoding, UUIDObjectEncoding, UUIDStringEncoding) and applies them to specific database dialects (Postgres, H2, MySQL, SQLite, SQL Server, Oracle) via their respective type traits, ensuring correct type mapping for each database.
quill-jdbc/src/main/scala/io/getquill/context · high confidence
New ZIO-based Cassandra context for effectful database operations
Added a new \CassandraZioContext\ and supporting \CassandraZioSession\ that allow Quill to execute Cassandra queries within the ZIO effect system. This enables users to run queries, actions, and streaming results as \ZIO\ effects, integrating seamlessly with ZIO's resource management and runtime, rather than using the previous synchronous or Future-based approaches.
quill-cassandra-zio/src/main · high confidence
New build infrastructure and database setup scripts
The build system now includes a comprehensive set of Dockerfiles and shell scripts to manage local development and testing environments. New Dockerfiles (Dockerfile-cassandra, Dockerfile-mysql, Dockerfile-postgres, Dockerfile-sqlserver, Dockerfile-sbt, Dockerfile-setup) define the base images for the supported databases and the build environment, including specific configurations for Apple M1 chips. The build.sh script orchestrates the compilation and testing process, while setup scripts (setup\_databases.sh, setup\_bigdata.sh, setup\_mysql\_postgres\_databases.sh, setup\_db\_scripts.sh) automate the provisioning and schema initialization for MySQL, PostgreSQL, SQL Server, Oracle, Cassandra, and SQLite within Docker containers.
build · high confidence
New compile-time column and map filtering macros
Added three new macro utilities in the metaprogramming layer: ColumnsFlicer, ListFlicer, and MapFlicer. ColumnsFlicer enables filtering entity fields at compile time based on a provided list of column names, allowing for selective data projection. ListFlicer provides compile-time operations for list manipulation, including index access, tail extraction, nil checking, and length calculation. MapFlicer allows matching entity fields against a Map\[String, Any\] at compile time, facilitating dynamic query construction based on map contents. These macros leverage Scala 3's inline and quoted features to perform these operations during compilation rather than runtime.
quill-sql/src/main/scala/io/getquill/metaprog/etc · high confidence
New generic encoding/decoding infrastructure for Scala 3
The \quill-sql\ module now includes a new generic encoding and decoding system in the \io.getquill.generic\ package, designed for Scala 3. This introduces \GenericEncoder\ and \GenericDecoder\ traits, along with macro-based helpers like \AnyValEncodingMacro\ for handling value types, \ElaborateStructure\ for expanding entity fields, and \ArrayEncoding\ for sequence types. These components provide the foundational logic for mapping Scala types to SQL columns and back, replacing or augmenting previous derivation mechanisms.
quill-sql/src/main/scala/io/getquill/generic · high confidence
New macro debugging and utility extensions for Scala 3
This change introduces a suite of new utility files in the \io.getquill.util\ package to support the Scala 3 migration. It adds extension methods for \Option\, \Either\, and \Throwable\ (e.g., \asTryFail\, \toEitherOr\, \stackTraceToString\) to improve error handling and type conversion. It also provides macro-time formatting tools (\Format\) that wrap Scala 3's \Printer\ to display quoted expressions and types, including a \TypeReprW\ that widens singleton types for readability. Additionally, it includes a new \Interpolator2\ for structured, colorized trace logging during macro expansion, a \GroupByOps\ helper for ordered grouping, and a \Load\ object to resolve Scala 3 modules and classes by name at runtime. These utilities collectively enhance the developer experience when debugging and maintaining the SQL macro logic.
quill-sql/src/main/scala/io/getquill/util · high confidence
New macro-based AST debugging utility
Added a new \PrintMac\ utility in the debug package that allows users to inspect the internal Abstract Syntax Tree (AST) of Quill queries at compile time. By using the \PrintMac.apply\ or \PrintMac.passthrough\ inline methods, developers can print the short code representation of the query tree, and optionally view the detailed untyped tree structure or a deserialized AST, aiding in debugging and understanding how queries are processed.
quill-sql/src/main/scala/io/getquill/util/debug · high confidence
Support for PostgreSQL JSON and JSONB columns in ZIO JDBC context
The ZIO JDBC context now supports encoding and decoding of PostgreSQL \json\ and \jsonb\ columns using \zio.json\. This change adds implicit encoders and decoders for \JsonValue\ and \JsonbValue\ wrappers, allowing users to map case classes directly to these column types. It also provides support for the raw \zio.json.ast.Json\ type, enabling flexible handling of arbitrary JSON structures stored in the database.
quill-jdbc-zio/src/main/scala/io/getquill/context/json · high confidence
ZIO JDBC context now tracks SQL queries and execution info in FiberRefs
The ZIO JDBC context now exposes diagnostic capabilities by tracking the latest SQL query string and execution information within ZIO FiberRefs. This allows users to access the most recent query details and execution metadata from within the ZIO environment, facilitating better debugging and observability for database operations without requiring explicit parameter passing.
quill-jdbc-zio/src/main/scala/io/getquill/context · high confidence
ZIO-based JDBC contexts and diagnostic utilities
This change introduces ZIO-native JDBC context implementations for PostgreSQL, SQL Server, H2, MySQL, SQLite, and Oracle, allowing users to execute database operations using ZIO effects instead of traditional Scala Futures. It also adds a new Diagnostic module that exposes the last executed SQL query and execution info via ZIO FiberRefs, enabling better observability within ZIO fibers, and defines simple JsonValue and JsonbValue wrapper types for JSON handling.
quill-jdbc-zio/src/main/scala/io/getquill · high confidence
Removals
Removal of experimental Scala 3 prototype files
Deleted the experimental Scala 3 prototype files \Main.scala\, \MiniQuill.scala\, \MiniQuillTest.scala\, and \MyWorksheet.sc\ from the \src/main\ directory. This removes the initial \Main\ entry point, the \MiniQuill\ macro-based query DSL implementation (including its AST, lifting/unlifting logic, and test harness), and the union-type worksheet experiment, effectively cleaning up the source tree of these early-stage features.
src/main · high confidence
Behavioural changes
AST and Quat serialization via Boopickle for compile-time performance
The parser module now supports serializing the Abstract Syntax Tree (AST) and Quat (type) structures using Boopickle. This is controlled by the new \SerializeAst\ and \SerializeQuat\ enums, which allow users to enable serialization for all elements or limit it by field count. The \Lifter\ and \Unlifter\ components have been updated to use this serialization when configured, helping to bypass Scala 3's 64KB method size limit on the JVM and improving compile-time performance for complex queries.
quill-sql/src/main/scala/io/getquill/parser · high confidence
Introduce ZIO-idiomatic JDBC context with implicit environment syntax
The quill-zio module now provides a ZIO-native database context that returns ZIO effects and ZStreams instead of traditional futures or blocking results. This change introduces a new \ImplicitSyntax\ object, allowing users to inject database environments (such as a DataSource) implicitly via an \.implicitly\ method, which simplifies query execution by avoiding repetitive environment provisioning. The core \ZioContext\ trait defines the effectful result types (\ZIO\ and \ZStream\), while \ZioTranslateContext\ enables SQL translation within the ZIO effect system, ensuring that all query operations are non-blocking and integrated with ZIO's environment management.
quill-zio · high confidence
Introduction of SQL context abstraction and query normalization
This change introduces the \SqlContext\ trait, which defines the core interface for SQL database interactions by specifying implicit encoders and decoders for standard Scala types (such as String, Int, Date, and UUID). Additionally, it adds a normalization rule (\SimplifyFilterTrue\) that optimizes query execution by automatically removing filters that always evaluate to true, thereby streamlining the generated SQL.
quill-sql/src/main/scala/io/getquill/context/sql · high confidence
Quat inference now warns on single-sided encoder/decoder types
When inferring query types, Quill now checks for the presence of both GenericEncoder and GenericDecoder. If a type has only one (encoder or decoder) but not the other, it is still treated as a value type to maintain compatibility, but a warning is emitted if aggressive checking is enabled. This helps users identify incomplete type definitions that might cause issues during query transformation or execution.
quill-sql/src/main/scala/io/getquill/quat · high confidence
Refactored Context execution and translation pipeline
The core \Context\ trait and its associated verb traits (Prepare, Stream, Translate) have been restructured to use a new \ContextOperation.Factory\ for query compilation and execution. This change introduces an \InternalApi\ object to handle result type wrapping, resolving type-safety issues where \run\ methods previously returned context-specific wrappers (like \ZIO\ or \Future\) that confused the compiler. The refactoring also standardizes how datasource contexts are injected via the \DatasourceContextInjectionMacro\ and separates the translation logic into \ContextVerbTranslate\, allowing queries to be converted to SQL strings with optional pretty-printing.
quill-sql/src/main/scala/io/getquill/context · high confidence
Test coverage
Added AST specification tests for update actions; Added Cassandra test infrastructure and schema; Added JDBC test suites for H2, MySQL, and Oracle; Added SQL idiom test coverage for actions, queries, conditionals, and infix literals; Added SQL schema definitions for database integration tests; Added Scala 3 metaprogramming and typeclass example tests; Added ZIO JDBC test suite and example applications; Added quotation AST tests for SQL actions and queries; Added sanity tests for SQL query translation and execution; Added test configuration for multiple database backends; Added test coverage for Cassandra query normalization and operations; Added test coverage for arbitrary tuples, batch actions, and generic decoders; Added test coverage for dynamic queries and insert/update metadata; Added test coverage for nested distinct clauses, SQL action macros, and non-ANSI dialect contexts; Added test for custom SQL parser extension; Added test for custom parser power function support; Added test resource configurations and schemas for JDBC integration tests; Added test suite for the Cassandra ZIO context; Added tests for AST serialization and implicit class detection; Added tests for Cassandra UDT encoding and metadata DSL; Added tests for Doobie context integration and returning clauses; Added tests for SQL array encoding support; Added tests for SQL idiom handling of Option comparisons and operations; Added tests for TypedEntityQuery AST generation; Added tests for dynamic query UID uniqueness and infix literal handling; Added tests for optional nested product encoding; Added tests for reflective path lookup and static constant splicing; Added unit tests for Quat type representation and query AST validation; Expanded test coverage for SQL query operations and encoding; Initial test suite for the Cassandra context; Ported SQL aggregation and context macro tests; Removed JUnit-based test file.
Dependencies
Major build system overhaul and dependency updates
The build configuration has been completely rewritten from a simple single-project setup to a multi-module structure (quill-sql, quill-jdbc, quill-doobie, quill-caliban, etc.) under the dev.zio organization. This change introduces significant dependency updates, including ZIO 2.1.26, Quill 4.8.5, Doobie 1.0.0-RC12, Caliban 2.11.2, and Logback 1.6.2, while also adding support for community builds and signed publishing.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 60.
Lenses
- Code Health 87
- Architecture 100
- Maturity 57
- Readiness 65
- Security 53
Changes since last survey
- 300 commits — 291 feature/other, 9 fixes
By area
- (root) — 181 commits
- .github/workflows — 37 commits
- quill-sql/src — 22 commits
- project/plugins.sbt — 21 commits
- project/build.properties — 15 commits
- quill-jdbc-zio/src — 8 commits
- quill-jdbc/src — 6 commits
- quill-caliban/src — 3 commits
- quill-jasync-postgres/src — 3 commits
- .github/dependabot.yml — 1 commit
- quill-cassandra-zio/src — 1 commit
- quill-doobie/src — 1 commit
- quill-sql-tests/src — 1 commit
Notable commits
- fix: Bump/Fix docker images and build steps (#521)
- fix: Fix CI: Trigger the CI job when publishing a new GitHub Release (#351)
- fix: Fix Scala Steward configuration (#348)
- fix: Fix dynamic Insert/UpdateMeta and better warning message (#197)
- fix: Fix exception on null json / jsonb value in postgres (#446)
- fix: Fix for indirect-dynamic (#157)
- fix: Replace deprecated setup-scala with setup-java && Try to fix CI (#319)
- fix: fix build (#497)
- fix: fix sbt build (#561)
- change: feat: Update caliban, caliban-zio-http to 2.4.1 (#373)
- change: --- (#451)
- change: Add Release Drafter and Dependabot to the CI (#290)
- change: Add a notice in the changelog file about where the release notes and changelog will be provided in the future (#352)
- change: Add docs for diagnostics
- change: Add encoding for UUID arrays in Postgres (#237)
- change: Add scala-steward CI (#336)
- change: Adding idiomatic-zio cassandra context (#166)
- change: Arbitrary arity tuple (#435)
- change: Avoid running each CI step twice on PRs (#324)
- change: Better logging for particularization (#176)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
zio/zio-protoquill was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 76803759eff0d66b247961f8869a0ac7f565d273 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.