Expand all

ve.dm.TransactionProcessor.processors

Constructor

new ve.dm.TransactionProcessor.processors() #

Processing methods.

Each method is specific to a type of action. Methods are called in the context of a transaction processor, so they work similar to normal methods on the object.

Source:
Processing methods.

Methods

attribute(op)static #

Execute an attribute operation.

This method is called within the context of a transaction processor instance.

This sets the attribute named op.key on the element at this.cursor to op.to, or unsets it if op.to === undefined. op.from is not checked against the old value, but is used instead of op.to in reverse mode. So if op.from is incorrect, the transaction will commit fine, but won't roll back correctly.

Parameters:

Name Type Description
op Object

Operation object

Properties:
Name Type Description
key string

Attribute name

from any

Old attribute value, or undefined if not previously set

to any

New attribute value, or undefined to unset

Source:
Execute an attribute operation.

replace(op)static #

Verify a replace operation (the actual processing is now done in ve.dm.TreeModifier)

Parameters:

Name Type Description
op Object

Operation object

Properties:
Name Type Description
remove Array

Linear model data to remove

insert Array

Linear model data to insert

Source:
Verify a replace operation (the actual processing is now done in ve.dm.TreeModifier)

retain(op)static #

Execute a retain operation.

Called within the context of a transaction processor instance; moves the cursor by op.length

Parameters:

Name Type Description
op Object

Operation object:

Properties:
Name Type Description
length number

Number of elements to retain

Source:
Execute a retain operation.