コンテンツにスキップ

Function: crdtCounter()

このコンテンツはまだ日本語訳がありません。

crdtCounter(): Column<number, true, true>

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

A grow-only counter (G-Counter CRDT). Storage is a per-client-id map { [clientID]: currentValue }. Server-side merge takes the per-key max() on every write, so concurrent increments from N clients eventually all land — no lost writes even when two clients push at once.

Users read the counter as a number (the sum of every client’s slot). Write with crdtIncrement(clientID, delta) from @sh1n4ps/plasma-core.

Column<number, true, true>