Skip to content

Commit 85f6c00

Browse files
cleanup
1 parent ab9957b commit 85f6c00

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

.changeset/chilled-walls-promise.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
---
55

66
Updated logic to correspond with React Native Quick SQLite concurrent transactions. Added helper methods on transaction contexts.
7+
8+
API changes include:
9+
- Removal of synchronous DB operations in transactions: `execute`, `commit`, `rollback` are now async functions. `executeAsync`, `commitAsync` and `rollbackAsync` have been removed.

apps/supabase-todolist

packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
387387
);
388388
}
389389

390-
async *watch(sql: string, parameters: any[], options?: SQLWatchOptions): AsyncIterable<QueryResult> {
390+
async *watch(sql: string, parameters?: any[], options?: SQLWatchOptions): AsyncIterable<QueryResult> {
391391
//Fetch initial data
392392
yield await this.execute(sql, parameters);
393393

packages/powersync-sdk-common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,14 @@ export abstract class AbstractStreamingSyncImplementation extends BaseObserver<S
269269
}
270270

271271
async *streamingSyncRequest(req: StreamingSyncRequest, signal: AbortSignal): AsyncGenerator<StreamingSyncLine> {
272-
console.log('sending request');
273272
const body = await this.options.remote.postStreaming('/sync/stream', req, {}, signal);
274-
console.log('[streamingSyncRequest]', body);
275273
const stream = ndjsonStream(body);
276274
const reader = stream.getReader();
277275

278276
try {
279277
while (true) {
280278
// Read from the stream
281279
const { done, value } = await reader.read();
282-
console.log('value', value);
283280
// Exit if we're done
284281
if (done) return;
285282
// Else yield the chunk

packages/powersync-sdk-react-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"homepage": "https://docs.powersync.co/",
2626
"peerDependencies": {
27-
"@journeyapps/react-native-quick-sqlite": "0.0.0-dev-20231026145554",
27+
"@journeyapps/react-native-quick-sqlite": "0.0.0-dev-20231030064733",
2828
"base-64": "^1.0.0",
2929
"react": "*",
3030
"react-native-fetch-api": "^3.0.0",
@@ -40,7 +40,7 @@
4040
"async-lock": "^1.4.0"
4141
},
4242
"devDependencies": {
43-
"@journeyapps/react-native-quick-sqlite": "0.0.0-dev-20231026145554",
43+
"@journeyapps/react-native-quick-sqlite": "0.0.0-dev-20231030064733",
4444
"@types/async-lock": "^1.4.0",
4545
"react": "18.2.0",
4646
"typescript": "^4.1.3"

packages/powersync-sdk-react-native/src/sync/stream/ReactNativeRemote.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export class ReactNativeRemote extends AbstractRemote {
7171
throw error;
7272
}
7373

74-
console.log(res.body);
7574
return res.body;
7675
}
7776
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,10 +2134,10 @@
21342134
"@types/yargs" "^17.0.8"
21352135
chalk "^4.0.0"
21362136

2137-
"@journeyapps/react-native-quick-sqlite@0.0.0-dev-20231026145554":
2138-
version "0.0.0-dev-20231026145554"
2139-
resolved "https://registry.npmjs.org/@journeyapps/react-native-quick-sqlite/-/react-native-quick-sqlite-0.0.0-dev-20231026145554.tgz#bb2169f270d58b03fd7a8e3a81a956563010e45a"
2140-
integrity sha512-0JCfOsgfynOKCPoP7YijpGamBBG0AQi/3Ai01WV6mbJylGGHCPeWo3ErM0x02eL5sIiy64ZIFUsTNhxt/Z5dIg==
2137+
"@journeyapps/react-native-quick-sqlite@0.0.0-dev-20231030064733":
2138+
version "0.0.0-dev-20231030064733"
2139+
resolved "https://registry.npmjs.org/@journeyapps/react-native-quick-sqlite/-/react-native-quick-sqlite-0.0.0-dev-20231030064733.tgz#33008ee214a52726d4e4429af7e196bbea2e4293"
2140+
integrity sha512-IR7fWhMY/SRAdBINie67OncupRSluIAH2LyR3YEOMJGbXvVbPtDGieT1fXIiUZ2VFbhbIhXOTusgZ4RADmbFiQ==
21412141
dependencies:
21422142
lodash "^4.17.21"
21432143

0 commit comments

Comments
 (0)