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