Skip to content

1.15.0

Choose a tag to compare

@smyrgeorge smyrgeorge released this 08 Oct 20:32
· 204 commits to main since this release

Release Notes: Version 1.15.0

This release adds row streaming with fetch() on every driver, a Gradle plugin that configures sqlx4k from a single sqlx4k { } block, and database-reported error details on SQLError.

🚀 New Features

  • Streaming results with fetch(): db.fetch(sql, fetchSize = 1_000) returns a cold Flow<ResultSet.Row>; fetch(sql, rowMapper) returns Flow<T>. Rows are emitted as the database produces them, in chunks of fetchSize, instead of being collected in memory. Available on PostgreSQL, MySQL/MariaDB, SQLite and SQLite-Cipher, on native and JVM drivers, pools, connections and transactions. A failure fails the collection with an SQLError.
  • Gradle plugin (io.github.smyrgeorge.sqlx4k): Configure the driver, generated package, extensions (Pgmq, Arrow) and code-generator args from one block. The plugin applies KSP, registers sqlx4k-codegen, wires generated sources and task ordering, and adds the driver and extension dependencies at the matching version (addDependencies = false to opt out). The examples now build with it.
  • Database error details on SQLError: new sqlState (PostgreSQL, MySQL), nativeCode (MySQL, SQLite) and kind properties. SQLError.Kind classifies errors portably: UniqueViolation, ForeignKeyViolation, NotNullViolation, CheckViolation, ExclusionViolation, Deadlock, SerializationFailure, LockTimeout, Other. Same mapping on native and JVM drivers.

🐛 Fixes

  • Parallel Rust builds: per-module cargo builds and cinterop tasks are serialized via a shared build service, so concurrent target builds no longer race on the generated cbindgen header.

🛠 Improvements

  • Error-detail and streaming tests for every driver (common, JVM, native, Android host).
  • Rust crates: tokio sync + macros features, futures-core / futures-util for row streams.
  • Build, bootstrap and publish scripts cover the new plugin module.

⚠️ Compatibility

  • QueryExecutor gained abstract fetch(...) members. Custom implementations of the interface must add them; built-in drivers are unaffected.

📦 Dependency Updates

  • Kotlin: 2.4.20 → 2.4.21
  • gradle/actions: 6.3.0 → 6.4.0 (#181)

Full Changelog: 1.14.0...1.15.0