Releases: simolus3/drift
Releases · simolus3/drift
Drift 2.32.1
- DevTools extension: Make error messages selectable.
- For view columns referencing table columns as an alias, we now copy nullability and type converters from the source column (#3765).
- Fix parsing
references()with analyzer 10.2.0 and later. - Support analyzer versions
>=10.0.0 <13.0.0.
Drift 2.32.0
- Potentially breaking change Migrate to version 3.x of the
sqlite3package.
To upgrade:- For the web, update
sqlite3.wasmfrom a 3.x release. - If you've previously used
sqlcipher_flutter_libs, see this for encryption support and note that SQLite3MultipleCiphers requires additional pragmas to be compatible with SQLCipher databases.
- For the web, update
serializableConnection(),json1andTableMigrationare no longer marked as experimental.- Improve performance of mapping large result sets through joined select statements.
- In drift files, imports and statements can now be parsed from SQL line comments. This makes drift files easier to use from some SQL editors:
-- import 'tables.drift';
-- deleteById:
DELETE FROM todos WHERE id = :id;
-- allTodos:
SELECT * FROM todos;Drift 2.31.0
- In step-by-step migrations, automatically throw an error if a database downgrade is attempted. This has always been unsupported, but could lead to the database silently having a wrong
user_version. - Fix JSON serialization for views referencing a nullable wrapper of a non-nullable column with a type converter attached to it.
sqlparser version 0.43.1
- Support parsing
DROP,VACUUM,REINDEX,ATTACH,DETACH,SAVEPOINT,RELEASE,ROLLBACK,ANALYZE,PRAGMAandALTER TABLEstatements. - Add
SchemaBufferclass to applyALTER TABLEandDROPstatements toCREATEstatements.
Drift 2.30.1
drift 2.30.1
- Web: Fix databases being moved from IndexedDB to OPFS even if
moveExistingIndexedDbToOpfsis disabled.
drift_dev 2.30.1
make_migrations: Don't generate schema test helpers when--no-testis set.- Generate managers entrypoint for
@DriftAccessors as well. - Add
ValidationOptionsparameter totestWithDataIntegrity.
sqlparser 0.43.0
- Allow parsing SQL from
FileSpans, which is convenient for SQL embedded as text in outer structures.
Drift 2.30.0
Drift
- Add
rightOuterJoinandfullOuterJoin. - Wasm: Add the
WasmProbeResult.moveFromIndexedDBToOpfs()method and themoveExistingIndexedDbToOpfsparameter onWasmDatabase.open. They can be used to move an existing database stored in IndexedDB to OPFS.
drift_flutter
- Add
isolateSetupparameter toDriftNativeOptionsto setup isolates spawned to host database connections.
Generator
- Schema export: Always export generated SQL statements as a reference.
- Schema export: Always use temporary file instead of data URI.
- Support analyzer versions 9.x.
- Support dothand syntax when analyzing Dart sources.
- Analysis: Support features added in SQLite version 3.51.0
Drift 2.29.0
Query builder
- Allow specifying ordering for columns in
@TableIndexannotation. - Add
DelegatedDatabase.externalExecutor, allowing transactions started externally to be used with drift. - Add
Batch.insertFromSelectto insert rows from a select statement in a batch.
Generator
- Fix invalid schema code for views.
- Add the
known_tablesoption. 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-testoption to disable generating tests. - Internal: The drift website is now built with
jaspr_content.
Drift 2.28.2
drift version 2.28.2:
- Legacy wasm database: Fix cast issue when compiling with
dart2wasm. NativeDatabase.createBackground: Allow enablingisolateDebugLog.
drift_flutter version 0.2.7:
- Add
isolateDebugLogparameter toDriftNativeOptionsto 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
- Add
escapeCharargument tolike()to generate anESCAPEclause. - Native database: Cache prepared statements by default.
- Support
package:buildversion 3.
Drift 2.28.0
drift
- Query delegates: Support nested transactions in
SupportedTransactionDelegate. - Add
WasmProbeResult.exportDatabaseto export an existing web database as aUint8List. - 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
- Allow passing
sqlite3callback toNativeDatabaseto customize how SQLite bindings are obtained. - Fix generating versioned schema code for columns referencing other columns in
generatedAsexpressions. - Use proper impport statements when generating schema code.
- Schema validation: Allow ignoring column constraints.
- Devtools extension: Update displayed data automatically when it changes.