Class KeySet

Hierarchy (View Summary)

Properties

address: Muid
behavior: Behavior
database: Database
DELETION: Deletion = ...
globalPropertyMuid: { medallion: number; offset: Behavior; timestamp: number } = ...
INCLUSION: Inclusion = ...

Accessors

Methods

  • Adds a key to the keyset. If a bundler is supplied, the function will add the entry to that bundler and return immediately (presumably you know what to do with a CS if you passed it in). If the caller does not supply a bundler, then one is created on the fly, and then this method will await on the CS being added to the database instance. This is to allow simple console usage like: await myKeySet.add("foo");

    Parameters

    Returns Promise<Muid>

    a promise that resolves to the address of the newly created entry

  • Adds a deletion marker (tombstone) for a particular key in the directory. The corresponding value will be seen to be unset in the data model.

    Parameters

    Returns Promise<Muid>

    a promise that resolves to the address of the newly created deletion entry

  • Reset this Container to a previous time. If no time is specified, the container will be cleared.

    Parameters

    • OptionaltoTime: AsOf
    • Optionalrecurse: any
    • Optionalmeta: Meta

    Returns Promise<void>

    toTime Optional time to reset to. If absent, the container will be cleared.

    recurse Recursively reset all child containers held by this container at reset time?

    meta Metadata to be used in the reset.

  • Reset the properties associated with this container to a previous time.

    Parameters

    • OptionaltoTime: AsOf

      optional timestamp to reset to. If not provided, the properties will be deleted.

    • Optionalmeta: Meta

    Returns Promise<void>

  • Generates a JSON representation of the data in the key set. Mostly intended for demo/debug purposes.

    Parameters

    • indent: number | boolean = false

      true to pretty print

    • OptionalasOf: AsOf

      effective time

    • Optionalseen: Set<string>

      (internal use only! This prevents cycles from breaking things)

    Returns Promise<string>

    a JSON string

  • Similar to add method, but for multiple entries.

    Parameters

    • keys: Iterable<ScalarKey>

      an iterable of keys to add to the key set

    • Optionalmeta: Meta

    Returns Promise<void>

    a promise that resolves to a Bundler object for the created entries.