AugustNagro/magnum
62.2
Adequate · 6 November 2026
4.7k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Magnum is a type-safe database access library for Scala 3 that provides a unified API for interacting with multiple database engines including PostgreSQL, MySQL, SQL Server, Oracle, H2, and ClickHouse. It supports advanced data mapping features such as automatic enum conversion, JSON/XML handling, and array operations, while offering native integration with ZIO and Cats Effect for effectful transaction management.
How it got here
2023 — Initial release and database support expansion
7 changes.
This period marks the initial release of the Magnum Scala 3 database library, establishing core type-safe data access abstractions and integrations with ZIO and Cats Effect. The work focused on expanding database compatibility by adding specific codec support for PostgreSQL geometric types and arrays, alongside comprehensive integration tests for ClickHouse, Microsoft SQL Server, and Oracle. The release also involved upgrading the build infrastructure to Scala 3.9.0 LTS and refining the API by removing legacy traits in favor of modern data access patterns.
2024–2026 — PostgreSQL and Effect System Integration
5 changes.
This period focused on expanding magnum-pg with support for PostgreSQL-specific data types, including enums, JSON, and XML. Concurrently, the magnum-zio and magnum-cats-effect modules were enhanced to provide native transaction management and integration with ZIO and Cats Effect contexts.
Features
Add Cats Effect integration for database transactions
The magnum-cats-effect module now provides \TransactorCats\, enabling users to execute Magnum database operations within Cats Effect \F\[\_\]\ contexts. This new component wraps a \DataSource\ to provide \connect\ and \transact\ methods that return effectful results, handling connection acquisition, release, and transaction commit/rollback automatically. The module includes comprehensive tests against PostgreSQL to verify functionality.
magnum-cats-effect · high confidence
Added JSON and XML database codecs for PostgreSQL
New \JsonBDbCodec\, \JsonDbCodec\, and \XmlDbCodec\ traits have been introduced to the \magnum-pg\ module, enabling seamless serialization and deserialization of JSON (including the \jsonb\ type) and XML data types when interacting with PostgreSQL databases.
magnum-pg/src/main/scala/com/augustnagro/magnum/pg/json, magnum-pg/src/main/scala/com/augustnagro/magnum/pg/xml · high confidence
Initial release of the Magnum Scala 3 database library
This change introduces the Magnum library, a type-safe database access layer for Scala 3. It provides a \DbCodec\ typeclass for mapping Scala types to JDBC columns, a \Frag\ SQL interpolator for building queries, and a \Repo\ abstraction for data access. The library includes specific database implementations (\DbType\) for PostgreSQL, MySQL, Microsoft SQL Server, Oracle, H2, and ClickHouse, each handling dialect-specific SQL generation for operations like sorting, pagination, and batch updates. It also introduces \ImmutableRepo\ for read-only access and supports features like composite IDs, enum mapping, and custom codec annotations.
magnum/src/main · high confidence
Introduce ZIO-based database transactor
A new TransactorZIO component is added to the magnum-zio module, providing ZIO-native database transaction management. This implementation allows users to execute database operations within ZIO effects, handling connection acquisition and release automatically. It supports SQL logging and custom connection configuration, and ensures that the original exception is preserved during rollback operations by suppressing secondary errors.
magnum-zio/src/main · high confidence
PostgreSQL-specific codec support for geometric types and arrays
The magnum-pg module now includes built-in support for PostgreSQL-specific data types. Users can directly map PostgreSQL geometric types (box, circle, line, lseg, path, point, polygon) and intervals (PGInterval) to their corresponding Scala classes. Additionally, a new SqlArrayCodec system enables encoding and decoding of SQL arrays for standard types (such as UUID, integers, strings, and dates) as well as collections like Seq, List, Vector, and Buffer, allowing seamless handling of array columns in PostgreSQL databases.
magnum-pg/src/main/scala/com/augustnagro/magnum/pg · high confidence
Support for mapping PostgreSQL and VARCHAR enums to Scala enums
Users can now map PostgreSQL custom enum types and standard SQL string types (VARCHAR, text) to Scala enums in both single values and multi-dimensional arrays. This change introduces new derived codecs (\PgEnumDbCodec\, \PgEnumToScalaEnumSqlArrayCodec\, and \PgStringToScalaEnumSqlArrayCodec\) that automatically handle the conversion between database string representations and Scala enum cases, enabling seamless persistence of enum fields without manual mapping logic.
magnum-pg/src/main/scala/com/augustnagro/magnum/pg/enums · high confidence
Removals
Removal of ImmutableRepo and RowConverter traits
The \ImmutableRepo\ and \RowConverter\ traits have been removed from the magnum-core library. This eliminates the previous mechanism for converting JDBC \ResultSet\ objects into domain entities, meaning users can no longer rely on these specific interfaces for row mapping and must adopt the current data access patterns provided by the library.
magnum-core · high confidence
Test coverage
Added PostgreSQL integration tests for ZIO module; Added comprehensive test coverage for ClickHouse, Microsoft SQL Server, and Oracle databases; Added tests for Postgres-specific codecs and data types.
Dependencies
Upgrade to Scala 3.9.0 LTS and update core dependencies
The project has been upgraded to Scala 3.9.0 LTS, replacing the previous Scala 3.2.2 version. This change includes updates to key library versions such as MUnit (to 1.3.6), Circe (to 0.14.16), and Testcontainers (to 0.44.1), alongside new dependencies for ZIO (2.1.26) and Cats Effect (3.7.1) modules. The build configuration also introduces specific driver versions for PostgreSQL, Microsoft SQL Server, MySQL, Oracle, ClickHouse, and SQLite, ensuring compatibility with the new Scala version and modern testing infrastructure.
(dependencies) · high confidence
Housekeeping
Updated build configuration and documentation for Scala 3.9.0 and Magnum v1.3.0
The project has updated its build configuration to use scalafmt version 3.11.5 and added new ignore rules for IDE and build artifacts (.db, metals, bloop, vscode). The README has been significantly expanded to document the library's features, including the new \connect\ and \transact\ mechanisms, type-safe transaction management, and integrations with ZIO and Cats Effect, while updating the version reference to 1.3.0 and noting the requirement for Scala \>= 3.9.0.
(repo-wide) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 61 → 62 (+1.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 98 → 98 (+0.0)
- Maturity 51 → 54 (+3.1)
- Readiness 55 → 55 (+0.0)
- Security 81 → 81 (+0.0)
- Performance 100 → 100 (+0.0)
Findings
- No change — the same findings as the prior survey.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
AugustNagro/magnum 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 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 8b1bbaeddaa864c4103ce8a953dcee29001d7b92 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-60d1b390edf0.