Skip to content

Releases: smyrgeorge/sqlx4k

1.7.2

06 Mar 16:43

Choose a tag to compare

Release Notes: Version 1.7.2

This release focuses on refactoring the SQLite module, particularly for Android, to improve code maintainability and streamline internal logic by leveraging the shared implementation of the QueryExecutor interface.

🛠 Refactorings & Improvements

  • SQLite (Android) Optimization: Removed redundant overrides of execute and fetchAll from SQLite.Connection and SQLite.Transaction classes. These methods now correctly rely on the base implementation provided by the QueryExecutor interface.
  • SQLite Result Set Handling: Enhanced the conversion logic from Android's Cursor to ResultSet. Improved handling of NULL values and provided more robust type mapping for common SQLite field types (Integer, Float, String, Blob).
  • Code Cleanup: Removed unused imports and redundant internal functions in the sqlx4k-sqlite module for better performance and clarity.

Full Changelog: 1.7.1...1.7.2

1.7.1

03 Mar 18:35

Choose a tag to compare

Release Notes: Version 1.7.1

Release Date: 2026-03-03

This release focuses on improving build maintainability and internal code clarity.


🛠 Build & Infrastructure

  • Migrate Plugin Structure: Simplified build logic by transitioning from custom Kotlin classes to precompiled script plugins in build-logic. This change improves maintainability and streamlines the Gradle configuration across the project modules.

♻️ Refactoring

  • Codegen Improvement: Renamed BUILT_IN_TYPES to PRIMITIVE_TYPES in the sqlx4k-codegen module for better semantic clarity. Updated related comments and simplified the underlying logic.

Full Changelog: 1.7.0...1.7.1

1.7.0

03 Mar 03:49

Choose a tag to compare

Release Notes - Version 1.7.0

🚀 New Features

  • Android Support: Introduced official Android platform support for sqlx4k-sqlite, including integration with the native Android SQLite API.
  • Expanded iOS Support: Added iosX64 target support across the project, expanding the library's reach in the Apple ecosystem.

🛠 Improvements & Refactorings

  • Multiplatform Conventions: Updated build-logic plugins to support new targets and streamline binary distribution for iOS and Android.
  • Documentation: Comprehensive documentation updates for version 1.7.0.

📦 Dependency Updates

  • KSP: Bumped from 2.3.5 to 2.3.6.
  • Kotlinx-io-core: Bumped from 0.8.2 to 0.9.0.
  • Spring Boot: Bumped from 4.0.2 to 4.0.3.
  • JetBrains Annotations: Bumped from 26.0.2-1 to 26.1.0.

Full Changelog: 1.6.0...1.7.0

1.6.0

22 Feb 04:09

Choose a tag to compare

Release Notes - Version 1.6.0

This release introduces significant improvements to connection pooling, enhanced native prepared statement support across all drivers, and more robust SQL parameter handling.

🚀 Features & Enhancements

  • Enhanced Connection Pooling & Transactions:
    • Improved semaphore handling to prevent race conditions during connection acquisition.
    • Enhanced error safety and robustness when closing transactions.
  • Native Prepared Statement Support:
    • Added full native prepared statement support for SQLite, MySQL, and PostgreSQL.
    • Expanded type handling within prepared statements, including support for byte parameters and longArray expansion.
  • Typed Null Parameters:
    • Introduced TypedNull wrapper to allow specifying explicit type information for null parameters.
    • Added bindNull methods to the Statement API for both positional and named parameters.
  • SQL Guards:
    • Added an EmptyCollection guard to prevent and gracefully handle empty list bindings in SQL statements.
  • Refactored SQL Parsing:
    • Improved SQL parsing logic by extracting it into a reusable scanSql utility, ensuring more robust parameter detection and extraction.
  • PostgreSQL Driver Optimizations:
    • Streamlined initialization logic and improved type cast handling for named parameters.
  • PGMQ Updates:
    • Added lastReadAt property to Message to track read timestamps.
    • Switched MessageRowMapper to use column names for better reliability.

🛠 Bug Fixes

  • Removed unnecessary exception handling in execute methods for MySQL and PostgreSQL drivers to allow for cleaner error propagation.
  • Fixed an issue where empty named parameters in PostgreSQL were incorrectly handled during type casting.

📦 Dependency Updates

  • Kotlin: Updated to 2.3.10.
  • SQLite JDBC: Updated org.xerial:sqlite-jdbc from 3.51.1.0 to 3.51.2.0.

🧪 Testing

  • Significant increase in cross-platform test coverage for prepared statements, custom type utilities, and collection expansions across all supported databases.

Full Changelog: 1.5.20...1.6.0

1.5.20

04 Feb 11:41

Choose a tag to compare

What's Changed

Full Changelog: 1.5.19...1.5.20

1.5.19

02 Feb 21:02

Choose a tag to compare

Full Changelog: 1.5.18...1.5.19

1.5.18

01 Feb 10:36

Choose a tag to compare

Full Changelog: 1.5.17...1.5.18

1.5.17

01 Feb 10:36

Choose a tag to compare

Full Changelog: 1.5.16...1.5.17

1.5.16

26 Jan 15:46

Choose a tag to compare

Release Notes for Version 1.5.16

This release focuses on significant internal refactoring of the Foreign Function Interface (FFI) layer, simplifying the project structure by removing redundant header files and modularizing dialect-specific logic.

🚀 Key Improvements & Refactoring

  • FFI Layer Simplification:
    • Removed sqlx4k.h and its associated .def file in favor of a more streamlined native interop approach.
    • Simplified FFI logic within MultiplatformLibConventions to reduce build-logic complexity.
    • Modularized FFI logic across different database dialects (MySQL, PostgreSQL, SQLite).
  • Unified Native Callbacks:
    • Implemented a unified fn callback system across all supported dialects, improving consistency in how native results are handled.
    • Refactored dialect-specific implementations (MySQL.kt, PostgreSQL.kt, SQLite.kt) to utilize the new modularized FFI structure.
  • Code Quality & Maintenance:
    • Removed redundant imports and cleaned up unused native utility functions (DriverNativeUtils.kt).
    • Added auto-generated stubs for key structs like Ptr and Sqlx4kResult to ensure better type safety and interop stability.

🛠 Build & Infrastructure

  • Updated MultiplatformLibConventions plugin to handle cinterop more dynamically based on the target platform and project name.
  • Refined sqlx4k/build.gradle.kts to align with the new plugin structure.

For a full list of changes from the previous version, please refer to the commit history.

Full Changelog: 1.5.15...1.5.16

1.5.15

26 Jan 09:19

Choose a tag to compare

Release Notes - Version 1.5.15

This release introduces significant new features, including batch operation support across multiple dialects, improved error handling with Result.fold, and architectural modularization for better maintainability.


🚀 New Features

  • Batch Operations Support: Added batchInsert and batchUpdate methods to CrudRepository and ContextCrudRepository.
    • PostgreSQL: Full support for batch INSERT and UPDATE with RETURNING clauses.
    • SQLite: Added batchUpdate support using CTE-based implementations (WITH ... UPDATE ... RETURNING).
  • Improved Error Handling: Replaced map with fold in RepositoryProcessor for better result wrapping and consistent error handling across generated CRUD operations.

🛠 Refactoring & Modularization

  • Dialect-Specific Modularization: Refactored platform-specific code and interop methods for MySQL, PostgreSQL, and SQLite.
    • Standardized method prefixes (e.g., sqlx4k_mysql_, sqlx4k_postgresql_).
    • Updated package names to sqlx4k.mysql, sqlx4k.postgresql, and sqlx4k.sqlite.
  • Optimization: Updated Rust Cargo.toml to optimize release profiles (opt-level = 3, codegen-units = 1) and enabled dynamic linking for dialect-specific builds to prevent symbol duplication.
  • Core Improvements:
    • Refactored AbstractStatement for explicit null handling and optimized parameter map initialization.
    • Moved benchmark logic to commonMain for better cross-platform reusability.
    • Removed legacy sqlx4k.h and updated sqlx4k.def compiler options.

📦 Dependency Updates

  • Kotlinx Serialization: Bumped from 1.9.0 to 1.10.0.
  • Spring Boot: Bumped from 4.0.1 to 4.0.2.
  • Gradle Wrapper: Updated from 9.2.1 to 9.3.0.

📖 Documentation & Examples

  • Updated README.md with SQLite support details and batch operation examples.
  • Added exampleBatchOperations to the PostgreSQL example project.
  • Annotated QueryExecutor methods with @Language("SQL") for better IDE support.

Full Changelog: 1.5.14...1.5.15