sqldelight v1.5.1 Release Notes

Release Date: 2021-07-16 // 3 months ago
  • โž• Added

    • [PostgreSQL Dialect] PostgreSQL JSONB and ON Conflict Do Nothing (by [Andrew Stewart][satook])
    • โšก๏ธ [PostgreSQL Dialect] Adds support for PostgreSQL ON CONFLICT (column, ...) DO UPDATE (by [Andrew Stewart][satook])
    • ๐Ÿ‘ [MySQL Dialect] Support MySQL generated columns (by [Jeff Gulbronson][JeffG])
    • ๐Ÿ‘ [Native Driver] Add watchosX64 support
    • ๐Ÿ”Œ [IDE Plugin] Add parameter types and annotations (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add action to generate 'select all' query (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Show column types in autocomplete (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add icons to autocomplete (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add action to generate 'select by primary key' query (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add action to generate 'insert into' query (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add highlighting for column names, stmt identifiers, function names (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add remaining query generation actions (#489 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Show parameter hints from insert-stmt (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Table alias intention action (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Qualify column name intention (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Go to declaration for kotlin property (by [Alexander Perfilyev][aperfilyev])

    ๐Ÿ”„ Changed

    • ๐ŸŽ [Native Driver] Improve native transaction performance by avoiding freezing and shareable data structures when possible (by [Anders Ha][andersio])
    • [Paging 3] Bump Paging3 version to 3.0.0 stable
    • โฌ†๏ธ [JS Driver] Upgrade sql.js to 1.5.0

    ๐Ÿ›  Fixed

    • [JDBC SQLite Driver] Call close() on connection before clearing the ThreadLocal (#2444 by [Hannes StruรŸ][hannesstruss])
    • [RX extensions] Fix subscription / disposal race leak (#2403 by [Pierre Yves Ricau][pyricau])
    • [Coroutines extension] Ensure we register query listener before notifying
    • [Compiler] Sort notifyQueries to have consistent kotlin output file (by [Jiayu Chen][thomascjy])
    • [Compiler] Don't annotate select query class properties with @JvmField (by [Eliezer Graber][eygraber])
    • โšก๏ธ [IDE Plugin] Fix import optimizer (#2350 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Fix unused column inspection (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add nested classes support to import inspection and class annotator (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Fix npe in CopyPasteProcessor (#2363 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Fix crash in InlayParameterHintsProvider (#2359 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Fix insertion of blank lines when copy-pasting any text into create table stmt (#2431 by [Alexander Perfilyev][aperfilyev])

Previous changes from v1.5.0

  • โž• Added

    • [SQLite Javascript Driver] Enable sqljs-driver publication (#1667 by [Derek Ellis][dellisd])
    • [Paging3 Extension] Extension for Android Paging 3 Library (#1786 by [Kevin Cianfarini][kevincianfarini])
    • โšก๏ธ [MySQL Dialect] Adds support for mysql's ON DUPLICATE KEY UPDATE conflict resolution. (by [Ryan Harter][rharter])
    • ๐Ÿ‘ [SQLite Dialect] Add compiler support for SQLite offsets() (by [Quinton Roberts][qjroberts])
    • ๐Ÿ”Œ [IDE Plugin] Add import quick fix for unknown type (#683 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add unused import inspection (#1161 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add unused query inspection (by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Add unused column inspection (#569 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Automatically bring imports on copy/paste (#684 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Pop a balloon when there are incompatibilities between gradle/intellij plugin versions
    • ๐Ÿ”Œ [IDE Plugin] Insert Into ... VALUES(?) parameter hints (#506 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] Inline parameter hints (by [Alexander Perfilyev][aperfilyev])
    • [Runtime] Include an API in the runtime for running migrations with callbacks (#1844)

    ๐Ÿ”„ Changed

    • [Compiler] Smart cast "IS NOT NULL" queries (#867)
    • [Compiler] Protect against keywords that will fail at runtime (#1471, #1629)
    • ๐Ÿ”Œ [Gradle Plugin] Reduce size of gradle plugin from 60mb -> 13mb.
    • ๐Ÿšš [Gradle Plugin] Properly support android variants, and remove support for KMM target-specific sql (#1039)
    • ๐Ÿ”Œ [Gradle Plugin] Pick a minimum sqlite version based on minsdk (#1684)
    • ๐ŸŽ [Native Driver] Native driver connection pool and performance updates

    ๐Ÿ›  Fixed

    • [Compiler] NBSP before lambdas (by [Benoรฎt Quenaudon][oldergod])
    • [Compiler] Fix incompatible types in generated bind* and cursor.get* statements
    • [Compiler] SQL clause should persist adapted type (#2067)
    • [Compiler] Column with only NULL keyword should be nullable
    • [Compiler] Dont generate mapper lambda with type annotations (#1957)
    • ๐Ÿ“ฆ [Compiler] If custom queries would clash, use the file name as an additional package suffix (#1057, #1278)
    • [Compiler] Ensure foreign key cascades cause query listeners to be notified (#1325, #1485)
    • [Compiler] If unioning two of the same type, return the table type (#1342)
    • [Compiler] Ensure params to ifnull and coalesce can be nullable (#1263)
    • [Compiler] Correctly use query-imposed nullability for expressions
    • ๐Ÿ‘ [MySQL Dialect] Support MySQL if statements
    • [PostgreSQL Dialect] Retrieve NUMERIC and DECIMAL as Double in PostgreSQL (#2118)
    • โšก๏ธ [SQLite Dialect] UPSERT notifications should account for BEFORE/AFTER UPDATE triggers. (#2198 by [Anders Ha][andersio])
    • [SQLite Driver] Use multiple connections for threads in the SqliteDriver unless we are in memory (#1832)
    • [JDBC Driver] JDBC Driver assumes autoCommit is true (#2041)
    • ๐Ÿ‘ป [JDBC Driver] Ensure that we close connections on exception (#2306)
    • ๐Ÿ [IDE Plugin] Fix GoToDeclaration/FindUsages being broken on Windows due to path separator bug (#2054 by [Angus Holder][AngusH])
    • ๐Ÿ”Œ [IDE Plugin] Ignore gradle errors instead of crashing in the IDE.
    • ๐Ÿšš [IDE Plugin] If a sqldelight file is moved to a non-sqldelight module, do not attempt codegen
    • ๐Ÿ”Œ [IDE Plugin] Ignore codegen errors in IDE
    • ๐Ÿ”Œ [IDE Plugin] Ensure that we dont try to negatively substring (#2068)
    • ๐Ÿ”Œ [IDE Plugin] Also ensure project is not disposed before running gradle action (#2155)
    • ๐Ÿ”Œ [IDE Plugin] Arithmetic on nullable types should also be nullable (#1853)
    • ๐Ÿ”Œ [IDE Plugin] Make 'expand * intention' work with additional projections (#2173 by [Alexander Perfilyev][aperfilyev])
    • ๐Ÿ”Œ [IDE Plugin] If kotlin resolution fails during GoTo, dont attempt to go to sqldelight files
    • ๐Ÿ”Œ [IDE Plugin] If IntelliJ encounters an exception while sqldelight is indexing, dont crash
    • ๐Ÿ”Œ [IDE Plugin] Handle exceptions that happen while detecting errors before codegen in the IDE
    • ๐Ÿ”Œ [IDE Plugin] Make the IDE plugin compatible with Dynamic Plugins (#1536)
    • ๐Ÿ”Œ [Gradle Plugin] Race condition generating a database using WorkerApi (#2062 by [Stรฉphane Nicolas][stephanenicolas])
    • ๐Ÿ”Œ [Gradle Plugin] classLoaderIsolation prevents custom jdbc usage (#2048 by [Ben Asher][BenA])
    • ๐Ÿ“ฆ [Gradle Plugin] Improve missing packageName error message (by [Niklas Baudy][vanniktech])
    • ๐Ÿ— [Gradle Plugin] SQLDelight bleeds IntelliJ dependencies onto buildscript class path (#1998)
    • ๐Ÿ— [Gradle Plugin] Fix gradle build caching (#2075)
    • ๐Ÿ”Œ [Gradle Plugin] Do not depend on kotlin-native-utils in Gradle plugin (by [Ilya Matveev][ilmat192])
    • ๐Ÿ”Œ [Gradle Plugin] Also write the database if there are only migration files (#2094)
    • ๐Ÿ”Œ [Gradle Plugin] Ensure diamond dependencies only get picked up once in the final compilation unit (#1455)

    ๐Ÿš€ Also just a general shoutout to [Matthew Haughton][3flex] who did a lot of work to improve the SQLDelight infrastructure this release.