Skip to content

Commit ded4bf0

Browse files
committed
Clean up readme
1 parent e719bcd commit ded4bf0

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

packages/web/README.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,38 +40,23 @@ export const db = new PowerSyncDatabase({
4040
schema: AppSchema,
4141
database: {
4242
// Filename for the SQLite database — it's important to only instantiate one instance per file.
43-
dbFilename: 'powersync.db'
43+
dbFilename: 'example.db'
4444
// Optional. Directory where the database file is located.'
4545
// dbLocation: 'path/to/directory'
4646
},
4747
// Encryption key for the database.
4848
encryptionKey: 'your-encryption-key'
4949
});
5050

51-
// If you are using a custom WASQLiteOpenFactory, you need specify the encryption key inside the factory construtor
51+
// If you are using a custom WASQLiteOpenFactory or WASQLiteDBAdapter, you need specify the encryption key inside the construtor
5252
export const db = new PowerSyncDatabase({
5353
schema: AppSchema,
5454
database: new WASQLiteOpenFactory({
55-
dbFilename: 'examplsw1se112.db',
55+
//new WASQLiteDBAdapter
56+
dbFilename: 'example.db',
5657
vfs: WASQLiteVFS.OPFSCoopSyncVFS,
5758
// Encryption key for the database.
5859
encryptionKey: 'your-encryption-key'
59-
flags: {
60-
enableMultiTabs: typeof SharedWorker !== 'undefined'
61-
}
62-
})
63-
});
64-
// If you are using a custom WASQLiteDBAdapter, you need specify the encryption key inside the factory construtor
65-
export const db = new PowerSyncDatabase({
66-
schema: AppSchema,
67-
database: new WASQLiteDBAdapter({
68-
dbFilename: 'examplsw1se112.db',
69-
vfs: WASQLiteVFS.OPFSCoopSyncVFS,
70-
// Encryption key for the database.
71-
encryptionKey: 'your-encryption-key'
72-
flags: {
73-
enableMultiTabs: typeof SharedWorker !== 'undefined'
74-
}
7560
})
7661
});
7762
```

0 commit comments

Comments
 (0)