Namespace for datasources
Classes
- RestAPI
The LocalStorage class encapsulates the access to data objects.
- Storage
The Storage class encapsulates the access to data objects over WebStorageAPI.
Namespaces
Members
# defaults
Derived classes can override and extend this method as follows.
get defaults() {
return Object.assign({}, super.defaults, {
myValue:true
});
}
Methods
# get() → {*}
Returns:
- Type
- *
# getOption(path, defaultValue) → {*}
nested options can be specified by path a.b.c
Parameters:
Name | Type | Description |
---|---|---|
path |
string | |
defaultValue |
* |
Returns:
- Type
- *
# read() → {Promise}
Throws:
-
this method must be implemented by derived classes.
- Type
- Error
Returns:
- Type
- Promise
# set(data) → {Datasource}
Parameters:
Name | Type | Description |
---|---|---|
data |
* |
Returns:
- Type
- Datasource
# setOption(path, value) → {Datasource}
Set option
Parameters:
Name | Type | Description |
---|---|---|
path |
string | |
value |
* |
Returns:
- Type
- Datasource
# setOptions(options) → {Datasource}
Parameters:
Name | Type | Description |
---|---|---|
options |
string | object |
Throws:
-
the options does not contain a valid json definition
- Type
- Error
Returns:
- Type
- Datasource
# write() → {Promise}
Throws:
-
this method must be implemented by derived classes.
- Type
- Error
Returns:
- Type
- Promise