JS config
Local Config
Section titled “Local Config”await Barq.open({ path: 'app.barq', schema: [Task], schemaVersion: 1,});Common Options
Section titled “Common Options”| Option | Meaning |
|---|---|
path |
Database file path. |
schema |
Object schemas. Required when first creating a file. |
schemaVersion |
Local schema version. |
inMemory |
Open as in-memory database. Not compatible with sync. |
readOnly |
Open without writes. |
encryptionKey |
64-byte local file encryption key. |
onMigration |
Local migration callback. Not compatible with sync. |
shouldCompact |
Decide whether to compact before open. |
sync |
Sync configuration. |
Sync Config
Section titled “Sync Config”await Barq.open({ schema: [Task], sync: { user, flexible: true, },});Use either flexible: true or partitionValue, not both.