mirror of https://github.com/AMT-Cheif/drift.git
moor_flutter: Fix runCustom not using variables
This commit is contained in:
parent
57fa1d50c6
commit
341d03c8f2
|
@ -32,4 +32,16 @@ void crudTests(TestExecutor executor) {
|
|||
|
||||
expect(result.map((u) => u.name), ['Dash', 'Duke', 'Go Gopher']);
|
||||
});
|
||||
|
||||
test('runCustom with args', () async {
|
||||
// https://github.com/simolus3/moor/issues/406
|
||||
final db = Database(executor.createExecutor());
|
||||
|
||||
// ignore: invalid_use_of_visible_for_testing_member, invalid_use_of_protected_member
|
||||
await db.customStatement(
|
||||
'INSERT INTO friendships (first_user, second_user) VALUES (?, ?)',
|
||||
<int>[1, 2]);
|
||||
|
||||
expect(await db.friendsOf(1), isNotEmpty);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 2.1.1
|
||||
|
||||
- Fix `runCustom` not using the provided variables ([#406](https://github.com/simolus3/moor/issues/406))
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- Expose the underlying database from sqflite in `FlutterQueryExecutor`.
|
||||
|
|
|
@ -126,7 +126,7 @@ mixin _SqfliteExecutor on QueryDelegate {
|
|||
|
||||
@override
|
||||
Future<void> runCustom(String statement, List args) {
|
||||
return db.execute(statement);
|
||||
return db.execute(statement, args);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1,13 +1,27 @@
|
|||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.11"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
version: "2.4.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -36,6 +50,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
@ -46,27 +67,34 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.5"
|
||||
version: "0.12.6"
|
||||
meta:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.7"
|
||||
version: "1.1.8"
|
||||
moor:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../moor"
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.0.1"
|
||||
version: "2.4.0"
|
||||
path:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -81,6 +109,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0+1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -148,7 +183,7 @@ packages:
|
|||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.5"
|
||||
version: "0.2.11"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -163,6 +198,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.8"
|
||||
xml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.5.0"
|
||||
sdks:
|
||||
dart: ">=2.2.2 <3.0.0"
|
||||
dart: ">=2.4.0 <3.0.0"
|
||||
flutter: ">=1.2.1 <2.0.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: moor_flutter
|
||||
description: Flutter implementation of moor, a safe and reactive persistence library for Dart applications
|
||||
version: 2.1.0
|
||||
version: 2.1.1
|
||||
repository: https://github.com/simolus3/moor
|
||||
homepage: https://moor.simonbinder.eu/
|
||||
issue_tracker: https://github.com/simolus3/moor/issues
|
||||
|
|
Loading…
Reference in New Issue