data
- Description:
-
-
Core System. Collection of functions to control data through internal database for sharing data between diffrent plugins as an App.
-
- Source:
- Since:
-
- 22.03.17
Properties:
Name | Type | Description |
---|---|---|
bundle |
function |
Function to get data from the internal database (indexedDB). See bim.app.data.bundle for more details. |
db |
Object |
See bim.app.data.db for more details. |
set |
function |
See bim.app.data.set for more details. |
get |
function |
See bim.app.data.get for more details. |
deleteItem |
function |
See bim.app.data.deleteItem for more details. |
Namespaces
Methods
(static) bundle(params, callback)
- Description:
-
-
Function to get item from the internal database. Uses
indexedDB
.
-
- Source:
- See:
Examples
bim.app.data.bundle({
db: {
name: ${1: name},
table: ${2: table},
key: ${3: key}
}
}, ${4: callback});
bim.app.data.bundle({
db: {
name: "storyboard", // Name of indexedDB
table: "plugins", // Which ObjectStore would be used
key: "PLUGINS" // The key of the item
}
}, function (res) {
if (res.error) {
// Do Something ...
console.error(res.message);
} else {
// Do Something ...
bim.app.storyboard.moveTo({
page: page,
plugin: plugin_name,
index: true
});
}
});
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Required. Properties
|
||||||||||||||||||
callback |
bim.app.data.bundleCallback |
Required. Callback function called with result data. See bim.app.data.bundleCallback for more details. |
(static) set(params)
- Description:
-
Set
- Source:
Parameters:
Name | Type | Description |
---|---|---|
params |
* |
Returns:
(static) get(params, callback)
- Description:
-
Get
- Source:
Parameters:
Name | Type | Description |
---|---|---|
params |
* | |
callback |
* |
Returns:
(static) deleteItem(params, callback)
- Description:
-
Delete Item
- Source:
Parameters:
Name | Type | Description |
---|---|---|
params |
* | |
callback |
* |
Returns:
Type Definitions
bundleCallback(params)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|