Options
All
  • Public
  • Public/Protected
  • All
Menu

Wraps a read state, in which some elements of an ORM domain may be loading.

see

OrmDomain

experimental

Hierarchy

  • ReadLatchable
    • OrmUpdating

Index

Properties

Methods

Properties

Readonly domain

domain: OrmDomain

The attached ORM domain. The value of this property can be safely stored if required to later obtain a new updating state, or to commit changes.

Methods

get

  • Get a subject in the domain. This method and its array-based overload are the ONLY way to obtain subject instances, including new ones – a subject constructor should only ever be called by the passed construct callback. This ensures that the subject is attached to the domain. For new subjects, it also allows that the subject may have been concurrently created remotely in another clone.

    Type parameters

    Parameters

    • src: GraphSubject | string

      can be a plain IRI or Reference, used to identify the Subject

    • construct: ConstructOrmSubject<T>

      called as necessary to create a new ORM Subject

    • Optional scope: OrmScope

    Returns Promise<T>

  • Get an array of subjects in the domain. This method and its overload are the ONLY way to obtain subject instances, including new ones – a subject constructor should only ever be called by the passed construct callback. This ensures that the subject is attached to the domain. For new subjects, it also allows that the subject may have been concurrently created remotely in another clone.

    Type parameters

    Parameters

    • src: GraphSubject[] | string[]

      can be a plain IRI or Reference, used to identify the Subject

    • construct: ConstructOrmSubject<T>

      called as necessary to create a new ORM Subject

    • Optional scope: OrmScope

    Returns Promise<T[]>

latch

  • Make a bounded read-only use of state. The state is guaranteed not to change until the procedure's returned promise has settled.

    Type parameters

    • T

    Parameters

    Returns Promise<T>

updated

  • Updates the ORM domain from the given m-ld core API update. Usually called from a core API read or follow callback. Once the returned promise has resolved, all subject-graph changes will have been applied to domain subjects.

    Parameters

    Returns Promise<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.1-edge.4 Source code licensed MIT. Privacy policy