Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • InterimUpdate

Index

Properties

Methods

Properties

Readonly update

update: Promise<MeldPreUpdate>

A promise that resolves to the current update. If any modifications made by the methods above have affected the @insert and @delete of the update, they will have been applied.

Methods

alias

  • alias(subjectId: Iri | null, property: Iri, alias: SubjectProperty): void
  • alias(subjectId: Iri, property: "@id", alias: Iri): void
  • Substitutes the given alias for the given property or subject and property, in updates provided to the application. This allows a constraint to hide a data implementation detail.

    Parameters

    • subjectId: Iri | null

      the subject to which the alias applies

    • property: Iri

      the property to be aliased

    • alias: SubjectProperty

      the alias for the given property

    Returns void

  • Substitutes the given alias for the given subject, in updates provided to the application. This allows a constraint to hide a data implementation detail.

    Parameters

    • subjectId: Iri

      the subject to which the alias applies

    • property: "@id"

      @id to indicate that the subject IRI is aliased

    • alias: Iri

      the alias for the given subject

    Returns void

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:

    • Recover a previous value into an empty mandatory property
    • Rewrite a list index predicate to a CRDT-specific form
    see

    update

    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
    • Removal of excess property values

    Note that graph edges that are deleted by entailments retain a hidden presence in the clone metadata, commonly known as a 'tombstone'. Since this can give rise to unbounded storage use, constraints should endeavour to remove these hidden graph edges when the opportunity arises. They can be obtained using the {@link #hidden} method.

    see

    update

    Parameters

    • update: Update

      the update to entail into the domain

    Returns void

hidden

  • hidden(subjectId: Iri, property: Iri): Consumable<Value>
  • Recovers hidden graph edges for the given subject and property; that is, values that have been deleted from the graph by entailment. Hidden edges can be removed permanently by asserting their deletion.

    Parameters

    • subjectId: Iri

      the subject for which to obtain the graph edge

    • property: Iri

      the property for which to obtain the graph edge

    Returns Consumable<Value>

remove

  • remove(assertions: Assertions): void
  • 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

    update

    Parameters

    • assertions: Assertions

      Subject assertions to remove

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method
  • Protected method

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