Skip to content

Releases: simolus3/drift

Drift 2.29.0

18 Oct 13:34
drift-2.29.0
149909a

Choose a tag to compare

Query builder

  • Allow specifying ordering for columns in @TableIndex annotation.
  • Add DelegatedDatabase.externalExecutor, allowing transactions started externally to be used with drift.
  • Add Batch.insertFromSelect to insert rows from a select statement in a batch.

Generator

  • Fix invalid schema code for views.
  • Add the known_tables option. It allows defining external tables assumed to be available without including them in the drift-managed schema.
  • Fix unresolved references in CTEs resolving against the scope of the main query.
  • Static analysis support for the PowerSync SQLite extension.

Tools

  • Devtools extension: Support exporting databases.
  • Make-migrations: Add --no-test option to disable generating tests.
  • Internal: The drift website is now built with jaspr_content.

Drift 2.28.2

21 Sep 22:01
drift-2.28.2
b4e8c77

Choose a tag to compare

drift version 2.28.2:

  • Legacy wasm database: Fix cast issue when compiling with dart2wasm.
  • NativeDatabase.createBackground: Allow enabling isolateDebugLog.

drift_flutter version 0.2.7:

  • Add isolateDebugLog parameter to DriftNativeOptions to debug internal messages between isolates.

drift_dev version 2.28.3:

  • Remove dependencies on discontinued build packages.
  • Fix false-positive warnings about imported files not being referenced.

Drift 2.28.1

29 Jul 19:14
drift-2.28.1
7cb1a69

Choose a tag to compare

  • Add escapeChar argument to like() to generate an ESCAPE clause.
  • Native database: Cache prepared statements by default.
  • Support package:build version 3.

Drift 2.28.0

13 Jul 15:16
drift-2.28.0
8d7c8d3

Choose a tag to compare

drift

  • Query delegates: Support nested transactions in SupportedTransactionDelegate.
  • Add WasmProbeResult.exportDatabase to export an existing web database as a Uint8List.
  • Fix drift server isolates leaking when their only client isolate exits without closing the database.

drift_dev

  • Include preamble from drift build options in generated schema code.
  • Fix generated code not copying function expressions correctly.

sqlparser

  • Support new features introduced in SQLite version 3.50.0.

Drift 2.27.0

14 Jun 13:32
drift-2.27.0
b38b272

Choose a tag to compare

  • Allow passing sqlite3 callback to NativeDatabase to customize how SQLite bindings are obtained.
  • Fix generating versioned schema code for columns referencing other columns in generatedAs expressions.
  • Use proper impport statements when generating schema code.
  • Schema validation: Allow ignoring column constraints.
  • Devtools extension: Update displayed data automatically when it changes.

Drift 2.26.1

03 May 16:30
drift-2.26.1
cc7f29a

Choose a tag to compare

This patch release mainly fixes issues in drift_dev:

  • Avoid the use of the shared database cache in the SchemaVerifier implementation.
  • Fix crash when drift_dev schema dump is used on SQLite databases with triggers, views or indexes.
  • CLI: Don't exit with code 0 when no command was selected.
  • Fix generatedAs not being generated for versioned schema imports.

And adds two minor API additions to drift:

  • Add isNotNull() column filter for the manager APIs.
  • Add optional orderBy parameter to more aggregate function extension.

Drift 2.26.0

08 Mar 11:01
drift-2.26.0
7295a3a

Choose a tag to compare

This release adds support for window functions in the Dart query builder (through WindowFunctionExpression) and contains improvements to the generator:

  • Fix warning on Dart-defined views referencing the same table multiple times.
  • Don't generate unnecessary verification code.
  • Suggest a test with data integrity when adding a new column without a default
    value in make-migrations.

Drift 2.25.0

08 Feb 14:53
drift-2.25.0
ab00523

Choose a tag to compare

Core drift package:

  • Report SqliteExceptions occurring on workers as SqliteException instances. Previously, they were sent as strings only.
  • Fix LazyDatabase being closed without ever being used potentially leaking resources.

In the generator:

  • Fix incorrect code when applying non-nullable type converters with a nullable JSON type to nullable column.
  • Fix missing outputs for drift files only consisting of imports in modular generation mode.
  • Allow generating manager references across different files in modular generation mode.
  • Fix class names with dollar signs not being escaped in drift-generated toString().
  • Make-migrations command: Use flutter_test if the core test package is unavailable and warn when database class needs changes for test.

Drift 2.24.0

21 Jan 22:17
drift-2.24.0
ef28c48

Choose a tag to compare

This version improves jsonb support and adds other minor improvements:

  • Add TypeConverter.jsonb to directly store values in the JSONB format used by SQLite.
  • Deprecate TypeConverter.json utility in favor of TypeConverter.json2. The new method avoids encoding values twice when mapping drift row classes to JSON. The documentation
  • Add runWithInterceptor method to databases to only apply interceptors in a restricted block.

In the generator, we:

  • Support versions 7.x of the analyzer package.
  • Add analysis support for SQLite 3.48.
  • Fix nullability analysis around fts5 tables (enabled when raising the version to 3.48 to preserve backwards-compatibility).

Drift 2.23.1

05 Jan 15:45
drift-2.23.1
53ce1f6

Choose a tag to compare

This patch release fixes the following issues:

  • Fix TableStatements.insertAll to only apply a database-specific pragma for SQLite databases.
  • Don't attempt to roll-back transactions that failed to begin.
  • Fix unhandled exception when cancelling transactions.
  • Fix deadlock when drift databases are used in a fake_async Zone and then closed outside that zone.

Also, drift_dev version 2.23.1 contains one improvement:

  • Generate typed reference-resolving queries through the manager API when modular code-generation is enabled. Previously, this feature was only enabled for monolithic generation modes.