Skip to content

Commit 307a08f

Browse files
committed
Rename for clarity
1 parent 2c3f243 commit 307a08f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

demos/react-supabase-todolist/src/components/providers/SystemProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const db = new PowerSyncDatabase({
2323
schema: AppSchema,
2424
database: new WASQLiteOpenFactory({
2525
dbFilename: 'example.db',
26-
vfs: WASQLiteVFS.OPFSCoopSyncVFS,
26+
vfs: WASQLiteVFS.OPFSWriteAheadVFS,
2727
flags: {
2828
enableMultiTabs: typeof SharedWorker !== 'undefined'
2929
}

packages/web/src/db/adapters/AsyncWebAdapter.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type PendingListener = { listener: Partial<DBAdapterListener>; closeAfterRegiste
1616
class AsyncConnectionPool implements ConnectionPool {
1717
protected readonly inner: Promise<PoolConnection>;
1818

19-
protected resolvedClient?: DatabaseClient;
19+
protected resolvedWriter?: DatabaseClient;
2020
private activeOnWriter = 0;
2121
private activeOnReader = 0;
2222

@@ -32,7 +32,7 @@ class AsyncConnectionPool implements ConnectionPool {
3232
}
3333
this.pendingListeners.clear();
3434

35-
this.resolvedClient = client.writer;
35+
this.resolvedWriter = client.writer;
3636
return client;
3737
});
3838
}
@@ -88,8 +88,8 @@ class AsyncConnectionPool implements ConnectionPool {
8888
}
8989

9090
registerListener(listener: Partial<DBAdapterListener>): () => void {
91-
if (this.resolvedClient) {
92-
return this.resolvedClient.registerListener(listener);
91+
if (this.resolvedWriter) {
92+
return this.resolvedWriter.registerListener(listener);
9393
} else {
9494
const pending: PendingListener = { listener };
9595
this.pendingListeners.add(pending);
@@ -117,8 +117,8 @@ export class AsyncDbAdapter extends DBAdapterDefaultMixin(AsyncConnectionPool) i
117117
}
118118

119119
getConfiguration(): WebDBAdapterConfiguration {
120-
if (this.resolvedClient) {
121-
return this.resolvedClient.getConfiguration();
120+
if (this.resolvedWriter) {
121+
return this.resolvedWriter.getConfiguration();
122122
}
123123

124124
throw new Error('AsyncDbAdapter.getConfiguration() can only be called after initializing it.');

0 commit comments

Comments
 (0)