mirror of https://github.com/AMT-Cheif/drift.git
Support cancellations in moor_flutter
This commit is contained in:
parent
cc93fa8238
commit
12ab64a33e
|
@ -37,6 +37,7 @@ class _SqfliteDelegate extends DatabaseDelegate with _SqfliteExecutor {
|
|||
});
|
||||
|
||||
DbVersionDelegate? _delegate;
|
||||
|
||||
@override
|
||||
DbVersionDelegate get versionDelegate {
|
||||
return _delegate ??= _SqfliteVersionDelegate(db);
|
||||
|
@ -219,4 +220,11 @@ class EncryptedExecutor extends DelegatedDatabase {
|
|||
final sqfliteDelegate = delegate as _SqfliteDelegate;
|
||||
return sqfliteDelegate.isOpen ? sqfliteDelegate.db : null;
|
||||
}
|
||||
|
||||
@override
|
||||
// We're not really required to be sequential since sqflite has an internal
|
||||
// lock to bring statements into a sequential order.
|
||||
// Setting isSequential here helps with moor cancellations in stream queries
|
||||
// though.
|
||||
bool get isSequential => true;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 4.1.0-dev
|
||||
|
||||
- Support query cancellations introduced in moor 4.3.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
- Support moor version 4
|
||||
|
|
|
@ -206,4 +206,11 @@ class FlutterQueryExecutor extends DelegatedDatabase {
|
|||
final sqfliteDelegate = delegate as _SqfliteDelegate;
|
||||
return sqfliteDelegate.isOpen ? sqfliteDelegate.db : null;
|
||||
}
|
||||
|
||||
@override
|
||||
// We're not really required to be sequential since sqflite has an internal
|
||||
// lock to bring statements into a sequential order.
|
||||
// Setting isSequential here helps with moor cancellations in stream queries
|
||||
// though.
|
||||
bool get isSequential => true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: moor_flutter
|
||||
description: Flutter implementation of moor, a safe and reactive persistence library for Dart applications
|
||||
version: 4.0.0
|
||||
version: 4.1.0-dev
|
||||
repository: https://github.com/simolus3/moor
|
||||
homepage: https://moor.simonbinder.eu/
|
||||
issue_tracker: https://github.com/simolus3/moor/issues
|
||||
|
|
Loading…
Reference in New Issue