zio/zio-quill
61.4
Adequate · 27 September 2026
23.6k
lines of production code
Scala
primary language
4
measurements over time
What this system is
This system is a Scala library that enables type-safe database queries by translating compile-time code quotations into SQL or CQL strings. It provides context implementations for a wide range of data stores, including relational databases (PostgreSQL, MySQL, Oracle, SQL Server, SQLite, H2), NoSQL systems (Cassandra, OrientDB), and big data platforms (Spark SQL). The library supports multiple effect systems, offering native integration for ZIO and Doobie alongside traditional JDBC and Future-based execution models.
How it got here
2015–2016 — ZIO Quill migration and AST refactoring
32 changes.
The project rebranded to ZIO Quill, modernizing the SBT build infrastructure and restructuring the codebase into a multi-module layout. A major architectural shift involved refactoring the SQL query generation engine to use a new Abstract Syntax Tree (AST) and introducing MirrorContexts for compile-time query validation. Concurrently, database drivers were updated, notably migrating Cassandra to the DataStax Java Driver 4.x and modularizing JDBC contexts, while comprehensive test suites were added to verify the new normalization and encoding logic.
2017–2021 — Engine consolidation and ZIO integration
51 changes.
This period focused on consolidating the core query engine into a unified module and introducing native ZIO support for JDBC and Cassandra contexts. It also added new database integrations for OrientDB and Spark SQL, alongside a comprehensive JDBC code generation tool for automatic schema mapping.
2022–2024 — ZIO and Pekko integration
17 changes.
This period focused on expanding the Quill framework with new ZIO-based JDBC contexts and migrating the Cassandra driver to Apache Pekko. Significant effort was also dedicated to restructuring the codebase, centralizing the Cassandra dialect, and establishing comprehensive test suites for the new integrations and existing database adapters.
Features
Add OrientDB database context support
Users can now query and modify OrientDB databases using Quill. This change introduces the OrientDB-specific context classes (OrientDBSyncContext, OrientDBMirrorContext) and configuration handling, enabling standard Quill SQL/QL operations against OrientDB instances.
quill-orientdb/src/main/scala/io/getquill · high confidence
Add OrientDB-specific LIKE operator support
Users of the OrientDB context can now use the \like\ method on string literals within Quill queries to generate SQL LIKE clauses. This is implemented via a new \OrientDBDsl\ trait that adds an implicit \Like\ class to strings, allowing expressions like \"pattern" like "value"\ to be quoted as \sql"$s1 like $s2"\.
quill-orientdb/src/main/scala/io/getquill/context/orientdb/dsl · high confidence
Add array encoding support for SQL contexts
Users can now encode and decode sequences (arrays) of common types such as String, Int, Long, Date, and LocalDate in SQL queries. This change introduces \ArrayEncoding\ and \ArrayMirrorEncoding\ traits that provide implicit encoders and decoders for collection types, enabling seamless mapping of array fields to and from database columns in both standard and mirror SQL contexts.
quill-sql/src/main/scala/io/getquill/context/sql/encoding · high confidence
Add array support to SqlMirrorContext
The SqlMirrorContext now includes support for array types. This is achieved by mixing in the ArrayMirrorEncoding trait, which enables the context to properly encode and handle array data structures during SQL operations.
quill-sql/src/main/scala/io/getquill · high confidence
Add support for encoding and decoding Scala collection types in OrientDB
The OrientDB context now supports automatic encoding and decoding of Scala \List\, \Set\, and \Map\ types. New \CollectionEncoders\ and \CollectionDecoders\ traits handle the conversion between these Scala collections and their Java counterparts (such as \java.util.List\ and \OTrackedSet\) when interacting with OrientDB documents, allowing users to query and store complex collection structures without manual conversion.
quill-orientdb/src/main/scala/io/getquill/context/orientdb/encoding · high confidence
Added Apple M1 build support with dedicated Dockerfiles and instructions
New Dockerfiles (Dockerfile-sbt and Dockerfile-setup) and a README have been added to the build/m1 directory to enable building and testing the project on Apple M1 hardware. The setup image installs necessary database clients (MariaDB, PostgreSQL, MSSQL, SQLite) and Cassandra, while the SBT image provides the Scala build environment with ARM64 platform support. Users can now follow the provided instructions to configure Docker Desktop resources and use the specific docker-compose-m1.yml file to run tests on M1 chips.
build/m1 · high confidence
Adds DSL methods for LIKE queries and FOR UPDATE locking
The SqlDsl trait now provides convenient methods for common SQL operations. Users can use the like method on strings to generate LIKE clauses (e.g., "value".like("pattern")) and the forUpdate method on queries to append FOR UPDATE locking (e.g., query.forUpdate()).
quill-sql/src/main/scala/io/getquill/context/sql/dsl · high confidence
Initial OrientDB context support
Adds a new database context for OrientDB, enabling users to query and persist data using the OrientDB graph/document database. This change introduces the core context implementation, including SQL-to-OrientDB query translation (idiom), encoder/decoder mappings for standard Scala types, and session management via OPartitionedDatabasePool. Users can now integrate Quill with OrientDB by mixing in the provided context traits.
quill-orientdb/src/main/scala/io/getquill/context/orientdb · high confidence
Introduce JDBC code generation components
Added new classes and traits in the JDBC code generator module to enable automatic Scala code generation from database schemas. This includes DefaultJdbcSchemaReader for extracting table and column metadata, JdbcCodeGeneratorComponents for configuring type mapping and naming strategies, JdbcGenerator for orchestrating the generation process, and DiscoverDatabaseType to automatically detect the underlying database system from the JDBC connection.
quill-codegen-jdbc/src/main/scala/io/getquill/codegen/jdbc/gen · high confidence
Introduce JDBC code generation for composing query schemas with custom contexts
The JDBC code generator now includes \ComposeableTraitsJdbcCodegen\, which generates query schema traits that can be composed with a custom Quill context, allowing users to define DAO objects (e.g., \PersonDao\) within traits that extend their context. This generator supports stereotyping via namespacers to group schemas and handles naming collisions through optional nested traits. Additionally, \DatabaseTypes\ provides a centralized registry for supported databases (H2, MySQL, SQL Server, PostgreSQL, SQLite, Oracle), mapping each to its specific JDBC context and SQL dialect, while \SimpleJdbcCodegen\ remains available for generating basic case classes.
quill-codegen-jdbc/src/main/scala/io/getquill/codegen/jdbc · high confidence
Introduce JDBC code generation model and typing logic
The JDBC code generator now includes a dedicated model layer for handling database schema introspection and type mapping. New files in the \io.getquill.codegen.jdbc.model\ package define \JdbcTypeInfo\ to capture column metadata, \DefaultJdbcTyper\ to map JDBC types (such as \INTEGER\, \VARCHAR\, \DATE\) to Scala classes (like \Int\, \String\, \LocalDate\) with configurable numeric preferences, and \JdbcExpresser\/\JdbcStereotyper\ to process raw schema data into typed table stereotypes. This provides the foundational logic for generating case classes from JDBC schemas.
quill-codegen-jdbc/src/main/scala/io/getquill/codegen/jdbc/model · high confidence
Introduce MirrorContext for compile-time query translation and testing
Added MirrorContext and AsyncMirrorContext, which allow users to translate Quill quotations into SQL strings and prepare parameters at compile time without a live database connection. This enables compile-time query validation (probing) and facilitates unit testing by exposing the generated SQL and bound parameters as in-memory objects.
quill-core/src/main · high confidence
Introduce QuillSparkContext for Spark SQL integration
Adds the QuillSparkContext trait and its companion object, providing the core implementation for executing Quill queries against Apache Spark SQL. This new context handles query preparation, including the substitution of dataset bindings into temporary views and value escaping, and manages result extraction by applying null-percolation logic to correctly handle nested object structures and empty options in Spark DataSets.
quill-spark/src/main/scala/io/getquill · high confidence
Introduce ZIO-based Cassandra context
Users can now execute Cassandra queries using ZIO effects instead of Scala Futures. This change adds a new \CassandraZioContext\ and \CassandraZioSession\ that integrate with ZIO's environment model, allowing database sessions to be provided as dependencies via \ZLayer\. The API supports standard query execution (\run\, \runQuery\, \runQuerySingle\) and streaming (\runQueryStream\) within the ZIO runtime, replacing the previous Future-based approach for ZIO users.
quill-cassandra-zio/src/main · high confidence
Introduce code generation model layer for database schema mapping
The code generator now includes a dedicated model layer in \io.getquill.codegen.model\ that defines how database metadata is processed into generated Scala code. This introduces \JdbcTableMeta\ and \JdbcColumnMeta\ to capture raw JDBC metadata, \TableStereotype\ to represent merged table structures, and \NameParser\ strategies (including \LiteralNames\ and \SnakeCaseNames\) to control how table and column names are transformed. It also adds \PackagingStrategy\ to configure how generated code is organized into packages and files, and \Fuser\ logic to handle column fusion when multiple table variations are present.
quill-codegen/src/main/scala/io/getquill/codegen/model · high confidence
Introduce new code generation engine components
The code generator now uses a new internal architecture in \io.getquill.codegen.gen\ to produce Scala source files. This includes \Generator\ for orchestrating schema reading and file writing, \StereotypePackager\ for grouping tables into packages or objects, and \AbstractCodeEmitter\ for emitting case classes and query schemas. The system supports configurable packaging strategies (e.g., grouping by package or table) and handles naming conventions, including escaping Scala keywords and converting snake\_case to camelCase.
quill-codegen/src/main/scala/io/getquill/codegen/gen · high confidence
Introduction of the SqlContext trait for SQL database operations
A new SqlContext trait has been added to the io.getquill.context.sql package, serving as the foundational interface for SQL-based database contexts. This trait extends the base Context and SqlDsl, providing implicit encoders and decoders for a comprehensive set of standard Scala and Java types, including primitives (Int, Long, Boolean, etc.), temporal types (Date, LocalDate), binary data (Array\[Byte\]), and UUIDs. It also defines the necessary implicit resolution for Option-wrapped types and null-checking logic, enabling the Quill library to map Scala case classes to SQL tables and query results for any concrete SQL dialect implementation.
quill-sql/src/main/scala/io/getquill/context/sql · high confidence
New Doobie JDBC context implementation
A new Doobie-based JDBC context is now available, providing vendor-specific context classes for H2, MySQL, Oracle, Postgres, SQLite, and SQL Server. This implementation leverages the Doobie library to handle database connections and queries, offering a functional approach to database interactions within the Quill framework.
quill-doobie/src/main · high confidence
New ZIO-based JDBC context with lazy DataSource initialization
The \quill-jdbc-zio\ module now provides a new \Quill\ API layer that wraps existing JDBC contexts with ZIO effects. This change introduces lazy initialization for the \DataSource\ (via \lazy val ds\), meaning the connection pool is not created until the first query is executed, improving startup performance. The new context classes (e.g., \Postgres\, \SqlServer\, \H2\) expose ZIO-based result types (\ZIO\[Environment, SQLException, T\]\) and integrate with ZIO's environment model for dependency injection, allowing users to run queries and transactions using ZIO's effect system while maintaining compatibility with standard JDBC drivers.
quill-jdbc-zio/src/main/scala/io/getquill/jdbczio · high confidence
New ZIO-based JDBC contexts for supported databases
The library now provides ZIO-native JDBC contexts for Postgres, SQL Server, H2, MySQL, SQLite, and Oracle. These new context classes (e.g., PostgresZioJdbcContext) integrate with the existing JDBC type mappings and Postgres JSON extensions, allowing users to perform database operations using ZIO effects instead of the previous execution model.
quill-jdbc-zio/src/main/scala/io/getquill · high confidence
New script to simplify container setup
A new \scripts/start\_containers.sh\ script has been added to streamline the local development environment setup. Running this script automatically stops existing containers, rebuilds the images, and executes the \setup\ service with port mappings enabled, reducing the manual steps required to initialize the 'All In One' environment.
scripts · high confidence
New utility helpers for Cassandra context
Added three new utility objects to the Cassandra context: ClassTagConversions provides a helper to convert Scala ClassTags to Java Classes; FutureConversions adds an implicit conversion to transform DataStax ListenableFutures into Scala Futures; and UdtMetaUtils introduces a parser to extract UDT names and keyspaces from path strings.
quill-cassandra/src/main/scala/io/getquill/context/cassandra/util · high confidence
PostgreSQL JSON/JSONB support via zio-json
The Quill JDBC-ZIO context now supports encoding and decoding PostgreSQL JSON and JSONB columns using zio-json. This adds implicit encoders and decoders for JsonValue and JsonbValue wrappers, allowing users to map case classes directly to JSON columns in Postgres. It also provides support for the raw zio.json.ast.Json type, enabling flexible JSON handling without strict schema enforcement.
quill-jdbc-zio/src/main/scala-2.12, quill-jdbc-zio/src/main/scala-2.13 · high confidence
Repository initialization and build environment setup
The repository has been initialized with a new project structure, including a README, Apache 2.0 license, and a Code of Conduct. The build environment is configured with scalafmt 3.9.4 for code formatting, and Docker Compose files are provided to spin up local database instances (Postgres, MySQL, Cassandra, OrientDB, SQL Server, Oracle) for testing. A debug script is also added to facilitate macro logging and tracing during development.
(repo-wide) · high confidence
Architecture
Consolidation of core engine components into quill-engine
The core engine modules (quill-core-portable and quill-sql-portable) have been merged into a single quill-engine module. This refactoring introduces new foundational types such as QAC (Quill Action Concept) in Model.scala to unify query and action definitions, adds a new AstPrinter for debugging AST structures, and establishes a new IdiomContext to manage transpilation configuration and query types. It also includes the introduction of MirrorIdiom and MirrorSqlDialect for testing and reflection, alongside dialect-specific implementations for H2, MySQL, Oracle, and Postgres that now reside directly within this unified engine.
quill-engine/src/main/scala/io/getquill · high confidence
Move Cassandra dialect to quill-engine module
The Cassandra-specific query generation logic (CqlIdiom, CqlNormalize, CqlQuery, and ExpandMappedInfixCassandra) has been moved into the quill-engine module. This change centralizes the Cassandra dialect implementation within the core engine, making the Cassandra context code available as part of the shared engine layer rather than being isolated in a separate context-specific module.
quill-engine/src/main/scala/io/getquill/context/cassandra · high confidence
Behavioural changes
Add Scalafmt-based code formatting utility
The quill-util module now includes a new ScalafmtFormat utility that formats Scala source code using the Scalafmt library with default configuration, replacing the previous Scalariform-based approach. This change also introduces a ThrowableOps helper to convert stack traces to strings, supporting error reporting when code formatting fails.
quill-util · high confidence
Cassandra context refactored with new encoding, UDT, and query DSL support
The Cassandra context implementation has been restructured to introduce explicit support for Cassandra User-Defined Types (UDTs) via a new \UdtMetaDsl\ and macro, allowing users to override UDT names, keyspaces, and column aliases. The context now includes built-in encoders and decoders for \java.time.Instant\ and \java.time.LocalDate\, as well as \Byte\ and \Short\ types. Additionally, the \Ops\ trait adds new query DSL capabilities, including \allowFiltering\ for queries, \IF NOT EXISTS\ for inserts, \IF EXISTS\ for updates and deletes, and \containsValue\ for map collections. A \PrepareStatementCache\ has been added to optimize statement preparation, and the context hierarchy has been split into \CassandraSessionContext\ and \CassandraSessionlessContext\ to better handle different session requirements.
quill-cassandra/src/main/scala/io/getquill/context/cassandra · high confidence
Cassandra session abstraction and statement caching
The Cassandra context now includes a dedicated CassandraSession trait that centralizes access to the Datastax CqlSession, manages keyspace resolution, and implements UDT (User Defined Type) value lookup logic. Additionally, a new Caches.scala file introduces synchronization and asynchronous caching for prepared statements, allowing the driver to reuse prepared statements and automatically invalidate cache entries on failure to improve performance and reduce database load.
quill-cassandra/src/main/scala/io/getquill/context · high confidence
Improved error reporting for unlifted variables in quotations
The quotation engine now includes a \FreeVariables\ analysis that detects when a query definition references variables from outside its scope without explicitly lifting them. If such unlifted variables are found, the system throws a descriptive error instructing the user to wrap the external value with \lift(...)\, preventing ambiguous runtime behavior and clarifying the requirement for explicit variable lifting in \quote\ blocks.
quill-engine/src/main/scala/io/getquill/quotation · high confidence
Introduce DAG-based type ancestry resolution for code generation
The code generator now uses a Directed Acyclic Graph (DAG) to determine the common ancestor type between two Scala types during code generation. A new \Ancestry.scala\ file defines a \DagNode\ structure and a \DefaultNodeCatalog\ that maps primitive and standard library types (such as \Int\, \Long\, \String\, \LocalDateTime\, etc.) into a hierarchy. The \CatalogBasedAncestry\ class implements logic to find the lowest common ancestor in this graph, allowing the generator to correctly resolve type relationships when combining or comparing fields, falling back to \String\ if a type hierarchy node is not found.
quill-codegen/src/main/scala/io/getquill/codegen/dag · high confidence
Introduce Pekko-based Cassandra context
Adds a new Cassandra context implementation that uses Apache Pekko (replacing the previous Akka-based approach) for asynchronous database operations. This change provides a \CassandraPekkoContext\ class that integrates with the Pekko Streams Cassandra connector, enabling streaming queries and async execution, along with the necessary test infrastructure to validate encoding, decoding, and query behaviors against this new backend.
quill-cassandra-pekko · high confidence
Introduce ZIO-idiomatic JDBC context with scoped connection management
The \quill-jdbc-zio\ module now provides a new \ZioJdbc\ object that defines ZIO-native types (\QIO\, \QCIO\, \QStream\) and implicit extension methods to seamlessly integrate JDBC operations with ZIO's effect system. This change introduces scoped connection acquisition via \Quill.Connection.acquireScoped\, ensuring connections are properly released after use, and implements best-effort resource closing to handle \SQLException\ during cleanup gracefully. Existing factory methods for creating \DataSource\ layers are now deprecated in favor of the new \Quill.DataSource\ API, simplifying the setup for users migrating to this ZIO-idiomatic approach.
quill-jdbc-zio/src/main/scala/io/getquill/context · high confidence
Introduces ProtoContext and granular database capability traits
This change establishes a common base context, ProtoContext, to unify the internal APIs between Scala 2 Quill and ProtoQuill, ensuring consistent method signatures for query execution. It also introduces a set of new capability traits (ReturnFieldCapability) that explicitly define database support for returning fields (single, multiple, or via clauses/OUTPUT), handling multi-value INSERT clauses, and managing batch insert returning behavior, allowing contexts to declare their specific SQL dialect capabilities.
quill-engine/src/main/scala/io/getquill/context · high confidence
Introduces ZIO-idiomatic JDBC context with implicit environment support
The quill-zio module now provides a new ZIO-native JDBC context that integrates with ZIO's environment model. This change introduces a \ZioContext\ trait defining result types as \ZIO\[Environment, Error, T\]\ and \ZStream\[Environment, Error, T\]\, allowing database operations to be performed within the ZIO effect system. A key usability improvement is the addition of \ImplicitSyntax\, which enables users to provide database connections implicitly via an \Implicit\ wrapper, eliminating the need to manually provide the environment for every query execution. This simplifies code by allowing \Ctx.run(query).implicitly\ instead of repeated \provide\ calls, while maintaining compatibility with other contexts like Cassandra through a unified API structure.
quill-zio · high confidence
Lazy DataSource Initialization in JDBC Contexts
The JDBC context implementations for H2, MySQL, Oracle, PostgreSQL, SQL Server, and SQLite now initialize the underlying data source lazily. By defining the \dataSource\ field as \lazy val\, the connection pool is not created until the first query is executed, allowing applications to defer resource allocation and handle configuration errors at runtime rather than at context construction time.
quill-jdbc/src/main/scala/io/getquill · high confidence
Major refactoring of SQL normalization and query expansion phases
The SQL normalization pipeline has been restructured to improve how nested queries, joins, and distinct operations are processed. A new \StatelessQueryTransformer\ and \QueryLevel\ system now distinguishes between top-level and inner query contexts, allowing \ExpandNestedQueries\ to correctly handle aliasing and property propagation in subqueries. New normalization phases have been introduced: \AddDropToNestedOrderBy\ fixes SQL Server compatibility by injecting dummy \OFFSET 0\ clauses for nested order-by operations, \ExpandDistinct\ properly expands distinct operations on maps and case classes to prevent invalid SQL, and \FlattenGroupByAggregation\ simplifies aggregation logic within group-by clauses. Additionally, \HideTopLevelFilterAlias\ and \NormalizeFilteredActionAliases\ refine how table aliases are handled in update and delete actions, while \RemoveUnusedSelects\ optimizes generated SQL by filtering out unnecessary subquery properties.
quill-engine/src/main/scala/io/getquill/sql/norm · high confidence
Migrate Cassandra contexts to DataStax Java Driver 4.x (CqlSession)
The Cassandra integration has been upgraded to use the DataStax Java Driver 4.x API, replacing the legacy Cluster-based session management with the new CqlSession. This change introduces new context implementations (CassandraAsyncContext, CassandraSyncContext, and CassandraMirrorContext) that accept a CqlSession instance or configuration directly, and updates the internal SessionBuilder to construct sessions using the driver 4.x builder pattern. Users will need to provide a CqlSession or compatible configuration instead of the old Cluster object, and transaction support is explicitly noted as ignored since Cassandra does not support transactions.
quill-cassandra/src/main/scala/io/getquill · high confidence
New DSL traits for date operations, infix interpolation, and ordering
The \quill-engine\ DSL package now includes new traits that provide implicit conversions and interpolators for users. \DateOps\ adds support for comparing Java SQL date types and Java 8 \java.time\ types (such as \LocalDate\, \LocalDateTime\, \Instant\, etc.) via \Ordered\ implicits. \InfixDsl\ introduces the \sql\ string interpolator for raw SQL injection, deprecates the older \infix\ interpolator in favor of \sql\, and provides a \qsql\ interpolator for compatibility with other libraries like Slick or Doobie. Additionally, \OrdDsl\ provides a default implicit ordering (\ascNullsFirst\), and \UnlimitedTuple\ offers a factory for creating tuples of arbitrary size within queries.
quill-engine/src/main/scala/io/getquill/dsl · high confidence
New build infrastructure with Dockerized database environments and CI scripts
The build system has been restructured to include dedicated Dockerfiles for Cassandra, SBT, setup, and SQL Server, alongside a suite of shell scripts (build.sh, setup\_databases.sh, setup\_db\_scripts.sh, etc.) that automate the provisioning of test databases (PostgreSQL, MySQL, Oracle, SQL Server, Cassandra, SQLite) via Docker Compose. This change introduces a standardized, containerized environment for running tests and builds, replacing previous ad-hoc setup methods.
build · high confidence
New internal utility library for caching, logging, and tracing
The \quill-engine/src/main/scala/io/getquill/util\ package has been populated with a suite of internal helper classes that enhance query performance, debugging, and resource management. A new \Cache\ class provides TTL-based expiration for query results, while \ContextLogger\ introduces configurable query length limits and parameter binding logging. The \Interpolator\ class enables granular, color-coded trace output for various query expansion phases (e.g., SQL normalization, distinct handling), controlled via the new \Messages\ configuration object. Additionally, the package includes \Using\ for safe resource management, \CollectTry\ for aggregating results, and \IndentUtil\ for formatted output, collectively improving the developer experience when debugging complex query transformations.
quill-engine/src/main/scala/io/getquill/util · high confidence
Quat serialization and embedded-field warnings
Quill now serializes query type information (Quats) using Boopickle instead of the previous Twitter Chill mechanism, ensuring consistent serialization across the engine. Additionally, when a query accesses fields inside an embedded case class that lacks a custom encoder, Quill now emits a warning explaining that the innermost field will be used directly and suggesting the addition of a mapped encoding to avoid unexpected behavior.
quill-engine/src/main/scala/io/getquill/quat · high confidence
Refactor JDBC context to use ZIO-native streaming and fiber refs for transactions
The \quill-jdbc-zio\ module has been restructured to provide a more idiomatic ZIO experience. The \ZioJdbcContext\ now delegates core JDBC operations to a new \ZioJdbcUnderlyingContext\ and manages database connections via a \FiberRef\ to support transactions with mixed environments. Additionally, result set consumption has been replaced with a new \ResultSetIterator\ that leverages ZIO streams (\ZStream\) for native chunking, improving performance and resource management for large query results.
quill-jdbc-zio/src/main/scala/io/getquill/context/qzio · high confidence
Refactor SQL statement generation into a new Idiom DSL
The \quill-engine\ now uses a dedicated \idiom\ package to handle SQL statement construction, introducing a new \Idiom\ trait and a \Statement\ AST with specific token types (e.g., \ValuesClauseToken\, \ScalarLiftToken\). This change replaces the previous statement generation logic with a more structured approach that supports batch inserts via VALUES clauses and improves how lifted values are reified into SQL strings, providing a cleaner foundation for database-specific dialect implementations.
quill-engine/src/main/scala/io/getquill/idiom · high confidence
Refactored AST aliasing and normalization logic in the query engine
The normalization pipeline in the query engine has been restructured to improve how variable aliases are managed during query translation. New components in the capture package now handle specific aspects of this process: \AvoidAliasConflict\ ensures symbol names remain unique across nested query layers to prevent SQL generation errors; \Dealias\ simplifies the AST by resolving temporary variable references; \DemarcateExternalAliases\ protects variables in \returning\ clauses from being incorrectly merged with inner filter aliases; and \TemporaryIdent\ provides pattern matching for temporary identifiers. This refactoring clarifies the separation of concerns within the normalization phase, ensuring more robust handling of complex query structures.
quill-engine/src/main/scala/io/getquill/norm/capture · high confidence
Refactored AST representation and transformation infrastructure
The internal Abstract Syntax Tree (AST) structure and its transformation logic have been reorganized to improve maintainability and support new query capabilities. The AST node definitions (such as Entity, Filter, Map, GroupBy) and operator definitions have been consolidated into the core Ast.scala file, while helper utilities like binary operation matchers (+\|\|+, +&&+) and null checks have been moved to AstOps.scala. New transformer traits (StatefulTransformer, StatelessTransformer, StatefulTransformerWithStack) and a CollectAst utility have been introduced to standardize how AST nodes are traversed and modified, providing a more robust foundation for query expansion and optimization phases.
quill-engine/src/main/scala/io/getquill/ast · high confidence
Refactored Cassandra encoding to use a unified CassandraMapper and support collections in UDTs
The Cassandra encoding layer has been restructured to use a new \CassandraMapper\ abstraction that handles conversion between Scala types and Cassandra driver types, explicitly passing the database session to allow for dynamic UDT value creation. This change introduces built-in support for encoding and decoding Scala \List\, \Set\, and \Map\ collections for both standard columns and Cassandra User-Defined Types (UDTs). Additionally, the update adds explicit encoders and decoders for \java.time.Instant\ and \LocalDate\, and ensures that UDT fields can now contain optional values and collections.
quill-cassandra/src/main/scala/io/getquill/context/cassandra/encoding · high confidence
Refactored JDBC context into modular encoding and execution traits
The JDBC context implementation has been restructured into a set of composable traits to improve extensibility and database-specific customization. \Encoders\ and \Decoders\ are now split into base traits and database-specific mixins (e.g., \BasicTimeEncoders\, \ObjectGenericTimeEncoders\), allowing contexts like Postgres or MySQL to override type mappings (such as \UUID\ or \LocalDate\) without modifying core logic. New \ArrayEncoders\ and \ArrayDecoders\ traits provide default support for encoding and decoding JDBC arrays for common types like \String\, \Int\, and \BigDecimal\. Additionally, \BooleanIntEncoding\ and \BooleanObjectEncoding\ allow dialects to choose between integer-based or object-based boolean storage, while \BaseContexts\ and \SimplifiedContexts\ streamline the inheritance hierarchy for specific databases like Postgres, H2, MySQL, SQLite, SQL Server, and Oracle.
quill-jdbc/src/main/scala/io/getquill/context · high confidence
Refactored SQL idiom generation into modular support traits
The SQL idiom generation logic in \quill-engine\ has been restructured into a set of composable traits (\BooleanLiteralSupport\, \ConcatSupport\, \OnConflictSupport\, \PositionalBindVariables\, \QuestionMarkBindVariables\, \SqlIdiom\, \VerifySqlQuery\). This change introduces specific behaviors for boolean literal rendering (converting to \1\/\0\ or \1 = 1\/\1 = 0\ based on configuration), configurable concatenation functions (defaulting to \UNNEST\), and explicit support for \ON CONFLICT\ clauses with proper alias handling. It also standardizes bind variable placeholders to either positional (\$1\) or question-mark (\?\) styles and adds verification logic to detect invalid free variables in generated SQL queries, improving both modularity and query correctness.
quill-engine/src/main/scala/io/getquill/sql/idiom · high confidence
Refactored SQL query representation and added DistinctOn support
The SQL query generation logic has been restructured to use a new \SqlQuery\ AST (replacing the previous \Query\ type) and a dedicated \Common.scala\ helper for detecting impurities in AST nodes. This change introduces support for \DistinctOn\ queries, allowing users to specify distinctness based on specific columns rather than entire rows. Additionally, the handling of top-level infix queries (e.g., \sql"..."\) has been refined to prevent unnecessary column aliasing in the final SQL output, ensuring raw SQL strings are rendered more directly.
quill-engine/src/main/scala/io/getquill/sql · high confidence
Removal of legacy SQL query generation and AST rendering components
The SQL module has removed several internal components that handled the translation of Quill queries into SQL strings and the rendering of the Abstract Syntax Tree (AST). Specifically, the \ExprShow\, \SqlQueryShow\, and \SqlSourceMacro\ files have been deleted, along with the \SqlQuery\ and \SqlSource\ classes. This indicates a significant refactoring of how SQL queries are constructed and displayed, likely moving towards a new AST structure (as hinted by commit messages renaming \Expr\ to \Ast\) and a different mechanism for query normalization and execution.
quill-sql/src/main/scala/io/getquill/sql · medium confidence
Restructured normalization pipeline with new AST transformation phases
The query normalization logic in \quill-engine\ has been reorganized into a modular, phase-based pipeline. New files such as \AdHocReduction\, \ApplyMap\, \AttachToEntity\, \BetaReduction\, \DisablePhase\, \ExpandReturning\, \FlattenOptionOperation\, \Normalize\, \NormalizeCaching\, \NormalizeNestedStructures\, \NormalizeReturning\, \NormalizeStringConcat\, \OrderTerms\, and \RenameProperties\ introduce specific transformations for AST manipulation, including map application, option flattening, alias conflict avoidance, and property renaming. The \Normalize\ class now orchestrates these phases (e.g., \ApplyMapPhase\, \SymbolicReductionPhase\, \AdHocReductionPhase\) and supports disabling specific phases via \TranspileConfig\. This change improves the clarity and maintainability of the normalization process by separating concerns into distinct, testable components.
quill-engine/src/main/scala/io/getquill/norm · high confidence
Spark SQL query generation and binding logic refactored
The Spark SQL query generation pipeline has been restructured to improve how nested objects, aliases, and parameter bindings are handled. New files introduce a \Binding\ abstraction for query parameters, simplified \Encoders\ and \Decoders\ that rely on string representation for Spark compatibility, and a \SimpleNestedExpansion\ transformer that flattens nested case classes and tuples into explicit select columns. The \SparkDialect\ now uses these components to correctly generate \struct\ expressions for nested types and handle single-value selections, ensuring that complex nested queries are translated into valid Spark SQL.
quill-spark/src/main/scala/io/getquill/context/spark · high confidence
Spark queries now escape question marks in string literals and infix expressions
String values and infix expressions in Spark queries are now normalized to escape literal question marks (replacing '?' with '\\?'). This prevents Spark from misinterpreting question marks within string data as parameter placeholders, ensuring that queries containing such characters execute correctly without unintended parameter binding errors.
quill-spark/src/main/scala/io/getquill/context/spark/norm · high confidence
Test coverage
Add test configuration and logging for Cassandra integration; Add test resource configurations for multiple database backends; Added Cassandra test schema for comprehensive data type coverage; Added H2-specific JDBC test suite; Added PostgreSQL JDBC integration tests; Added SQL schema definitions for H2 and SQLite test databases; Added SQL test suite for quill-sql-test; Added ZIO JDBC example code; Added ZIO JDBC integration tests for H2, MySQL, SQLite, and SQL Server; Added ZIO-based Cassandra integration tests and examples; Added ZIO-based JDBC test suites for Postgres and Oracle; Added ZIO-specific test infrastructure and specs for JDBC context; Added base test infrastructure for encoding and context verification; Added comprehensive test coverage for AST normalization phases; Added comprehensive test suite for Quill OrientDB context; Added comprehensive tests for IO monad operations; Added integration tests for JDBC code generation; Added test configuration files for Quill JDBC ZIO module; Added test coverage for JDBC context configuration and preparation logic; Added test coverage for dynamic query quotation and AST analysis; Added test for streaming large JDBC result sets; Added test resources for JDBC code generation; Added test utilities for JDBC code generation; Added tests for Cassandra UDT encoding and metadata DSL; Added tests for Cassandra property renaming in query operations; Added tests for Cassandra query operations and collection filtering; Added tests for DSL encoding, meta, and query operations; Added tests for Doobie ZIO returning and context behavior; Added tests for Postgres JSON/JSONB encoding in ZIO JDBC; Added tests for ZIO JDBC context patterns and capabilities; Added tests for ZIO JDBC context resource management; Added tests for context macro actions, binding, and encoding; Added tests for query normalization alias handling; Added tests for the JDBC code generator; Added unit tests for AST operations and transformers; Added unit tests for MirrorIdiom and Row utilities; Added unit tests for Quat type inference and manipulation; Added unit tests for utility components; Expanded SQL test coverage in quill-test-kit; Expanded test coverage for Cassandra context; Expanded test coverage for Quill-Spark query execution; Expanded test coverage for core Quill components; Removed obsolete People test file; Split JDBC tests into separate modules for MySQL and Oracle.
Dependencies
Build infrastructure modernized with SBT 1.11.4 and updated plugins
The project's build system has been upgraded from SBT 0.13.8 to 1.11.4, requiring users to ensure their local SBT installation is compatible. Several legacy plugins (Play, native-packager, sbt-codacy-coverage, sbteclipse, sbt-release) have been removed and replaced with modern equivalents: sbt-scalafmt (2.5.5) for formatting, sbt-scoverage (2.3.1) for coverage, sbt-mima-plugin (1.1.4) for binary compatibility checks, sbt-compile-quick-plugin (1.4.0) for faster compilation, zio-sbt-website (0.7.0) for documentation, and sbt-ci-release (1.11.1) for releases. Additionally, a new \project/Dependencies.scala\ file was introduced to centralize version management, currently setting ZIO to 2.1.20.
project · high confidence
Migrate documentation build to ZIO monorepo and restructure SBT build
The documentation build now uses the \@zio.dev/zio-quill\ npm package, reflecting the project's rebranding from GetQuill to ZIO Quill. The SBT build has been significantly restructured to support the new multi-module layout, introducing distinct module groups for base, database, code generation, and big data components. It adds explicit cross-building support for Scala 2.13 and Scala 3, and updates the \quill-util\ module to use \scalafmt-core\ version 3.9.4 with specific exclusions for Scala 3 compatibility.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 39 → 61 (+22.0)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 91 (-9.1)
- Architecture 100 (new)
- Maturity 44 → 51 (+7.1)
- Readiness 23 → 65 (+41.5)
- Security 50 → 63 (+12.3)
Resolved (33)
- Dimension evaluation failed
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 13 more
New (154)
- AstPrinter.treeify (cognitive 24) (quill-engine/src/main/scala/io/getquill/AstPrinter.scala)
- AstPrinter.treeify (cyclomatic 19) (quill-engine/src/main/scala/io/getquill/AstPrinter.scala)
- BetaReduction.apply (cyclomatic 16) (quill-engine/src/main/scala/io/getquill/norm/BetaReduction.scala)
- Change coupling: ActionMacro.scala ↔ QueryMacro.scala (quill-core/src/main/scala/io/getquill/context/ActionMacro.scala)
- Concentrated knowledge decay
- Documentation: no installation or build instructions (docs/index.md)
- Documentation: no usage examples (docs/index.md)
- Duplicated block (11 lines × 2) (quill-jdbc-zio/src/main/scala-2.12/io/getquill/context/json/PostgresJsonExtensions.scala)
- Duplicated block (11 lines × 2) (quill-jdbc-zio/src/main/scala-2.12/io/getquill/context/json/PostgresJsonExtensions.scala)
- Duplicated block (11–12 lines × 2) (quill-engine/src/main/scala/io/getquill/idiom/ReifyStatement.scala)
- Duplicated block (13–23 lines × 2) (quill-engine/src/main/scala/io/getquill/sql/idiom/SqlIdiom.scala)
- Duplicated block (14 lines × 2) (quill-engine/src/main/scala/io/getquill/sql/idiom/SqlIdiom.scala)
- Duplicated block (14–15 lines × 2) (quill-engine/src/main/scala/io/getquill/ast/StatefulTransformer.scala)
- Duplicated block (15 lines × 2) (quill-cassandra/src/main/scala/io/getquill/context/cassandra/encoding/UdtEncodingMacro.scala)
- Duplicated block (19 lines × 2) (quill-engine/src/main/scala/io/getquill/norm/SheathLeafClauses.scala)
- Duplicated block (5 lines × 2) (quill-engine/src/main/scala/io/getquill/MirrorIdiom.scala)
- Duplicated block (5 lines × 2) (quill-engine/src/main/scala/io/getquill/OracleDialect.scala)
- Duplicated block (5 lines × 2) (quill-engine/src/main/scala/io/getquill/sql/idiom/SqlIdiom.scala)
- Duplicated block (5 lines × 3) (quill-engine/src/main/scala/io/getquill/context/cassandra/CqlIdiom.scala)
- Duplicated block (6 lines × 2) (quill-cassandra/src/main/scala/io/getquill/context/cassandra/encoding/Encoders.scala)
- …and 134 more
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (root) — 1 commit
Notable commits
- change: Update zio-sbt-website to 0.7.0 (#3422)
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-quill 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 27 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 5f969988cc2771ef401ca85497fb996d75965d20 — 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-d00c643c3f66.