mybatis/scala
58.4
Adequate · 7 November 2026
4.1k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Features
Added Maven Wrapper for consistent builds
The project now includes the Maven Wrapper (version 3.3.4) and is configured to use Apache Maven 3.9.16. This allows developers to build the project without manually installing Maven, as the wrapper script will automatically download and use the specified version, ensuring consistent build behavior across environments.
.mvn/wrapper · high confidence
Added Nested Selects example for MyBatis Scala
A new sample application demonstrating nested select mappings has been added to the MyBatis Scala samples. This example shows how to configure result mappings that use separate select statements to load associated objects (via association) and collections (via collection), specifically illustrating a Person entity linked to a Group and multiple ContactInfo records.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/nestedselect · high confidence
Added sample database schema and data utilities
The samples now include utility objects to automatically create the database schema and populate it with sample data. DBSchema defines the tables for people, groups, and contact information, while DBSampleData provides the corresponding insert statements and seed data, allowing users to quickly set up a working environment for the MyBatis Scala examples.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/util · high confidence
Initial release of Scala mapping DSL and type handlers
This change introduces the core Scala mapping API in the \org.mybatis.scala.mapping\ package, providing a type-safe, functional interface for MyBatis operations. It adds abstract statement classes for SQL CRUD operations (\Select\, \Insert\, \Update\, \Delete\, \Perform\) that expose standard Scala function signatures (e.g., \Param =\> Int\), along with support for result caching, pagination via \RowBounds\, and key generation. The release also includes Scala-specific utilities such as \OptionTypeHandler\ for handling nullable values, wrappers for MyBatis enums (\JdbcType\, \StatementType\, \ResultSetType\), and a \T\ type wrapper for runtime class reflection, enabling a more idiomatic Scala development experience.
mybatis-scala-core/src/main/scala/org/mybatis/scala/mapping · high confidence
Introduces pure Scala configuration API with cache and Option type support
The \mybatis-scala-core\ module now provides a pure Scala configuration builder (\Configuration\ and \ConfigurationSpace\) that replaces or supplements XML-based setup. Users can now programmatically define mapped statements, configure cache policies (LRU, FIFO, etc.), and reference external caches directly in Scala code. The configuration automatically registers type handlers for Scala \Option\[\_\]\ types across standard JDBC types, enabling seamless handling of nullable values. Additionally, the \DefaultObjectFactory\ and \DefaultObjectWrapperFactory\ are updated to support Scala collection types (Seq, Map, Set) as bean properties, allowing them to be used directly in MyBatis mappings.
mybatis-scala-core/src/main/scala/org/mybatis/scala/config · high confidence
New Scala mapping and configuration APIs with immutable case class support
The repository introduces new Scala-specific APIs for defining MyBatis mappings and configurations, including compile-time checked inline parameter bindings in \Binding.scala\, a \ResultMap\ builder with support for associations and constructor arguments, and a \RowBounds\ wrapper. A sample demonstrates using these APIs to map query results directly to immutable Scala case classes, enabling type-safe data access without manual bean property mapping.
repository · high confidence
New Scala session management API with configurable executor and isolation levels
The library introduces a new session management layer in the \org.mybatis.scala.session\ package, providing Scala-specific wrappers for MyBatis lifecycle and execution control. Users can now manage database sessions via \SessionManager\, which supports three distinct execution modes: \readOnly\ (auto-rollback), \transaction\ (auto-commit/rollback), and \managed\ (manual control). These methods allow configuration of the \ExecutorType\ (SIMPLE, REUSE, BATCH) and \TransactionIsolationLevel\ (READ\_COMMITTED, SERIALIZABLE, etc.) to tailor transaction behavior. The \Session\ class wraps the underlying \SqlSession\ to expose type-safe select, insert, update, and delete operations, while \ResultHandlerDelegator\ facilitates callback-based result processing.
mybatis-scala-core/src/main/scala/org/mybatis/scala/session · high confidence
New insert samples demonstrating batch execution and Scala 3 syntax
Added two new sample programs, InsertSample and InsertSampleBatch, to the insert directory. InsertSample demonstrates basic insert operations for Person and Group entities using MyBatis Scala. InsertSampleBatch extends this by showing how to execute inserts in batch mode via ExecutorType.BATCH, including manual flush statements and result inspection. Both samples have been updated to use Scala 3 syntax, specifically replacing wildcard imports with the new \* syntax and using scala.compiletime.uninitialized for field initialization.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/insert · high confidence
New sample demonstrating complex result mapping with nested associations and collections
Added a new Scala sample (SelectWithResultMapSample) that illustrates how to map complex SQL results to nested object structures using MyBatis Scala. The sample defines a Person model containing a Group association and a ContactInfo collection, demonstrating the use of ResultMap, association, and collection mappings to handle one-to-many and many-to-one relationships. It also showcases the use of Scala 3's compiletime.uninitialized for field initialization and wildcard imports.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/resultmap · high confidence
Project initialization with build tooling and documentation
The repository has been initialized with essential project infrastructure, including the Apache Maven Wrapper (version 3.3.4) for consistent builds, standard Git configuration files (\.gitignore\, \.gitattributes\) to manage version control hygiene, and legal documents (\LICENSE\, \NOTICE\, \LICENSE\_HEADER\). Additionally, the project now includes a \README.md\ detailing supported Scala versions (2.9.2 through 3.8) and a \renovate.json\ configuration to automate dependency updates.
(repo-wide) · high confidence
Behavioural changes
Add Scala 3 select sample with bind tag support and HSQLDB
The select sample has been updated to use Scala 3 syntax, including wildcard imports (\*) and compiletime.uninitialized for fields. It now demonstrates the \<bind\> tag in dynamic SQL and uses HSQLDB as the database instead of PostgreSQL.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/select · high confidence
Maven wrapper configuration updated with profiler and security settings
The Maven wrapper configuration has been updated to include the maven-profiler extension (version 3.3) via a new extensions.xml file, enforce stronger checksum algorithms (SHA-512, SHA-256, SHA-1, MD5) in maven.config, and define server credentials for central deployment, GitHub pages, and NVD API access in settings.xml.
.mvn · high confidence
Migrate delete and update samples to Scala 3 syntax and semantics
The delete and update sample applications have been rewritten to use Scala 3. This includes migrating wildcard imports from the Scala 2 underscore (\) to the Scala 3 asterisk (\), replacing Scala 2 uninitialized field wildcards with the \scala.compiletime.uninitialized\ construct, and enforcing type-safe signatures for mapped statements. These changes ensure the samples are compatible with the Scala 3 compiler and follow modern Scala idioms.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/delete, mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/update · high confidence
Migrate sample resources to HSQLDB
The sample configuration and database scripts in \mybatis-scala-samples/src/main/resources\ have been updated to use HSQLDB instead of PostgreSQL. The \mybatis.xml\ configuration now points to an in-memory HSQLDB instance (\jdbc:hsqldb:mem:scala\) using the \org.hsqldb.jdbcDriver\, and the \schema.sql\ and \sample-data.sql\ files have been replaced with HSQLDB-compatible table definitions and data inserts, allowing the samples to run without a PostgreSQL dependency.
mybatis-scala-samples/src/main/resources · high confidence
Migrated CRUD samples to Scala 3 and Option-based types
The CRUD sample code has been updated to Scala 3, replacing Scala 2 syntax such as the \extends App\ trait with the \@main\ annotation and wildcard imports with the new \\*\ syntax. The \Item\ model now uses \Option\ types for nullable fields (\info\ and \year\), and the \ItemDAO\ has been adjusted to handle these types, including the use of \scala.compiletime.uninitialized\ for field initialization. Additionally, the \SelectOne\ query signature now returns \Option\[R\]\ to reflect potential absence of results, and the sample application demonstrates these changes by inserting and querying items with optional attributes.
mybatis-scala-samples/src/main/scala/org/mybatis/scala/samples/crud · high confidence
Test coverage
Added performance profiling test for MyBatis Scala samples; Expanded test coverage for core MyBatis-Scala components.
Dependencies
Migrate to Scala 3 and update core dependencies
The project has been migrated from Scala 2 to Scala 3 (version 3.9.0), introducing new Scala 3-specific artifacts (e.g., \scala3-library\_3\, \scala-xml\_3\) and updating the parent POM to \mybatis-scala-parent\_3\. The core module now depends on MyBatis 3.5.19 and ScalaTest 3.2.20, while the samples module uses HSQLDB 2.7.4. Build tooling includes \scala-maven-plugin\ 4.9.10 and \scalatest-maven-plugin\ 2.2.0, with specific configurations to suppress the legacy \-doc-title\ option that breaks Scala 3 scaladoc generation.
(dependencies) · high confidence
Housekeeping
Added license headers and code formatting configuration
The mybatis-scala-core and mybatis-scala-samples modules now include LICENSE\_HEADER files containing the Apache License 2.0 text and format.xml files to support automated code formatting. These additions standardize licensing information and enable consistent code style enforcement across the project.
mybatis-scala-core, mybatis-scala-samples · 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 58 → 58 (-0.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 74 (+0.0)
- Architecture 90 → 90 (+0.0)
- Maturity 41 → 41 (-0.2)
- Readiness 65 → 65 (+0.0)
- Security 100 → 100 (+0.0)
Resolved (5)
- Dependency hygiene PARTLY measured — Maven build resolved part of the dependency graph, currency reported but not scored
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Hotspot: mybatis-scala-core/src/main/scala/org/mybatis/scala/config/DynamicSQLBuilder.scala (mybatis-scala-core/src/main/scala/org/mybatis/scala/config/DynamicSQLBuilder.scala)
- Off-boarding risk: anonymized user #1
New (3)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Off-boarding risk: anonymized user #1
- Orphaned file (mybatis-scala-core/src/main/scala/org/mybatis/scala/mapping/Binding.scala)
Changes since last survey
- 4 commits — 4 feature/other, 0 fixes
By area
- (repo) — 2 commits
- .github/workflows — 1 commit
- mybatis-scala-core/pom.xml — 1 commit
Notable commits
- change: Merge pull request #324 from mybatis/renovate/github-codeql-action-digest
- change: Merge pull request #325 from mybatis/renovate/org.mybatis-mybatis-3.x
- change: Update dependency org.mybatis:mybatis to v3.6.0
- change: Update github/codeql-action digest to 9b32540
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mybatis/scala 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 7 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 d20edd239ec061a01cc528b0ae020102a92fd726 — 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-c34be012586e.