github cashapp/sqldelight 2.0.0-alpha01
Version 2.0.0-alpha01 (2022-03-31)

latest releases: 2.0.2, 2.0.1, 2.0.0...
2 years ago

Change Log

[2.0.0-alpha01] - 2022-03-31

This is the first alpha release for 2.0 and has some breaking changes. We expect more ABI breaking changes to come so don't publish any libraries with dependencies on this release (applications should be fine).

Breaking Changes

  • You'll need to replace all occurrences of com.squareup.sqldelight with app.cash.sqldelight
  • The IDE plugin must be updated to a 2.X version, which can be found in the alpha or eap channel
  • Dialects are now dependencies which you can specify within gradle:
sqldelight {
  MyDatabase {
    package = "com.example"
    dialect = "app.cash.sqldelight:mysql-dialect:2.0.0-alpha01"
  }
}

The currently supported dialects are mysql-dialect, postgresql-dialect, hsql-dialect, sqlite-3-18-dialect, sqlite-3-24-dialect, sqlite-3-25-dialect, sqlite-3-30-dialect, and sqlite-3-35-dialect

  • Primitive types must now be imported (for example INTEGER AS Boolean you have to import kotlin.Boolean), some previously supported types now need an adapter. Primitive adapters are available in app.cash.sqldelight:primitive-adapters:2.0.0-alpha01 for most conversions (like IntColumnAdapter for doing Integer AS kotlin.Int).

Added

Changed

  • [Everything] Package name has changed from com.squareup.sqldelight to app.cash.sqldelight.
  • [Runtime] Move dialects into their own isolated gradle modules
  • [Runtime] Switch to driver-implemented query notifications.
  • [Runtime] Extract default column adapters to separate module (#2056, #2060)
  • [Compiler] Let modules generate the queries implementations instead of redoing it in each module
  • [Compiler] Remove the custom toString generation of generated data classes. (by Paul Woitaschek)
  • [JS Driver] Remove sql.js dependency from sqljs-driver (by Derek Ellis)
  • [Paging] Remove the android paging 2 extension
  • [IDE Plugin] Add an editor banner while SQLDelight is syncing (#2511)
  • [IDE Plugin] Minimum supported IntelliJ version is 2021.1

Fixed

  • [Runtime] Flatten listener list to reduce allocations and pointer chasing. (by Anders Ha)
  • [IDE Plugin] Fix error message to allow jumping to error (by Philip Wedemann)
  • [IDE Plugin] Add missing inspection descriptions (#2768 by Alexander Perfilyev)
  • [IDE Plugin] Fix exception in GotoDeclarationHandler (#2531, #2688, #2804 by Alexander Perfilyev)
  • [IDE Plugin] Highlight import keyword (by Alexander Perfilyev)
  • [IDE Plugin] Fix unresolved kotlin types (#1678 by Alexander Perfilyev)
  • [IDE Plugin] Fix highlighting for unresolved package (#2543 by Alexander Perfilyev)
  • [IDE Plugin] Dont attempt to inspect mismatched columns if the project index is not yet initialized
  • [IDE Plugin] Dont initialize the file index until a gradle sync has occurred
  • [IDE Plugin] Cancel the SQLDelight import if a gradle sync begins
  • [IDE Plugin] Regenerate the database outside of the thread an undo action is performed on
  • [IDE Plugin] If a reference cannot be resolves use a blank java type
  • [IDE Plugin] Correctly move off the main thread during file parsing and only move back on to write
  • [IDE Plugin] Improve compatibility with older IntelliJ versions (by Matthew Haughton)
  • [IDE Plugin] Use faster annotation API
  • [Gradle Plugin] Explicitly support js/android plugins when adding runtime (by Zac Sweers)
  • [Gradle Plugin] Register migration output task without derviving schemas from migrations (#2744 by Kevin Cianfarini)
  • [Gradle Plugin] If the migration task crashes, print the file it crashed running
  • [Gradle Plugin] Sort files when generating code to ensure idempotent outputs (by Zac Sweers)
  • [Compiler] Use faster APIs for iterating files and dont explore the entire PSI graph
  • [Compiler] Add keyword mangling to select function parameters (#2759 by Alexander Perfilyev)
  • [Compiler] Fix packageName for migration adapter (by Philip Wedemann)
  • [Compiler] Emit annotations on properties instead of types (#2798 by Alexander Perfilyev)
  • [Compiler] Sort arguments before passing to a Query subtype (#2379 by Alexander Perfilyev)

Don't miss a new sqldelight release

NewReleases is sending notifications on new releases.