Skip to content

Drift 2.11.0

Compare
Choose a tag to compare
@simolus3 simolus3 released this 11 Aug 13:59
· 898 commits to develop since this release
drift-2.11.0
f857cb1

This release adds new features to the Dart query builder API:

  • Add support for subqueries in the Dart query builder.
  • Add isInExp and isNotInExp to construct IS IN expressions with arbitrary expressions.
  • Add the substr extension on Expression<String> to call the sqlite3 function from the Dart API.

Other new additions to drift:

  • Add isolateSetup to NativeDatabase.createInBackground() to override native libraries or perform other database-unrelated setup work.
  • Add WasmDatabase.probe(), a method probing for available implementations and existing databases on the web without opening one directly.

drift_dev has also seen some optimizations in how it generates query code, which enables new features:

  • Nested result columns in drift files can now refer to any result set (e.g. a table-valued function or a subquery). They were restricted to direct table references before.
  • Add the dialects builder option to generate code supporting multiple SQL dialects.
  • Add the preamble option for non-shared or modular build setups to mirror the preamble option from source_gen:combining_builder.