mapp.utils.userIndexedDB
The module exports method to store and retrieve objects from a userIndexedDB.
- Source
Methods
(inner) add(params) → {Promise}
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | Object |
Name | Type | Description |
---|---|---|
params.user | string | |
params.db | string | |
params.store | string | |
params.key | object |
- Source
Returns:
addPromise
- Type:
- Promise
(inner) deleteDB()
- Source
(inner) get(params) → {Promise}
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | Object |
Name | Type | Description |
---|---|---|
params.user | string | |
params.workspace | string | |
params.store | string | |
params.name | object |
- Source
Returns:
getPromise
- Type:
- Promise
(inner) openDB(params) → {Promise}
The method is called from any transaction method to interact with the userIndexedDB.
A new database will be created when attempting to open a DB which does not exist.
A new store will be created when a new DB is upgraded [on creation].
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | object |
Name | Type | Description |
---|---|---|
params.store | string | |
params.user | string | |
params.workspace | string |
- Source
Returns:
OpenDBPromise
- Type:
- Promise
(inner) put(params) → {Promise}
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | Object |
Name | Type | Description |
---|---|---|
params.user | string | |
params.db | string | |
params.store | string | |
params.obj | object |
- Source
Returns:
updatePromise
- Type:
- Promise