Skip to content

Function: crdtOrSet()

crdtOrSet<T>(): Column<readonly T[], true, true>

Defined in: core/src/schema/columns.ts:367

OR-Set: an observed-remove set. Add and remove concurrently from multiple clients and the “add wins” semantics keep the element in the set if any concurrent add is unresolved by the observing remove. Perfect for message reactions (Gamma dogfood asked for this): tap 👍, another tab taps 👍 too, one taps unlike — the intersection is preserved.

Wire shape: { adds: Record<key, tag[]>, tombstones: tag[], values: Record<key, T> }. Read with orSetValues(set). Add with orSetAdd(clientID, seq, value, current); remove with orSetRemove(value, current).

T

Column<readonly T[], true, true>