Remote / foldkit-remote-server
DeleteOutcome
const · packages/remote-server/src/index.ts:325
const DeleteOutcome: Data.TaggedEnum.Constructor<
| { readonly _tag: 'Moved' }
| { readonly _tag: 'Deleted'; readonly cascaded: ReadonlyArray<CascadedRow> }
| { readonly _tag: 'Absent' }
>Its type
type DeleteOutcome = Data.TaggedEnum<{
Deleted: {
readonly cascaded: ReadonlyArray<CascadedRow>
}
Absent: {}
Moved: {}
}>What a writer's delete did. Deleted: the row is gone, with cascaded,
the rows declared to go with it (Relation.one(…, { onDelete: 'cascade' }))
that the principal may see. Absent: no row, so nothing to delete (a
retry's case). Moved: the row is there at another revision, and stays.