Releases: sqldelight/sqldelight
Releases · sqldelight/sqldelight
Version 2.0.2 (2024-04-05)
Change Log
Added
- [PostgreSQL Dialect] Add PostgreSQL STRING_AGG function (#4950 by André Danielsson)
- [PostgreSQL Dialect] Add SET statement to pg dialect (#4927 by Bastien de Luca)
- [PostgreSQL Dialect] Add PostgreSql alter column sequence parameters (#4916 by Griffio)
- [PostgreSQL Dialect] Add postgresql alter column default support for insert statement (#4912 by Griffio)
- [PostgreSQL Dialect] Add PostgreSql alter sequence and drop sequence (#4920 by Griffio)
- [PostgreSQL Dialect] Add Postgres Regex function definitions (#5025 by Marius Volkhart)
- [PostgreSQL Dialect] Add grammar for GIN (#5027 by Griffio)
Changed
- [IDE Plugin] Minimum version of 2023.1 / Android Studio Iguana
- [Compiler] Allow overriding the type nullability in encapsulatingType (#4882 by Eliezer Graber)
- [Compiler] Inline the column names for SELECT *
- [Gradle Plugin] switch to processIsolation (#5068 by Emeka Nwagu)
- [Android Runtime] Increase Android minSDK to 21 (#5094 by Philip Wedemann)
- [Drivers] Expose more JDBC/R2DBC statement methods for dialect authors (#5098 by Philip Wedemann)
Fixed
- [PostgreSQL Dialect] Fix postgresql alter table alter column (#4868 by Griffio)
- [PostgreSQL Dialect] Fix 4448 missing import for table model (#4885 by Griffio)
- [PostgreSQL Dialect] Fixes 4932 postgresql default constraint functions (#4934 by Griffio)
- [PostgreSQL Dialect] fixes 4879 postgresql class-cast error in alter table rename column during migrations (#4880 by Griffio)
- [PostgreSQL Dialect] Fix 4474 PostgreSql create extension (#4541 by Griffio)
- [PostgreSQL Dialect] Fixes 5018 PostgreSql add Primary Key not nullable types (#5020 by Griffio)
- [PostgreSQL Dialect] Fixes 4703 aggregate expressions (#5071 by Griffio)
- [PostgreSQL Dialect] Fixes 5028 PostgreSql json (#5030 by Griffio)
- [PostgreSQL Dialect] Fixes 5040 PostgreSql json operators (#5041 by Griffio)
- [PostgreSQL Dialect] Fixes json operator binding for 5040 (#5100 by Griffio)
- [PostgreSQL Dialect] Fixes 5082 tsvector (#5104 by Griffio)
- [PostgreSQL Dialect] Fixes 5032 column adjacency for PostgreSql UPDATE FROM statement (#5035 by Griffio)
- [SQLite Dialect] fixes 4897 sqlite alter table rename column (#4899 by Griffio)
- [IDE Plugin] Fix error handler crash (#4988 by Alexander Perfilyev)
- [IDE Plugin] BugSnag fails to init in IDEA 2023.3 (by Alexander Perfilyev)
- [IDE Plugin] PluginException when opening .sq file in IntelliJ via plugin (by Alexander Perfilyev)
- [IDE Plugin] Dont bundle the kotlin lib into the intellij plugin as its already a plugin dependency (#5126)
- [IDE Plugin] Use the extensions array instead of stream (#5127)
Version 2.0.1 (2023-12-01)
Added
- [Compiler] Add support multi-column-expr when doing a SELECT (#4453 by Adriel Martinez)
- [PostgreSQL Dialect] Add support for PostgreSQL CREATE INDEX CONCURRENTLY (#4531 by Griffio)
- [PostgreSQL Dialect] Allow PostgreSQL CTEs auxiliary statements to reference each other (#4493 by Griffio)
- [PostgreSQL Dialect] Add support for PostgreSQL types for binary expr and sum (#4539 by Adriel Martinez)
- [PostgreSQL Dialect] Add support for PostgreSQL SELECT DISTINCT ON syntax (#4584 by Griffio)
- [PostgreSQL Dialect] Add support for PostgreSQL JSON functions in SELECT statements (#4590 by Marius Volkhart)
- [PostgreSQL Dialect] Add generate_series PostgreSQL function (#4717 by Griffio)
- [PostgreSQL Dialect] Add additional Postgres String function definitions (#4752 by Marius Volkhart)
- [PostgreSQL Dialect] Add DATE PostgreSQL type to min and max aggregate functions (#4816 by André Danielsson)
- [PostgreSQL Dialect] Add PostgreSql temporal types to SqlBinaryExpr (#4657 by Griifio)
- [PostgreSQL Dialect] Add TRUNCATE to postgres dialect (#4817 by Bastien de Luca)
- [SQLite 3.35 Dialect] Allow multiple ON CONFLICT clauses that are evaluated in order (#4551 by Griffio)
- [JDBC Driver] Add Language annotations for more pleasant SQL editing (#4602 by Marius Volkhart)
- [Native Driver] Native-driver: add support for linuxArm64 (#4792 by Philip Wedemann)
- [Android Driver] Add a windowSizeBytes parameter to AndroidSqliteDriver (#4804 by Benoit Lubek)
- [Paging3 Extension] feat: add initialOffset for OffsetQueryPagingSource (#4802 by Mohamad Jaara)
Changed
- [Compiler] Prefer Kotlin types where appropriate (#4517 by Eliezer Graber)
- [Compiler] When doing a value type insert always include the column names (#4864)
- [PostgreSQL Dialect] Remove experimental status from PostgreSQL dialect (#4443 by Philip Wedemann)
- [PostgreSQL Dialect] Update docs for PostgreSQL types (#4569 by Marius Volkhart)
- [R2DBC Driver] Optimize performance when handling integer data types in PostgreSQL (#4588 by Marius Volkhart)
Removed
- [SQLite Javascript Driver] Remove sqljs-driver (#4613, #4670 by Derek Ellis)
Fixed
- [Compiler] Fix compilation of grouped statements with returns and no parameters (#4699 by Griffio)
- [Compiler] Bind arguments with SqlBinaryExpr (#4604 by Griffio)
- [IDE Plugin] Use IDEA Project JDK if set (#4689 by Griffio)
- [IDE Plugin] Fix "Unknown element type: TYPE_NAME" error in IDEA 2023.2 and greater (#4727)
- [IDE Plugin] Fixed some compatibility issues with 2023.2
- [Gradle Plugin] Correct documentation of verifyMigrationTask Gradle task (#4713 by Josh Friend)
- [Gradle Plugin] Add Gradle task output message to help users generate a database before verifying a database (#4684 by Jingwei)
- [PostgreSQL Dialect] Fix the renaming of PostgreSQL columns multiple times (#4566 by Griffio)
- [PostgreSQL Dialect] Fix 4714 postgresql alter column nullability (#4831 by Griffio)
- [PostgreSQL Dialect] Fix 4837 alter table alter column (#4846 by Griffio)
- [PostgreSQL Dialect] Fix 4501 PostgreSql sequence (#4528 by Griffio)
- [SQLite Dialect] Allow JSON binary operator to be used on a column expression (#4776 by Eliezer Graber)
- [SQLite Dialect] Update From false positive for multiple columns found with name (#4777 by Eliezer Graber)
- [Native Driver] Support named in-memory databases (#4662 by Matthew Nelson)
- [Native Driver] Ensure thread safety for query listener collection (#4567 by Kevin Galligan)
- [JDBC Driver] Fix a connection leak in the ConnectionManager (#4589 by Marius Volkhart)
- [JDBC Driver] Fix JdbcSqliteDriver url parsing when choosing ConnectionManager type (#4656 by Matthew Nelson)
Version 2.0.0 (2023-07-26)
SQLDelight 2.0
Please see the detailed upgrading information for how to upgrade from SQLDelight 1.x to SQLDelight 2.0. The IntelliJ plugin needs to go through an approval before it lands on the marketplace inside of IntelliJ but can be downloaded and installed from disk below.
The below notes are all changes from SQLDelight 1.5.5. For only the changes from SQLDelight 2.0.0-rc02 please see the Changelog. Some highlights which signify major changes are highlighted.
All Environments
Added
- [Runtime] Add fun modifier to Listener interface.
- [Runtime] Add linuxArm64, androidNative and watchosDeviceArm targets to runtime (#4258 by [Philip Wedemann][hfhbd])
- [Runtime] Add support for async drivers (#3168 by [Derek Ellis][dellisd])
- [IDE Plugin] Added support for running SQLite, MySQL, and PostgreSQL commands against a running database (#2718 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Add support for the android studio DB inspector (#3107 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Add sqldelight directory suggestions (#3976 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Compact middle packages in project tree (#3992 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Add join clause completion (#4086 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Create view intention and live template (#4074 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Warn about missing WHERE inside DELETE or UPDATE (#4058 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Basic suggested migration (by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Add import hint action (by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Add kotlin class completion (by [Alexander Perfilyev][aperfilyev])
- [Compiler] Support returning at the end of a grouped statement
- [Compiler] Support compiler extensions via dialect modules and add a SQLite JSON extension (#1379, #2087)
- [Compiler] Support PRAGMA statements which return a value (#1106)
- [Compiler] Support generating value types for marked columns
- [Compiler] Add support for optimistic locks and validation (#1952)
- [Compiler] Support multi-update statements
- [Compiler] Customize codegen based on dialect (by [Marius Volkhart][MariusV])
- [Gradle Plugin] Add better version catalog support for dialects (#3435)
- [Gradle Plugin] Expose the classpath for SQLDelight tasks
- [Gradle Plugin] Add a gradle task for squashing migrations
- [Gradle Plugin] Add a flag to ignore schema definitions during migration checks
Changed
- [Everything] Package name has changed from com.squareup.sqldelight to app.cash.sqldelight.
- [Runtime] Move migration callbacks into main
migrate
fun - [Runtime] Improve addListener api (#4244 by [Philip Wedemann][hfhbd])
- [Runtime] Use Long as migration version (#4297 by [Philip Wedemann][hfhbd])
- [Runtime] Enforce that synchronous drivers require a synchronous schema initializer (#4013)
- [Runtime] Improve async support for Cursors (#4102)
- [Runtime] Remove deprecated targets (#4149 by [Philip Wedemann][hfhbd])
- [Runtime] Remove support for old MM (#4148 by [Philip Wedemann][hfhbd])
- [Runtime] Remove the AfterVersion type without the driver (#3091)
- [Runtime] Move Schema type to top-level
- [Runtime] Open dialect and resolver to support 3rd party implementations (#3232 by [Philip Wedemann][hfhbd])
- [Runtime] Return the updated row count from the drivers execute method
- [Runtime] Confine SqlCursor to the critical section accessing the connection. (#2123 by [Anders Ha][andersio])
- [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)
- [Async Runtime] Move await* to upper class ExecutableQuery (#3524 by [Philip Wedemann][hfhbd])
- [Compiler] Include the dialect used to compile in failure reports (#3086)
- [Compiler] Skip unused adapters (#3162 by [Eliezer Graber][eygraber])
- [Compiler] Use zero based index in PrepareStatement (#3269 by [Philip Wedemann][hfhbd])
- [Compiler] Clean up generated code a bit
- [Compiler] Forbid usage of table parameters in grouped statements (#1822)
- [Compiler] Put grouped queries inside a transaction (#2785)
- [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][PaulWoitaschek])
- [IDE Plugin] Add an editor banner while SQLDelight is syncing (#2511)
- [IDE Plugin] Minimum supported IntelliJ version is 2021.1
- [Gradle Plugin] Allow registering DriverInitializer for VerifyMigrationTask with ServiceLoader mechanism (#3986 by [Alex Doubov][C2H6O])
- [Gradle Plugin] Create explicit compiler env (#4079 by [Philip Wedemann][hfhbd])
- [Gradle Plugin] Hide Configurations from downstream projects
- [Gradle Plugin] Only shade Intellij (by [Philip Wedemann][hfhbd])
- [Gradle Plugin] Also make the dialect a proper gradle dependency instead of a string (#3085)
- [Gradle Plugin] Gradle Verify Task: Throw when missing database file. (#3126 by [Niklas Baudy][vanniktech])
- [Gradle Plugin] Compare schema definitions for migrations (#841)
Fixed
- [Runtime] Flatten listener list to reduce allocations and pointer chasing. (by [Anders Ha][andersio])
- [Compiler] Fix result expression for grouped statements (#4378)
- [Compiler] Include PRAGMAs from migrations in database create(SqlDriver) (#3845 by [Marius Volkhart][MariusV])
- [Compiler] Fix codegen for RETURNING clause (#3872 by [Marius Volkhart][MariusV])
- [Compiler] Dont generate types for virtual tables (#4015)
- [Compiler] Resolve recursive origin table from pure views (by [Philip Wedemann][hfhbd])
- [Compiler] Use value classes from table foreign key clause (by [Philip Wedemann][hfhbd])
- [Compiler] Fix SelectQueryGenerator to support bind expression without parenthesis (by [Doogie Min][bellatoris])
- [Compiler] Fix duplicate generation of ${name}Indexes variables when using transactions (by [Andreas Sacher][sachera])
- [Compiler] Custom dialect with extension function don't create imports (#3338 by [Philip Wedemann][hfhbd])
- [Compiler] Fix escaping CodeBlock.of("${CodeBlock.toString()}") (#3340 by [Philip Wedemann][hfhbd])
- [Compiler] Await async execute statements in migrations (#3352)
- [Compiler] Fix AS (#3370 by [Philip Wedemann][hfhbd])
- [Compiler]
getObject
method supports automatic filling of the actual type. (#3401 by [Rob X][robx]) - [Compiler] Fix codegen for async grouped returning statements (#3411)
- [Compiler] Infer the Kotlin type of bind parameter, if possible, or fail with a better error message (#3413 by [Philip Wedemann][hfhbd])
- [Compiler] Don't allow ABS("foo") (#3430 by [Philip Wedemann][hfhbd])
- [Compiler] Support inferring kotlin type from other parameters (#3431 by [Philip Wedemann][hfhbd])
- [Compiler] Always create the database implementation (#3540 by [Philip Wedemann][hfhbd])
- [Compiler] Relax javaDoc and add it to custom mapper function too (#3554 [Philip Wedemann][hfhbd])
- [Compiler] Fix DEFAULT in binding (by [Philip Wedemann][hfhbd])
- [Compiler] Ensure updates and deletes with RETURNING statements execute queries. (#3084)
- [Compiler] Correctly infer argument types in compound selects (#3096)
- [Compiler] Common tables do not generate data classes so dont return them (#3097)
- [Compiler] Find the top migration file faster (#3108)
- [Compiler] Properly inherit nullability on the pipe operator
- [Compiler] Support the iif ANSI SQL function
- [Compiler] Don't generate empty query files (#3300 by [Philip Wedemann][hfhbd])
- [Compiler] Fix adapter with question mark only (#3314 by [Philip Wedemann][hfhbd])
- [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;
- [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][aperfilyev])
- [Compiler] Fix packageName for migration adapter (by [Philip Wedemann][hfhbd])
- [Compiler] Emit annotations on properties instead of types (#2798 by [Alexander Perfilyev][aperfilyev])
- [Compiler] Sort arguments before passing to a Query subtype (#2379 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Handle process cancellation during find usages (#4340)
- [IDE Plugin] Fix unresolved kotlin types (#3924 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Fix for expand wildcard intention to work with qualifier (#3979 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Use available jdk if java home is missing (#3925 by [Alexander Perfilyev][aperfilyev])
- [IDE Plugin] Fix find usages on package names (#4010)
- [IDE Plugin] Dont show auto imports for invalid elements (#4008)
- [IDE Plugin] Do not resolve if a dialect is missing (#4009)
- [IDE Plugin] Ignore IDE runs of the compiler during an invalidated state (#4016)
- [IDE Plugin] Add support for IntelliJ 2023.1 (#4037 by [Madis Pink][madisp])
- [IDE Plugin] Rename named argument usage on column r...
Version 2.0.0-rc02 (2023-06-27)
[2.0.0-rc02] - 2023-06-27
Added
- [MySQL Dialect] support lowercase date types and min and max on date types (#4243 by Mike Gershunovsky)
- [MySQL Dialect] support mysql types for binary expr and sum (#4254 by Mike Gershunovsky)
- [MySQL Dialect] support unsigned ints without display width (#4306 by Mike Gershunovsky)
- [MySQL Dialect] Support LOCK IN SHARED MODE
- [PostgreSQL Dialect] Add boolean and Timestamp to min max (#4245 by Griffio)
- [PostgreSQL Dialect] Postgres: Add window function support (#4283 by Philip Wedemann)
- [Runtime] Add linuxArm64, androidNative and watchosDeviceArm targets to runtime (#4258 by Philip Wedemann)
- [Paging Extension] Add linux and mingw x64 target to the paging extension (#4280 by [Cedric Hippmann][chippman])
Changed
- [Gradle Plugin] Add automatic dialect support for Android API 34 (#4251)
- [Paging Extension] Add support for SuspendingTransacter in QueryPagingSource (#4292 by Ilya Polenov)
- [Runtime] Improve addListener api (#4244 by Philip Wedemann)
- [Runtime] Use Long as migration version (#4297 by Philip Wedemann)
Fixed
- [Gradle Plugin] Use stable output path for generated source (#4269 by Josh Friend)
- [Gradle Plugin] Gradle tweaks (#4222 by Matthew Haughton)
Version 2.0.0-rc01 (2023-05-30)
NOTE: IntelliJ plugins now go through an approval process, if you want the latest plugin you can download it below in these release notes.
Added
- [Paging] Add js browser target to paging extensions (#3843 by Sean Proctor)
- [Paging] Add iosSimulatorArm64 target to androidx-paging3 extension (#4117)
- [PostgreSQL Dialect] add support and test for gen_random_uuid() (#3855 by David Wheeler)
- [PostgreSQL Dialect] Alter table add constraint postgres (#4116 by Griffio)
- [PostgreSQL Dialect] Alter table add constraint check (#4120 by Griffio)
- [PostgreSQL Dialect] Add postgreSql character length functions (#4121 by Griffio)
- [PostgreSQL Dialect] Add postgreSql column default interval (#4142 by Griffio)
- [PostgreSQL Dialect] Add postgreSql interval column result (#4152 by Griffio)
- [PostgreSQL Dialect] Add postgreSql Alter Column (#4165 by Griffio)
- [PostgreSQL Dialect] PostgreSQL: Add date_part (#4198 by Philip Wedemann)
- [MySQL Dialect] Add sql char length functions (#4134 by Griffio)
- [IDE Plugin] Add sqldelight directory suggestions (#3976 by Alexander Perfilyev)
- [IDE Plugin] Compact middle packages in project tree (#3992 by Alexander Perfilyev)
- [IDE Plugin] Add join clause completion (#4086 by Alexander Perfilyev)
- [IDE Plugin] Create view intention and live template (#4074 by Alexander Perfilyev)
- [IDE Plugin] Warn about missing WHERE inside DELETE or UPDATE (#4058 by Alexander Perfilyev)
- [Gradle Plugin] Enable typesafe project accessors (#4005 by Philip Wedemann)
Changed
- [Gradle Plugin] Allow registering DriverInitializer for VerifyMigrationTask with ServiceLoader mechanism (#3986 by Alex Doubov)
- [Gradle Plugin] Create explicit compiler env (#4079 by Philip Wedemann)
- [JS Driver] Split web worker driver into separate artifact
- [JS Driver] Don't expose JsWorkerSqlCursor (#3874 by Philip Wedemann)
- [JS Driver] Disable publication of the sqljs driver (#4108)
- [Runtime] Enforce that synchronous drivers require a synchronous schema initializer (#4013)
- [Runtime] Improve async support for Cursors (#4102)
- [Runtime] Remove deprecated targets (#4149 by Philip Wedemann)
- [Runtime] Remove support for old MM (#4148 by Philip Wedemann)
Fixed
- [R2DBC Driver] R2DBC: Await closing the driver (#4139 by Philip Wedemann)
- [Compiler] Include PRAGMAs from migrations in database create(SqlDriver) (#3845 by Marius Volkhart)
- [Compiler] Fix codegen for RETURNING clause (#3872 by Marius Volkhart)
- [Compiler] Dont generate types for virtual tables (#4015)
- [Gradle Plugin] Small Gradle plugin QoL improvements (#3930 by Zac Sweers)
- [IDE Plugin] Fix unresolved kotlin types (#3924 by Alexander Perfilyev)
- [IDE Plugin] Fix for expand wildcard intention to work with qualifier (#3979 by Alexander Perfilyev)
- [IDE Plugin] Use available jdk if java home is missing (#3925 by Alexander Perfilyev)
- [IDE Plugin] Fix find usages on package names (#4010)
- [IDE Plugin] Dont show auto imports for invalid elements (#4008)
- [IDE Plugin] Do not resolve if a dialect is missing (#4009)
- [IDE Plugin] Ignore IDE runs of the compiler during an invalidated state (#4016)
- [IDE Plugin] Add support for IntelliJ 2023.1 (#4037 by Madis Pink)
- [IDE Plugin] Rename named argument usage on column rename (#4027 by Alexander Perfilyev)
- [IDE Plugin] Fix add migration popup (#4105 by Alexander Perfilyev)
- [IDE Plugin] Disable SchemaNeedsMigrationInspection in migration files (#4106 by Alexander Perfilyev)
- [IDE Plugin] Use sql column name for migration generation instead of type name (#4112 by Alexander Perfilyev)
Version 2.0.0-alpha05 (2023-01-20)
Breaking Changes
- This release requires using Java 11 for your gradle builds and Java 8 for the runtime.
- The Gradle plugin now uses Properties and a DomainCollection for the databases, new syntax:
// build.gradle
sqldelight {
databases { // new wrapper
Database {
packageName = "com.sample"
}
}
}
// build.gradle.kts
sqldelight {
databases { // new wrapper
create("Database") {
packageName.set("com.sample") // packageName is now a Property<String>
}
}
}
Added
- [Paging] Multiplatform paging extension (by Jeff Lockhart)
- [Runtime] Add fun modifier to Listener interface.
- [SQLite Dialect] Add SQLite 3.33 support (UPDATE FROM) (by Eliezer Graber))
- [PostgreSQL Dialect] Support UPDATE FROM in postgresql (by Eliezer Graber))
Changed
- [RDBC Driver] Expose the connection (by Philip Wedemann)
- [Runtime] Move migration callbacks into main
migrate
fun - [Gradle Plugin] Hide Configurations from downstream projects
- [Gradle Plugin] Only shade Intellij (by Philip Wedemann)
- [Gradle Plugin] Support Kotlin 1.8.0-Beta and add multi version Kotlin test (by Philip Wedemann)
Fixed
- [RDBC Driver] Use javaObjectType instead (by Philip Wedemann)
- [RDBC Driver] Fix primitive null values in bindStatement (by Philip Wedemann)
- [RDBC Driver] Support R2DBC 1.0 (by Philip Wedemann)
- [PostgreSQL Dialect] Postgres: Fix Array without type parameter (by Philip Wedemann)
- [IDE Plugin] Bump intellij to 221.6008.13 (by Philip Wedemann)
- [Compiler] Resolve recursive origin table from pure views (by Philip Wedemann)
- [Compiler] Use value classes from table foreign key clause (by Philip Wedemann)
- [Compiler] Fix SelectQueryGenerator to support bind expression without parenthesis (by Doogie Min)
- [Compiler] Fix duplicate generation of ${name}Indexes variables when using transactions (by Andreas Sacher)
Version 1.5.5 (2023-01-20)
This is a compatibility release for Kotlin 1.8 and IntelliJ 2021+, supporting JDK 17.
Version 1.5.4 (2022-10-06)
This is a compatibility update for Kotlin 1.7.20 and AGP 7.3.0
Version 2.0.0-alpha04 (2022-10-03)
Breaking Changes
- The Paging 3 extension API has changed to only allow int types for the count.
- The coroutines extension now requires a dispatcher to be passed in instead of defaulting.
Added
- [HSQL Dialect] Hsql: Support using DEFAULT for generated columns in Insert (#3372 by Philip Wedemann)
- [PostgreSQL Dialect] PostgreSQL: Support using DEFAULT for generated columns in INSERT (#3373 by Philip Wedemann)
- [PostgreSQL Dialect] Add NOW() to PostgreSQL (#3403 by Philip Wedemann)
- [PostgreSQL Dialect] PostgreSQL Add NOT operator (#3504 by Philip Wedemann)
- [Paging] Allow passing in CoroutineContext to *QueryPagingSource (#3384)
- [Gradle Plugin] Add better version catalog support for dialects (#3435)
- [Native Driver] Add callback to hook into DatabaseConfiguration creation of NativeSqliteDriver (#3512 by Sven Jacobs)
Changed
- [Paging] Add a default dispatcher to the KeyedQueryPagingSource backed QueryPagingSource function (#3385)
- [Paging] Make OffsetQueryPagingSource only work with Int (#3386)
- [Async Runtime] Move await* to upper class ExecutableQuery (#3524 by Philip Wedemann)
- [Coroutines Extensions] Remove default params to flow extensions (#3489)
Fixed
- [Gradle Plugin] Update to Kotlin 1.7.20 (#3542 by Zac Sweers)
- [R2DBC Driver] Adopt R2DBC changes which do not always send a value (#3525 by Philip Wedemann)
- [HSQL Dialect] Fix failing sqlite VerifyMigrationTask with Hsql (#3380 by Philip Wedemann)
- [Gradle Plugin] Convert tasks to use lazy configuration API (by Matthew Haughton)
- [Gradle Plugin] Avoid NPEs in Kotlin 1.7.20 (#3398 by Zac Sweers)
- [Gradle Plugin] Fix description of squash migrations task (#3449)
- [IDE Plugin] Fix NoSuchFieldError in newer Kotlin plugins (#3422 by Madis Pink)
- [IDE Plugin] IDEA: UnusedQueryInspection - fix ArrayIndexOutOfBoundsException. (#3427 by Niklas Baudy)
- [IDE Plugin] Use reflection for old kotlin plugin references
- [Compiler] Custom dialect with extension function don't create imports (#3338 by Philip Wedemann)
- [Compiler] Fix escaping CodeBlock.of("${CodeBlock.toString()}") (#3340 by Philip Wedemann)
- [Compiler] Await async execute statements in migrations (#3352)
- [Compiler] Fix AS (#3370 by Philip Wedemann)
- [Compiler]
getObject
method supports automatic filling of the actual type. (#3401 by Rob X) - [Compiler] Fix codegen for async grouped returning statements (#3411)
- [Compiler] Infer the Kotlin type of bind parameter, if possible, or fail with a better error message (#3413 by Philip Wedemann)
- [Compiler] Don't allow ABS("foo") (#3430 by Philip Wedemann)
- [Compiler] Support inferring kotlin type from other parameters (#3431 by Philip Wedemann)
- [Compiler] Always create the database implementation (#3540 by Philip Wedemann)
- [Compiler] Relax javaDoc and add it to custom mapper function too (#3554 Philip Wedemann)
- [Compiler] Fix DEFAULT in binding (by Philip Wedemann)
- [Paging] Fix Paging 3 (#3396)
- [Paging] Allow construction of OffsetQueryPagingSource with Long (#3409)
- [Paging] Don't statically swap Dispatchers.Main (#3428)
Version 2.0.0-alpha03 (2022-06-17)
Breaking Changes
- Dialects are now references like actual gradle dependencies.
sqldelight {
MyDatabase {
dialect("app.cash.sqldelight:postgres-dialect:2.0.0-alpha03")
}
}
- The
AfterVersionWithDriver
type was removed in favour ofAfterVersion
which now always has the driver. - The
Schema
type is no longer a subtype ofSqlDriver
PreparedStatement
APIs are now called with zero-based indexes.
Added
- [IDE Plugin] Added support for running SQLite, MySQL, and PostgreSQL commands against a running database (#2718 by Alexander Perfilyev)
- [IDE Plugin] Add support for the android studio DB inspector (#3107 by Alexander Perfilyev)
- [Runtime] Add support for async drivers (#3168 by Derek Ellis)
- [Native Driver] Support new kotlin native memory model (#3177 by Kevin Galligan)
- [JS Driver] Add a driver for SqlJs workers (#3203 by Derek Ellis)
- [Gradle Plugin] Expose the classpath for SQLDelight tasks
- [Gradle Plugin] Add a gradle task for squashing migrations
- [Gradle Plugin] Add a flag to ignore schema definitions during migration checks
- [MySQL Dialect] Support FOR SHARE and FOR UPDATE in MySQL (#3098)
- [MySQL Dialect] Support MySQL index hints (#3099)
- [PostgreSQL Dialect] Add date_trunc (#3295 by Philip Wedemann)
- [JSON Extensions] Support JSON table functions (#3090)
Changed
- [Runtime] Remove the AfterVersion type without the driver (#3091)
- [Runtime] Move Schema type to top-level
- [Runtime] Open dialect and resolver to support 3rd party implementations (#3232 by Philip Wedemann)
- [Compiler] Include the dialect used to compile in failure reports (#3086)
- [Compiler] Skip unused adapters (#3162 by Eliezer Graber)
- [Compiler] Use zero based index in PrepareStatement (#3269 by Philip Wedemann)
- [Gradle Plugin] Also make the dialect a proper gradle dependency instead of a string (#3085)
- [Gradle Plugin] Gradle Verify Task: Throw when missing database file. (#3126 by Niklas Baudy)
Fixed
- [Gradle Plugin] Minor cleanups and tweaks to the Gradle plugin (#3171 by Matthew Haughton)
- [Gradle Plugin] Dont use an AGP string for the generated directory
- [Gradle Plugin] Use AGP namespace attribute (#3220)
- [Gradle Plugin] Do not add kotlin-stdlib as a runtime dependency of the Gradle plugin (#3245 by [Martin Bonnin][mbonnin])
- [Gradle Plugin] Simplify the multiplatform configuration (#3246 by [Martin Bonnin][mbonnin])
- [Gradle Plugin] Support js only projects (#3310 by Philip Wedemann)
- [IDE Plugin] Use java home for gradle tooling API (#3078)
- [IDE Plugin] Load the JDBC driver on the correct classLoader inside the IDE plugin (#3080)
- [IDE Plugin] Mark the file element as null before invalidating to avoid errors during already existing PSI changes (#3082)
- [IDE Plugin] Dont crash finding usages of the new table name in an ALTER TABLE statement (#3106)
- [IDE Plugin] Optimize the inspectors and enable them to fail silently for expected exception types (#3121)
- [IDE Plugin] Delete files that should be generated directories (#3198)
- [IDE Plugin] Fix a not-safe operator call
- [Compiler] Ensure updates and deletes with RETURNING statements execute queries. (#3084)
- [Compiler] Correctly infer argument types in compound selects (#3096)
- [Compiler] Common tables do not generate data classes so dont return them (#3097)
- [Compiler] Find the top migration file faster (#3108)
- [Compiler] Properly inherit nullability on the pipe operator
- [Compiler] Support the iif ANSI SQL function
- [Compiler] Don't generate empty query files (#3300 by Philip Wedemann)
- [Compiler] Fix adapter with question mark only (#3314 by Philip Wedemann)
- [PostgreSQL Dialect] Postgres primary key columns are always non-null (#3092)
- [PostgreSQL Dialect] Fix copy with same name in multiple tables (#3297 by Philip Wedemann)
- [SQLite 3.35 Dialect] Only show an error when dropping an indexed column from the altered table (#3158 by Eliezer Graber)