8000 Releases · simolus3/drift · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: simolus3/drift

Drift 2.27.0

14 Jun 13:32
drift-2.27.0
b38b272
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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.

Drift 2.23.0

27 Dec 17:03
drift-2.23.0
e7c49e5
Compare
Choose a tag to compare

This drift release contains smaller fixes and new features:

Core query builder:

  • Allow building compound select statements in Dart.
  • Support NULLS FIRST and NULLS LAST in manager API.

Generator and command line tools:

  • Fix custom companion names on @DataClassName not being recognized.
  • Improve schema exports to resolve default values instead of embedding their source.
  • Update dependencies to support latest dart_style version.
  • Fix generating dialect-specific code when only a single dialect (that isn't sqlite3) is enabled.

Drift 2.22.0

28 Nov 20:35
drift-2.22.0
b5660f6
Compare
Choose a tag to compare

Core drift package:

  • Add sqliteAny() method to tables to declare ANY columns.
  • Add missing parentheses around adjacent express 8000 ions of the same precedence.
  • Fix creating tables that are both STRICT and WITHOUT ROWID.
  • WASM: Report worker failures to make them easier to diagnose.
  • Allow closing stream queries synchronously, making drift easier to use in widget tests.

Generator improvements

  • Add support for the dbstat module.
  • Prioritize null propagation in type resolver, leading to more accurate analysis on which columns are nullable.
  • CLI options dealing with schemas now support views defined in Dart (#3285).
  • Pass language version to dart formatter when generating code.
  • Deprecate package:drift_dev/api/migrations.dart in favor of package:drift_dev/api/migrations_native.dart.
  • Support runtime schema verification on the web.
  • Fix generated code missing question marks for nullable types in some instances.
  • Add (opt-in) row_class_constructor_all_required builder option.
  • Support the dbstat table in drift-file queries when enabling the dbstat module.
  • Fix make-migrations using invalid import URIs in generated test on Windows.

drift_flutter 0.2.2

  • Fix infinite loop in isolate server lookups when using shareAcrossIsolates
    across hot restarts.

Drift 2.21.0

14 Oct 21:54
drift-2.21.0
3c11432
Compare
Choose a tag to compare

Versions 2.21.0 of drift and drift_dev as well as version 0.2.1 of drift_flutter have just been released:

Core changes

  • View.from is now declared to return a JoinedSelectStatement, the type it returns at runtime.
  • The manager APIs now support computed fields, allowing advanced SQL expressions to be embedded into simple manager queries.

Isolate improvements

  • To infer whether serialization is required for inter-isolate communication, drift now sends a test message instead of serializing by default.
  • drift_flutter: Enable serialization between background isolates where necessary.

Tooling and generator

  • The DevTools extension can now clear drift databases.
  • Fix Dart-defined check constraints not being considered in exported schemas.
  • Columns can now be defined with late final fields. Defining columns with getters => is still supported too.
    class MyTable extends Table {
      // Before:
      IntColumn get id => integer().autoIncrement()();
    
      // After:
      late final id = integer().nullable()();
    }
  • Make build.yaml definitions pass build_runner doctor.
  • Fix generate_manager option not consistently being applied to modular builds.
  • Add the make-migrations command which combines the existing schema commands into a single tool.

Drift 2.20.3

29 Sep 12:09
drift-2.20.3
f38c539
Compare
Choose a tag to compare

This patch release fixes a deadlock that could occur when using concurrent nested transactions, a problem introduced in the 2.20.0 release (#3244). Note that drift_worker.js bundles from drift version 2.20.0 until 2.20.2 also have the issue and need to be updated to apply the fix.

0