Skip to content

1.14.0

Latest

Choose a tag to compare

@smyrgeorge smyrgeorge released this 02 Oct 17:18
· 1 commit to main since this release

Release Notes: Version 1.14.0

This release adds optimistic locking, transaction savepoints and MariaDB batch inserts, and hardens the native drivers so connection errors are reported instead of aborting the process.

🚀 New Features

  • Optimistic locking with @Version: Annotate a single non-nullable Int/Long property. Generated update()/delete() check the version, update()/batchUpdate() increment it in SQL and read it back via RETURNING. Conflicts fail with the new SQLError.Code.OptimisticLockFailed. In-memory test repositories behave the same way.
  • Transaction savepoints: savepoint(name), releaseSavepoint(name), rollbackToSavepoint(name), plus a scoped savepoint { ... }: Result<T> that releases on success and rolls back on failure.
  • MariaDB dialect: batchInsert via multi-row INSERT ... RETURNING (MariaDB 10.5+). batchUpdate is reported as unsupported on MariaDB.

🐛 Fixes

  • Cancellation-safe transactions: transactions and savepoints roll back when the coroutine is cancelled. CancellationException is rethrown rather than captured in a Result.
  • No more native panics: PostgreSQL, MySQL, SQLite and SQLite-Cipher drivers return driver/connection errors (Io, Tls, Protocol, Decode, ...) as SQLError instead of panicking. Messages containing NUL bytes are sanitized.

🛠 Improvements

  • Platform-specific error and transaction tests for every driver module.
  • Dokka covers sqlx4k-codegen-test and sqlx4k-sqlite-cipher.
  • Issue templates for bug reports and feature requests.
  • README: banner, restructured Transactions/savepoints sections, context-parameter docs, feature overview.

📦 Dependency Updates

  • Kotlin: 2.4.10 → 2.4.20
  • KSP: 2.3.11 → 2.3.12
  • Android KMP library plugin: 9.3.2 → 9.4.1
  • JSqlParser: 5.3 → 5.4
  • Robolectric: 4.16.1 → 4.17
  • r2dbc-postgresql: 1.1.2.RELEASE → 1.1.3.RELEASE
  • Gradle wrapper: 9.7.1 → 9.8.0

Full Changelog: 1.13.1...1.14.0