Function: crdtIncrement()
このコンテンツはまだ日本語訳がありません。
Function: crdtIncrement()
Section titled “Function: crdtIncrement()”crdtIncrement(
clientID,delta,current?):CrdtCounterMap
Defined in: core/src/schema/crdt.ts:50
Produce the next counter map after a client’s local increment. Callers
pass the current map they read out of the row (or undefined for
fresh rows) and receive an updated map to write back. Merging happens
server-side; this helper only bumps the caller’s own slot.
delta must be non-negative — G-Counter is grow-only. Use
pnIncrement / pnDecrement on a PN-counter column for signed
updates (Alpha dogfood #8 called out the grow-only constraint as a
blocker for “current completed tasks” that swings both ways).
Parameters
Section titled “Parameters”clientID
Section titled “clientID”string
number
current?
Section titled “current?”Readonly<Record<string, number>> | null