Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CrdtMultiValueRegister<T>

This register can be set to a single value, but reading the register returns a list of all concurrently written values.

Example:

let reg = connection.multiValueRegister<number>("mymvreg")
await connection.update(
    reg.set(15)
)
let val = await reg.read();
// val is now [15]

Type parameters

  • T

    the type of the value stored in the register

Hierarchy

Implemented by

Index

Properties

Methods

Properties

parent

parent: CrdtFactory

the parent factory

Methods

read

  • read(): Promise<T[]>

set

  • set(value: T): ApbUpdateOp
  • Creates an operation, which sets the register to the provided value.

    Use Connection.update to send the update to the database.

    Parameters

    • value: T

    Returns ApbUpdateOp

Generated using TypeDoc