Options
All
  • Public
  • Public/Protected
  • All
Menu

An update to which further updates can be asserted or entailed.

Hierarchy

Index

Properties

Readonly @delete

@delete: Subject[]

Partial subjects, containing properties that have been deleted from the domain. Note that deletion of a property (even of all properties) does not necessarily indicate that the subject's identity is not longer represented in the domain.

Readonly @insert

@insert: Subject[]

Partial subjects, containing properties that have been inserted into the domain.

Readonly @ticks

@ticks: number

Current local clock ticks at the time of the update.

see

MeldStatus.ticks

ready

ready: Promise<unknown>

A promise that resolves when all pending modifications made by the methods above have affected this updates @insert and @delete properties.

Methods

assert

  • assert(update: Update): void
  • An assertion is an update that maintains the data integrity of the domain by changing data that the app created, or that was the result of a prior assertion.

    An assertion is incorporated into the final update sent to other clones and echoed to the local app. Examples of assertions:

    • Delete previous value from a single-value register
    • Rewrite a list index predicate to a CRDT-specific form
    see

    ready

    Parameters

    • update: Update

      the update to assert into the domain

    Returns void

entail

  • entail(update: Update): void
  • An entailment is an update that maintains the data integrity of a domain by changing only entailed data. Entailed data is data that can be deduced automatically, and can only be created by entailment, and not by an app.

    An entailment is not included in updates sent to other clones or to the local app. Examples of entailments:

    • The size of a collection
    • Membership of a duck-type class
    see

    ready

    Parameters

    • update: Update

      the update to entail into the domain

    Returns void

remove

  • Removes assertions (not entailments) from this update, prior to application to the dataset. This is used to rewrite assertions made by the application, or the work of prior constraints.

    Removal of an assertion is possible:

    1. during constraint checking,
    2. during constraint application, if the assertion was made by another constraint. An attempt to remove an assertion made in the original update will be ignored, which may lead to unexpected results.
    see

    ready

    Parameters

    • key: keyof DeleteInsert<any>

      Whether to remove @delete or @insert components

    • pattern: Subject | Subject[]

      the Subject assertions to remove

    Returns void

Legend

  • Property
  • Method

Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.5.0 Source code licensed MIT. Privacy policy