drift3_preview 3.0.0-alpha.1
drift3_preview: ^3.0.0-alpha.1 copied to clipboard
In-development preview of breaking changes planned for drift version 3.
3.0.0-alpha.1 #
Changes from drift versions 2.x:
- Breaking change: Rework connection APIs.
- The
QueryExecutorclass has been removed. UseDriftSessioninstead. DatabaseConnectionhas been renamed toDriftConnectionand is always opened lazily now.NativeDatabasehas been removed, usesqliteConnectionPoolfrompackage:drift_sqlite/native.dart.WasmDatabaseis now part ofpackage:drift_sqlite/wasm.dartand requires a new worker.
- The
- Breaking change: On expressions,
isBiggerThanhas been renamed toisGreaterThan;isSmallerThantoisLessThan. - Breaking change: Top-level join methods (
innerJoinand others) are now named constructors on aJoinclass. - Breaking change:
Constanthas been renamed toLiteral. - Breaking change: Remove
DatabaseConnectionUser.customSelectQuery. - Breaking change: SQLite-specific constructs are now exposed through
package:drift_sqlite:- The
storeDateTimesAsTextoption is now enabled by default. - The
InsertModeparameter is now available as a.mode()extension onInsertStatement.
- The
- Breaking change: Make tables
STRICTby default. This can be reverted with drift options inbuild.yaml. - Breaking change: Drift manager APIs are now part of the
drift_managerpackage, and no longer generated by default. - Add json columns as a builtin type. THey use a binary format by default, this can be changed to text.
- In Dart table definitions, the trailing
()for columns is no longer required.