Skip to content
CAI
Software that uses CAICheck a score

playframework/anorm

60.4

Adequate · 6 November 2026

9.8k

lines of production code

Scala

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Anorm integration for enumeratum enums

This change introduces support for enumeratum enums within Anorm by providing \Column\ and \ToStatement\ typeclass instances. It includes traits for standard string-based enums (with sensitive, insensitive, lowercase, and uppercase variants) and value-based enums (supporting Int, Long, Short, String, Char, and Byte backing types), enabling seamless mapping of enumeratum enum members to and from database columns and SQL parameters.

enumeratum · high confidence

Add Pekko Streams integration for reactive SQL queries

Anorm now provides a \PekkoStream\ module that exposes SQL query results as reactive \org.apache.pekko.stream.scaladsl.Source\ streams. This allows users to process database rows lazily and efficiently using Pekko Streams, with the materialized value indicating the number of rows read. The implementation handles JDBC resource management, ensuring connections and result sets are released properly upon stream completion, cancellation, or failure.

pekko · high confidence

Add PostgreSQL JSON/JSONB support and UUID handling

The PostgreSQL module now includes utilities to store and retrieve JSON and JSONB data types directly. Users can pass Play JSON values (JsValue, JsObject) or any serializable type with a Writes instance as SQL parameters using the new asJson and asNullableJson functions, which automatically handle conversion to PostgreSQL's PGobject type. Additionally, the module provides implicit column parsers for reading JSONB columns back into JsValue and JsObject, and supports UUID parameters via a dedicated ToSql instance.

postgres/src/main · high confidence

Add Scala 3 macro implementations for Anorm

This change introduces a new set of Scala 3-specific macro implementations in the \core/src/main/scala-3/anorm/macros\ package to support the Anorm library on Scala 3. The new files include \ImplicitResolver\ for resolving typeclass instances, \Inspect\ for discovering sealed trait subclasses, \RowParserImpl\ for generating row parsers for case classes, \SealedRowParserImpl\ for handling sealed trait hierarchies, \ToParameterListImpl\ for converting case classes and sealed traits to SQL parameters, and \ValueColumn\, \ValueMetaData\, and \ValueToStatement\ for handling value classes. These macros replace or supplement the previous Scala 2 implementation, enabling Anorm's compile-time SQL mapping features to work with Scala 3's quote-based macro system.

core/src/main/scala-3/anorm/macros · high confidence

Add Scala 3-specific macro and compatibility implementations for Anorm

This change introduces the Scala 3 implementation layer for the Anorm library, located in \core/src/main/scala-3/anorm\. It adds \Macro.scala\, which provides Scala 3 quote-based macros for generating row parsers (including \namedParser\, \indexedParser\, \sealedParser\, and \valueColumn\), replacing or supplementing the Scala 2 reflection-based approach. It also includes \SqlQueryCompat.scala\ and \package.scala\ to provide Scala 3-specific compatibility traits and package exports, ensuring that SQL query execution, parameter binding, and string interpolation work correctly within the Scala 3 ecosystem.

core/src/main/scala-3/anorm · high confidence

Add pretty string representation for SQL query tokens

The tokenizer now includes a \Show\ typeclass and specific implementations for \StatementToken\ and \TokenGroup\, enabling a human-readable string representation of internal SQL query structures. This allows users to inspect and debug the tokenized form of prepared statements and placeholders more easily.

tokenizer/src/main/scala · high confidence

Added Scala 3 tokenizer implementation

Introduced a new Scala 3-specific implementation for the SQL statement tokenizer in the \anorm\ package. This change adds \TokenizedStatement.scala\, which provides the core logic for tokenizing SQL strings and binding parameters using Scala 3 macros (\scala.quoted\), enabling the library to function correctly within Scala 3 projects.

tokenizer/src/main/scala-3 · high confidence

Initial release of Anorm core SQL library

This change introduces the core Anorm library for Scala, providing a complete API for executing SQL queries and mapping results. It includes the main entry point in \Anorm.scala\ for executing statements and retrieving generated keys, \BatchSql\ for batch operations, and \Column.scala\ for mapping database columns to Scala types. The library also provides \Row\ and \RowParser\ for parsing result sets, \Cursor\ for iterating over results, and \MetaData\ for handling column metadata and aliases. Additionally, it defines \ParameterMetaData\ and \ParameterValue\ for handling SQL parameters and their JDBC types.

core/src/main/scala · high confidence

New Akka Stream integration for reactive SQL queries

A new \AkkaStream\ module has been added to Anorm, allowing SQL queries to be executed as reactive Akka Streams. This enables users to stream result rows directly from a JDBC connection using \AkkaStream.source\, materializing a \Future\[Int\]\ that contains the count of rows read. The implementation handles connection and statement lifecycle management, including proper cleanup on downstream completion or errors.

akka/src/main · high confidence

Removals

Removal of internal Anorm and parser-combinator source files

The internal implementation files for the Anorm SQL library and the Scala parser combinators have been removed from the source tree. This includes the deletion of core Anorm components such as Anorm.scala, SqlParser.scala, SqlStatementParser.scala, TypeWrangler.scala, and the magic package traits (Magic10-13) that handled multi-column mapping and CRUD operations, as well as the underlying parser infrastructure files Parsers.scala, Reader.scala, and Utils.scala. Users relying on these specific internal packages or classes will no longer have access to them in this location.

src/main · high confidence

Behavioural changes

Build system upgraded to sbt 2.1.0-M3 with Scala 2.13.18 and 3.3.8 support

The project build has been upgraded to sbt version 2.1.0-M3, requiring a minimum of Java 17 for compilation. The build now targets Scala 2.13.18 and Scala 3.3.8 as the primary published versions, while retaining support for Scala 3.9.0 and 3.10.0-RC3 for testing. This change introduces a new \Common\ build plugin that centralizes compiler options, including fatal warnings and specific linting rules for Scala 2.13 and 3, and configures binary compatibility checking against version 2.6.10 using the sbt-mima-plugin. Additionally, the build now includes a custom \Playdoc\ plugin to package documentation artifacts and updates several build plugins, such as sbt-assembly to 2.5.0 and sbt-unidoc to 0.6.1.

project · high confidence

Joda-Time support moved to a separate module

Support for Joda-Time types (DateTime, Instant, LocalDate, LocalDateTime) has been extracted from the core library into a dedicated \joda\ module. Users who rely on these types for parsing SQL columns or setting statement parameters must now explicitly import the new \JodaColumn\ and \JodaToStatement\ traits to access the implicit conversions.

joda · high confidence

Refactored Scala 2 macros for case classes, sealed traits, and value classes

The Scala 2 macro implementation in \anorm.macros\ has been restructured to improve support for optional fields, value classes, and sealed traits. New internal components (\Implicit\, \ImplicitResolver\, \Inspect\) centralize implicit resolution and type inspection, allowing \RowParserImpl\ and \SealedRowParserImpl\ to better handle self-referential types and discriminated unions. Additionally, \ToParameterListImpl\ now supports parameter projections for case classes, and dedicated implementations (\ValueColumnImpl\, \ValueMetaDataImpl\, \ValueToStatementImpl\) ensure that value classes correctly delegate to their underlying types for SQL mapping and statement setting.

core/src/main/scala-2/anorm/macros · high confidence

Scala 2-specific macro and compatibility layer for anorm

This change introduces Scala 2-specific implementation files (Macro.scala, PackageCompat.scala, SqlQueryCompat.scala, and package.scala) into the core/src/main/scala-2/anorm directory. These files provide the macro-based row parser generation (namedParser, parser, sealedParser) and SQL string interpolation support required for Scala 2 compilation. This separates Scala 2 macro logic from Scala 3 compatible code, enabling the library to support both Scala versions by providing version-specific implementations.

core/src/main/scala-2/anorm · high confidence

Scala 2-specific tokenization implementation for Anorm statements

Added a Scala 2-specific implementation of the \TokenizedStatement\ class and its associated macro-based tokenizer in the \scala-2\ source directory. This change introduces the \stringInterpolation\ macro and \tokenizeImpl\ logic required to parse SQL statement tokens and bind parameters for Scala 2 users, supporting the project's multi-version compatibility strategy.

tokenizer/src/main/scala-2 · high confidence

Test coverage

Added comprehensive test suite for Anorm core functionality; Added tests for Akka Stream integration in Anorm; Added tests for PostgreSQL JSONB and UUID support.

Dependencies

Update build dependencies and baseline Java 17

The build configuration has been updated to baseline Java 17 and upgraded to Specs2 4.23.0 for testing. The project now uses jdbc-scala 1.2.11 for test database mocking and configures scala-parser-combinators 2.5.0 for Scala 2.13+ (with version 1.1.2 retained for Scala 2.12). Additionally, the build sets up binary compatibility checks via sbt-mima and configures header licensing for source files.

(dependencies) · high confidence

Housekeeping

Initial repository setup and configuration

The repository has been initialized with essential configuration files, including \.gitignore\ to exclude build artifacts, \.scalafmt.conf\ to enforce code formatting rules (version 3.11.5, Scala 2.13), and \.scalafix.conf\ for import organization. A \version.sbt\ file has been added to manage dynamic versioning via \sbt-dynver\, and documentation files (README, migration guides, highlights) have been introduced to support the project's release history and user onboarding.

(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 59 → 60 (+1.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 65 → 65 (+0.0)
  • Architecture 89 → 88 (-1.7)
  • Maturity 43 → 49 (+5.9)
  • Readiness 84 → 83 (-0.8)
  • Security 78 → 70 (-7.8)

Resolved (2)

  • Off-boarding risk: anonymized user #1
  • Outdated: com.h2database:h2

New (2)

  • Dependency hygiene PARTLY measured — sbt declarations read, dependency currency not (Maven Central unreachable)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (root) — 1 commit
  • project/Common.scala — 1 commit

Notable commits

  • change: joda-time 2.15.1 (was 2.15.0) (#786)
  • change: scala3-compiler, scala3-library 3.3.9 (was 3.3.8)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

playframework/anorm 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 34f0fe257868e0a57c73ec1ec06ea8b0db4a20b3 — 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-410a2463fa58.