TinyBase logoTinyBase

ChangedCell

The ChangedCell type describes a Cell that has been changed during a transaction, primarily used so that you can indicate whether the transaction should be rolled back.

[CellOrUndefined, CellOrUndefined]

It provides both the old and new Cell values in a two-part array. These are describing the state of the changed Cell in the Store at the start of the transaction, and by the end of the transaction.

Hence, an undefined value for the first item in the array means that the Cell was added during the transaction. An undefined value for the second item in the array means that the Cell was removed during the transaction. An array with two different Cell values indicates that it was changed. The two-part array will never contain two items of the same value (including two undefined values), even if, during the transaction, a Cell was changed to a different value and then changed back.

Since

v1.2.0