ItemUpdateExt extension

on

Methods

forEachChangedField(void callback(String? fieldName, int fieldPosition, String? value)) → void
Receives an iterator function and invokes it once per each field such that ItemUpdate.isValueChanged is true.
forEachField(void callback(String? fieldName, int fieldPosition, String? value)) → void
Receives an iterator function and invokes it once per each field in the Subscription.
getItemName() → String?
Inquiry method that retrieves the name of the item to which this update pertains.
getItemPos() → int
Inquiry method that retrieves the position in the "Item List" or "Item Group" of the item to which this update pertains.
getValue(StringOrInt fieldNameOrPosition) → String?
Returns the current value for the specified field.
getValueAsJSONPatchIfAvailable(StringOrInt fieldNameOrPosition) → Object?
Inquiry method that gets the difference between the new value and the previous one as a JSON Patch structure, provided that the Server has used the JSON Patch format to send this difference, as part of the "delta delivery" mechanism.
isSnapshot() → bool
Inquiry method that asks whether the current update belongs to the item snapshot (which carries the current item state at the time of Subscription).
isValueChanged(StringOrInt fieldNameOrPosition) → bool
Inquiry method that asks whether the value for a field has changed after the reception of the last update from the Server for an item.