From 4e8d361ecd5035a76164e16342f96814cde77dc1 Mon Sep 17 00:00:00 2001 From: Alex <57534485+alexburlton-sonocent@users.noreply.github.com> Date: Mon, 2 Aug 2021 15:28:02 +0100 Subject: [PATCH] Document chromeTransactionDurability Also updates to use markdown tables rather than HTML, per the suggestion [here](https://github.com/dfahlander/Dexie.js/pull/1367#issuecomment-891008856) --- docs/Dexie/Dexie.md | 47 +++++++++++++-------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/docs/Dexie/Dexie.md b/docs/Dexie/Dexie.md index 254dc47f..6025f51c 100644 --- a/docs/Dexie/Dexie.md +++ b/docs/Dexie/Dexie.md @@ -15,42 +15,21 @@ var db = new Dexie(databaseName, options?); ### Parameters - - - -
dbName : StringDatabase name
options: Object (optional)API Options
+| Parameter | Description | +|----------------------------|---------------| +| dbName: String | Database name | +| options: Object (optional) | API Options | ### Options - - - - - - - - - - - - - - - - - - - - - - - - - - -
addons: Array<DexieAddon>Explicitly define the addons to activate for this db instance
autoOpen: booleanDefault true. Whether database will open automatically on first query.
indexedDB: IDBFactorySupply an alternate implementation of indexedDB. If supplying this, also supply IDBKeyRange that works with that implementation.
IDBKeyRange: IDBKeyRangeAn implementation of the IDBKeyRange interface that works with provided indexedDB implementation.
allowEmptyDB: booleanIf opening in dynamic mode (not defining a schema) - the call to db.open() will normally reject if the database didn't exist and this option is false or not set. - By setting this option to true, Dexie.open() will succeed to create a new empty database when opening it dynamically.
modifyChunkSize: number(since 3.1.0-alpha) Override the default value of 2000 rows per chunk used by Collection.modify(). See FR #1152. -
+| Option | Description | +|------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| addons: Array | Explicitly define the addons to activate for this db instance | +| autoOpen: boolean | Default true. Whether database will open automatically on first query. | +| indexedDB: [IDBFactory](https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory) | Supply an alternate implementation of indexedDB. If supplying this, also supply IDBKeyRange that works with that implementation. | +| IDBKeyRange: [IDBKeyRange](https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange) | An implementation of the IDBKeyRange interface that works with provided indexedDB implementation. | +| allowEmptyDB: boolean | If opening in [dynamic mode](Dexie.open()#dynamic-mode) (not defining a schema) the call to db.open() will normally reject if the database didn't exist and this option is false or not set. By setting this option to true, Dexie.open() will succeed to create a new empty database when opening it dynamically. | +| modifyChunkSize: number | (since 3.1.0-alpha) Override the default value of 2000 rows per chunk used by Collection.modify(). See [FR #1152](https://github.com/dfahlander/Dexie.js/issues/115). | +| chromeTransactionDurability: 'default' \| 'strict' \| 'relaxed' | (since 3.2.0-beta.3) Override the default transaction durability in Chrome versions >=83. See [FR #1018](https://github.com/dfahlander/Dexie.js/issues/1018) | If the 'addons' option is omitted, it will default to the value of [Dexie.addons](/docs/Dexie/Dexie.addons).