data

bim.app. Namespace

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

db

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
Name Type Description
db Object

Required.

Properties
Name Type Description
name string

Required. Used for opening indexedDB.

table string

Required. Used for getting ObjectStore from transaction.

key string

Required. Used for getting item from ObjectStore.

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
Name Type Description
error boolean

Passes whether failed or not.

message string

Passes error message when fails.

description Error

Passes Error Object when fails. Error객체 자체로 넘겨줌.

errno string

Passes error number when fails.

data Object

Passes the result data when success.