Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dickermoshe committed Jan 5, 2025
1 parent 1db8609 commit 030677b
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions drift_dev/test/lint/test_pkg/lib/db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,30 @@ class TestDatabase extends _$TestDatabase {
transaction(
() async {
// expect_lint: unawaited_futures_in_transaction
into(users).insert(UsersCompanion.insert(name: 'name'));
await into(users).insert(UsersCompanion.insert(name: 'name'));
into(users)
.insert(UsersCompanion.insert(name: 'name', group: BigInt.from(1)));
await into(users)
.insert(UsersCompanion.insert(name: 'name', group: BigInt.from(1)));
},
);
// expect_lint: non_null_insert_with_ignore
await into(users).insertReturning(UsersCompanion.insert(name: 'name'),
await into(users).insertReturning(
UsersCompanion.insert(name: 'name', group: BigInt.from(1)),
mode: InsertMode.insertOrIgnore);
// expect_lint: non_null_insert_with_ignore
await managers.users
.createReturning((o) => o(name: "hi"), mode: InsertMode.insertOrIgnore);
await into(users).insertReturningOrNull(UsersCompanion.insert(name: 'name'),
await managers.users.createReturning(
(o) => o(name: "hi", group: BigInt.from(1)),
mode: InsertMode.insertOrIgnore);
await into(users).insertReturningOrNull(
UsersCompanion.insert(name: 'name', group: BigInt.from(1)),
mode: InsertMode.insertOrIgnore);
await managers.users.createReturningOrNull((o) => o(name: "hi"),
await managers.users.createReturningOrNull(
(o) => o(name: "hi", group: BigInt.from(1)),
mode: InsertMode.insertOrIgnore);
await into(users).insertReturning(UsersCompanion.insert(name: 'name'));
await managers.users.createReturning((o) => o(name: "hi"));
await into(users).insertReturning(
UsersCompanion.insert(name: 'name', group: BigInt.from(1)));
await managers.users
.createReturning((o) => o(name: "hi", group: BigInt.from(1)));
}

@override
Expand Down

0 comments on commit 030677b

Please sign in to comment.