SQLDelight - Generates typesafe Kotlin APIs from SQL
[Compiler] Same adapter type from different tables causing a compilation error in 2.0 alpha
[Compiler] Problem compiling upsert statement (#2791)
[Compiler] Query result should use tables in the select if there are multiple matches (#1874, #2313)
[Compiler] Support updating a view which has a INSTEAD OF trigger (#1018)
[Compiler] Support from and for in function names
[Compiler] Allow SEPARATOR keyword in function expressions
[Compiler] Cannot access ROWID of aliased table in ORDER BY
[Compiler] Aliased column name is not recognized in HAVING clause in MySQL
[Compiler] Erroneous 'Multiple columns found' error
[Compiler] Unable to set PRAGMA locking_mode = EXCLUSIVE;
[PostgreSQL] Postgresql rename column
[MySQL] UNIX_TIMESTAMP, TO_SECONDS, JSON_ARRAYAGG MySQL functions not recognized
[SQLite] fix SQLite window functionality
[IDE Plugin] Run the goto handler in an empty progress indicator (#2990)
[IDE Plugin] Ensure the highlight visitor doesnt run if the project isnt configured (#2981, #2976)
[IDE Plugin] Ensure transitive generated code is also updated in the IDE (#1837)
[IDE Plugin] Invalidate indexes when updating the dialect
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).
com.squareup.sqldelight
with app.cash.sqldelight
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
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
).[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)
value
will be exposed as value_
[Compiler] Don't extract variables for duplicate array parameters (by Alexander Perfilyev)
[Gradle Plugin] add kotlin.mpp.enableCompatibilityMetadataVariant. (#2628 by Martin Bonnin)
[IDE Plugin] Find usages processing requires a read action
[IDE Plugin] Do not reparse under a new dialect if the project is already disposed (#2609)
[IDE Plugin] If the associated virtual file is null, the module is null (#2607)
[IDE Plugin] Avoid crashing during the unused query inspection (#2610)
[IDE Plugin] Run the database sync write inside of a write action (#2605)
[IDE Plugin] Let the IDE schedule SQLDelight syncronization
[IDE Plugin] Fix npe in JavaTypeMixin (#2603 by Alexander Perfilyev)
[IDE Plugin] Fix IndexOutOfBoundsException in MismatchJoinColumnInspection (#2602 by Alexander Perfilyev)
[IDE Plugin] Add description for UnusedColumnInspection (#2600 by Alexander Perfilyev)
[IDE Plugin] Wrap PsiElement.generatedVirtualFiles into read action (#2599 by Alexander Perfilyev)
[IDE Plugin] Remove unnecessary nonnull cast (#2596)
[IDE Plugin] Properly handle nulls for find usages (#2595)
[IDE Plugin] Fix IDE autocomplete for generated files for Android (#2573 by Martin Bonnin)
[IDE Plugin] Fix npe in SqlDelightGotoDeclarationHandler (by Alexander Perfilyev)
[IDE Plugin] Mangle kotlin keywords in arguments inside insert stmt (#2433 by Alexander Perfilyev)
[IDE Plugin] Fix npe in SqlDelightFoldingBuilder (#2382 by Alexander Perfilyev)
[IDE Plugin] Catch ClassCastException in CopyPasteProcessor (#2369 by Alexander Perfilyev)
[IDE Plugin] Fix update live template (by Ilias Redissi)
[IDE Plugin] Adds descriptions to intention actions (#2489 by Alexander Perfilyev)
[IDE Plugin] Fix exception in CreateTriggerMixin if table is not found (by Alexander Perfilyev)
[Compiler] Topologically sort table creation statemenets
[Compiler] Stop invoking forDatabaseFiles
callback on directories (#2532)
[Gradle Plugin] Propagate generateDatabaseInterface task dependency to potential consumers (#2518 by Martin Bonnin)
[JDBC SQLite Driver] Call close() on connection before clearing the ThreadLocal (#2444 by Hannes Struß)
[RX extensions] Fix subscription / disposal race leak (#2403 by Pierre Yves Ricau)
[Coroutines extension] Ensure we register query listener before notifying
[Compiler] Sort notifyQueries to have consistent kotlin output file (by Jiayu Chen)
[Compiler] Don't annotate select query class properties with @JvmField (by Eliezer Graber)
[IDE Plugin] Fix import optimizer (#2350 by Alexander Perfilyev)
[IDE Plugin] Fix unused column inspection (by Alexander Perfilyev)
[IDE Plugin] Add nested classes support to import inspection and class annotator (by Alexander Perfilyev)
[IDE Plugin] Fix npe in CopyPasteProcessor (#2363 by Alexander Perfilyev)
[IDE Plugin] Fix crash in InlayParameterHintsProvider (#2359 by Alexander Perfilyev)
[IDE Plugin] Fix insertion of blank lines when copy-pasting any text into create table stmt (#2431 by Alexander Perfilyev)
Also just a general shoutout to Matthew Haughton who did a lot of work to improve the SQLDelight infrastructure this release.
[Compiler] Report an error when binding a column name in an ORDER BY clause (#1187 by Eliezer Graber)
[Compiler] Registry warnings appear when generating the db interface (#1792)
[Compiler] Incorrect type inference for case statement (#1811)
[Compiler] Provide better errors for migration files with no version (#2006)
[Compiler] Required database type to marshal is incorrect for some database type ColumnAdapter's (#2012)
[Compiler] Nullability of CAST (#1261)
[Compiler] Lots of name shadowed warnings in query wrappers (#1946 by Eliezer Graber)
[Compiler] Generated code is using full qualifier names (#1939)
[IDE Plugin] Trigger sqldelight code gen from gradle syncs
[IDE Plugin] Plugin not regenerating database interface when changing .sq files (#1945)
[IDE Plugin] Issue when moving files to new packages (#444)
[IDE Plugin] If theres nowhere to move the cursor, do nothing instead of crashing (#1994)
[IDE Plugin] Use empty package name for files outside of a gradle project (#1973)
[IDE Plugin] Fail gracefully for invalid types (#1943)
[IDE Plugin] Throw a better error message when encountering an unknown expression (#1958)
[Gradle Plugin] SQLDelight bleeds IntelliJ dependencies onto buildscript class path (#1998)
[Gradle Plugin] "JavadocIntegrationKt not found" compilation error when adding method doc in *.sq file (#1982)
[Gradle Plugin] SqlDeslight gradle plugin doesn't support Configuration Caching (CoCa). (#1947 by Stéphane Nicolas)
[SQLite JDBC Driver] SQLException: database in auto-commit mode (#1832)
[Coroutines Extension] Fix IR backend for coroutines-extensions (#1918 by Derek Ellis)
[MySQL Dialect] Treat MySQL AUTO_INCREMENT as having a default value (#1823)
[Compiler] Fix Upsert statement compiler error (#1809 by Eliezer Graber)
[Compiler] Fix issue with invalid Kotlin being generated (#1925 by Eliezer Grabar)
[Compiler] Have a better error message for unknown functions (#1843)
[Compiler] Expose string as the type for the second parameter of instr
[IDE Plugin] Fix daemon bloat and UI thread stalling for IDE plugin (#1916)
[IDE Plugin] Handle null module scenario (#1902)
[IDE Plugin] In unconfigured sq files return empty string for the package name (#1920)
[IDE Plugin] Fix grouped statements and add an integration test for them (#1820)
[IDE Plugin] Use built in ModuleUtil to find the module for an element (#1854)
[IDE Plugin] Only add valid elements to lookups (#1909)
[IDE Plugin] Parent can be null (#1857)
[IDE Plugin] Use the gradle tooling API to facilitate data sharing between the IDE and gradle
[IDE Plugin] Default to false for schema derivation
[IDE Plugin] Properly retrieve the commonMain source set
[MySQL Dialect] Added minute to mySqlFunctionType() (by MaaxGr)
[Compiler] Add optional javadoc to column defintion rule and to table interface generator (#1224 by Daniel Eke)
[SQLite Dialect] Add support for sqlite fts5 auxiliary functions highlight, snippet, and bm25 (by Daniel Rampelt)
[MySQL Dialect] Support MySQL bit data type
[MySQL Dialect] Support MySQL binary literals
[PostgreSQL Dialect] Expose SERIAL from sql-psi (by Veyndan Stuart)
[PostgreSQL Dialect] Add BOOLEAN data type (by Veyndan Stuart)
[PostgreSQL Dialect] Add NULL column constraint (by Veyndan Stuart)
[HSQL Dialect] Adds AUTO_INCREMENT
support to HSQL (by Ryan Harter)