Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CrdtRegister<T>

A register stores a single value. It provides a set method to change the value.

Example:

let reg = connection.register<string[]>("mylwwreg")
await connection.update(
    reg.set(["a", "b"])
)
let val = await reg.read();

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