Namespace for all datasource related functions.
Classes
- DomStorage
- Server
The Server class encapsulates the access to a server datasource
- 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
});
}
(static) instanceSymbol
instanceof
operator.This method is called by the instanceof
operator.
- Since
- 2.1.0
Methods
attachObserver(observer) → {Datasource}
attach a new observer
.attach a new observer
Name | Type | Description |
---|---|---|
observer | Observer |
- Type:
- Datasource
containsObserver(observer) → {boolean}
Name | Type | Description |
---|---|---|
observer | Observer |
- Type:
- boolean
detachObserver(observer) → {Datasource}
detach a observer
.detach a observer
Name | Type | Description |
---|---|---|
observer | Observer |
- Type:
- Datasource
get() → {Object|Array}
Returns real object
.Returns real object
- Type:
- Object |
Array
getOption(path, defaultValue) → {*}
nested options can be specified by path a.b.c
nested options can be specified by path a.b.c
Name | Type | Description |
---|---|---|
path | string | |
defaultValue | * |
- Type:
- *
read() → {Promise}
this method must be implemented by derived classes.
- Type
- Error
- Type:
- Promise
set(data) → {Datasource}
Name | Type | Description |
---|---|---|
data | Object | |
- Type:
- Datasource
setOption(path, value) → {Datasource}
Set option
.Set option
Name | Type | Description |
---|---|---|
path | string | |
value | * |
- Type:
- Datasource
setOptions(options) → {Datasource}
Name | Type | Description |
---|---|---|
options | string | |
the options does not contain a valid json definition
- Type
- Error
- Type:
- Datasource
write() → {Promise}
this method must be implemented by derived classes.
- Type
- Error
- Type:
- Promise
Type Definitions
exampleCallback(value, key)
This callback can be passed to a datasource and is used to adapt data structures.
Name | Type | Description |
---|---|---|
value | * | Value |
key | string | Key |