diff --git a/cpp/DBHostObject.cpp b/cpp/DBHostObject.cpp index 20b69cac..c6bda2ac 100644 --- a/cpp/DBHostObject.cpp +++ b/cpp/DBHostObject.cpp @@ -52,6 +52,8 @@ void DBHostObject::flush_pending_reactive_queries(std::shared_ptr re } } + pending_reactive_queries.clear(); + invoker->invokeAsync( [this, resolve]() { resolve->asObject(rt).asFunction(rt).call(rt, {}); }); } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index b335a86f..38e6272e 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -10,7 +10,7 @@ PODS: - hermes-engine (0.76.0): - hermes-engine/Pre-built (= 0.76.0) - hermes-engine/Pre-built (0.76.0) - - op-sqlite (9.2.4): + - op-sqlite (9.2.6): - DoubleConversion - glog - hermes-engine @@ -1785,7 +1785,7 @@ SPEC CHECKSUMS: GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4 glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a hermes-engine: 9de51d2f67336348a6cd5b686330e436d1dbd522 - op-sqlite: 298654d710ae6b0e52a23136de40dad579ca3203 + op-sqlite: 92fef1bcdad6299e2c87d11c0dc68404ad809d00 RCT-Folly: bf5c0376ffe4dd2cf438dcf86db385df9fdce648 RCTDeprecation: 4c2c4a088b6f0ccfcbd53c9d5614b0238ad57909 RCTRequired: 2d8a683a7848bc0baf5883f0792c1ac43f6267b5 diff --git a/example/src/tests/reactive.spec.ts b/example/src/tests/reactive.spec.ts index f0ec2851..0bdc7369 100644 --- a/example/src/tests/reactive.spec.ts +++ b/example/src/tests/reactive.spec.ts @@ -121,8 +121,9 @@ export function reactiveTests() { unsubscribe(); - db.execute('UPDATE User SET name = ? WHERE id = ?;', ['Foo', 1]); - + await db.transaction(async tx => { + await tx.execute('UPDATE User SET name = ? WHERE id = ?;', ['Foo', 1]); + }); await sleep(20); expect(emittedCount).to.eq(1); });