new RecordPatch(patchOps, involvedPropPaths, updatedPropPaths)
Note: The constructor is not accessible from the client code. The instances are creating using module's build() function.
||Array.<module:x2node-patches~RecordPatchOperation>||Record patch operations sequence.|
||Set.<string>||Involved property paths.|
||Set.<string>||Paths of properties directly updated by the patch.|
<readonly> involvedPropPaths :Set.<string>
Paths (in dot notation) of all properties involved (read, erased and updated) in the patch.
<readonly> updatedPropPaths :Set.<string>
Paths (in dot notation) of all properties directly updated by the patch. All are also included in the
apply(record [, handlers])
Apply patch to the specified record.
Name Type Argument Description
Object The record to patch.
Handlers called when a patch operation is applied.
If the patch could not be applied because the record is invalid (e.g. missing properties that are expected to be present by the patch logic).
trueif the patch was applied,
falseif a "test" operation in the patch failed. Note, that in the case of a failed "test" operation the record may be partially modified as this method does not provide transactionality.