RemoveData

fun EventSchemaBuilderScope.RemoveData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, deletions: DeleteDataDeletionBuilderScope.() -> Unit)

Deletes values from data sources, on the IO dispatcher. Each deletions entry (built with addDeletion) pairs a data source with an access mode — Single removes one id, Batch removes a list of ids, Full wipes the source. Supports the application and screen data holders (plain and segmented) and the plain and segmented local databases; deletions targeting navigation data, a tile or an inline source are silently ignored. All deletions are attempted even if one fails. Does not consume incomingData. Dispatches onSuccess (no data) when every deletion completes without error; onFailure (no data), once at the end, when at least one database deletion failed.

Parameters

id

Unique identifier of this event. Defaults to a random id.

trigger

Trigger that fires this event, built via EventTriggers.

events

Child events chained after this one, wired to its triggers (onSuccess, onFailure).

deletions

Data source entries to delete, declared with addDeletion.