mirror of https://github.com/AMT-Cheif/drift.git
Use doWhenOpened for custom updates and inserts
This commit is contained in:
parent
876db0671e
commit
0ef56d6163
|
@ -207,7 +207,8 @@ mixin QueryEngine on DatabaseConnectionUser {
|
|||
final ctx = GenerationContext.fromDb(engine);
|
||||
final mappedArgs = variables.map((v) => v.mapToSimpleValue(ctx)).toList();
|
||||
|
||||
final result = await writer(executor, query, mappedArgs);
|
||||
final result =
|
||||
await executor.doWhenOpened((e) => writer(e, query, mappedArgs));
|
||||
|
||||
if (updates != null) {
|
||||
await engine.streamQueries.handleTableUpdates(updates);
|
||||
|
|
Loading…
Reference in New Issue