From 85f6c00e3d20cc82f873b3125aba67b9455350ba Mon Sep 17 00:00:00 2001 From: Steven Ontong Date: Mon, 30 Oct 2023 09:08:08 +0200 Subject: [PATCH] cleanup --- .changeset/chilled-walls-promise.md | 3 +++ apps/supabase-todolist | 2 +- .../src/client/AbstractPowerSyncDatabase.ts | 2 +- .../sync/stream/AbstractStreamingSyncImplementation.ts | 3 --- packages/powersync-sdk-react-native/package.json | 4 ++-- .../src/sync/stream/ReactNativeRemote.ts | 1 - yarn.lock | 8 ++++---- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.changeset/chilled-walls-promise.md b/.changeset/chilled-walls-promise.md index 6af427c0..ca8247b0 100644 --- a/.changeset/chilled-walls-promise.md +++ b/.changeset/chilled-walls-promise.md @@ -4,3 +4,6 @@ --- Updated logic to correspond with React Native Quick SQLite concurrent transactions. Added helper methods on transaction contexts. + +API changes include: +- Removal of synchronous DB operations in transactions: `execute`, `commit`, `rollback` are now async functions. `executeAsync`, `commitAsync` and `rollbackAsync` have been removed. diff --git a/apps/supabase-todolist b/apps/supabase-todolist index 2acf466d..c9552550 160000 --- a/apps/supabase-todolist +++ b/apps/supabase-todolist @@ -1 +1 @@ -Subproject commit 2acf466dc78d69f44692dfe49bd478fc5d08ccaa +Subproject commit c9552550e7f7de168a0ad7bdfbfc58f7ca0c9c13 diff --git a/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts b/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts index 9380e775..1b5fcd8e 100644 --- a/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts +++ b/packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts @@ -387,7 +387,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver { + async *watch(sql: string, parameters?: any[], options?: SQLWatchOptions): AsyncIterable { //Fetch initial data yield await this.execute(sql, parameters); diff --git a/packages/powersync-sdk-common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts b/packages/powersync-sdk-common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts index 30061be5..2dd7fa8c 100644 --- a/packages/powersync-sdk-common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts +++ b/packages/powersync-sdk-common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts @@ -269,9 +269,7 @@ export abstract class AbstractStreamingSyncImplementation extends BaseObserver { - console.log('sending request'); const body = await this.options.remote.postStreaming('/sync/stream', req, {}, signal); - console.log('[streamingSyncRequest]', body); const stream = ndjsonStream(body); const reader = stream.getReader(); @@ -279,7 +277,6 @@ export abstract class AbstractStreamingSyncImplementation extends BaseObserver