TinyBase logoTinyBase β

WillDelRowCallback

The WillDelRowCallback type describes a function that is called before a Row is deleted from the Store.

(
  tableId: Id,
  rowId: Id,
): boolean
TypeDescription
tableIdId

The Id of the Table containing the Row.

rowIdId

The Id of the Row being deleted.

returnsboolean

true to allow the deletion, false to prevent it.

The callback receives the table Id and row Id of the Row about to be deleted. It returns true to allow the deletion, or false to prevent it.

Multiple WillDelRowCallback functions can be registered and they will be called sequentially. If any callback returns false, the chain short-circuits and the Row will not be deleted.

Since

v8.0.0