Classes
Components
Modules
IncrementalData
Class defined in model/data/IncrementalData.js#14 inherits from
Incremental data storage implemention.
this.create(nodeData)
Method defined in model/data/IncrementalData.js#22
Create a new node.
Parameters
nodeData | object |
Returns
ObjectOperation | The applied operation. |
this.delete(nodeId)
Method defined in model/data/IncrementalData.js#34
Delete a node.
Parameters
nodeId | String |
Returns
ObjectOperation | The applied operation. |
this.update(path, diff)
Method defined in model/data/IncrementalData.js#60
Update a property incrementally.
The diff can be of the following forms (depending on the updated property type):
- String:
{ insert: { offset: Number, value: Object } }
{ delete: { start: Number, end: Number } }
- Array:
{ insert: { offset: Number, value: Object } }
{ delete: { offset: Number } }
Parameters
path | array | |
diff | object |
Returns
ObjectOperation | The applied operation. |
this.set(path, newValue)
Method defined in model/data/IncrementalData.js#74
Set a property to a new value
Parameters
path | Array | |
newValue | Object |
Returns
ObjectOperation | The applied operation. |
this.apply(op)
Method defined in model/data/IncrementalData.js#86
Apply a given operation.
Parameters
op | ObjectOperation |
this._getDiffOp(path, diff)
Method defined in model/data/IncrementalData.js#127
Creates proper operation based on provided node path and diff.
Parameters
path | Array | |
diff | Object |
Returns
ObjectOperation | operation. |