Interface Store<V>

Store is a key-value store interface

Store

interface Store<V> {
    clear(): Promise<void>;
    clearPrepareOperationCache(): void;
    commit(): Promise<void>;
    getNodes(key): Promise<Field[]>;
    getRoot(): Promise<Field>;
    getValue(key): Promise<V>;
    getValuesMap?(): Promise<Map<string, V>>;
    prepareDelNodes(key): void;
    prepareDelValue(path): void;
    preparePutNodes(key, value): void;
    preparePutValue(path, value): void;
    prepareUpdateRoot(root): void;
}

Type Parameters

  • V

Implemented by

Methods

  • Clear all prepare operation cache.

    Returns void

    Memberof

    Store

  • Use the commit() method to actually submit all prepare changes.

    Returns Promise<void>

    {Promise}

    Memberof

    Store

  • Get nodes for a key. Error is thrown when a key that does not exist is being accessed.

    Parameters

    • key: Field

    Returns Promise<Field[]>

    {Promise<Field[]>}

    Memberof

    Store

  • Get the tree root. Error is thrown when the root does not exist.

    Returns Promise<Field>

    {Promise}

    Memberof

    Store

  • Get the value for a key. Error is thrown when a key that does not exist is being accessed.

    Parameters

    • key: Field

    Returns Promise<V>

    {Promise}

    Memberof

    Store

  • Get values map, key is Field.toString().

    Returns Promise<Map<string, V>>

    {Promise<Map<string, V>>}

    Memberof

    Store

  • Prepare delete nodes for a key. Use the commit() method to actually submit changes.

    Parameters

    • key: Field

    Returns void

    Memberof

    Store

  • Prepare delete the value for a key. Use the commit() method to actually submit changes.

    Parameters

    • path: Field

    Returns void

    Memberof

    Store

  • Prepare put nodes for a key. Use the commit() method to actually submit changes.

    Parameters

    • key: Field
    • value: Field[]

    Returns void

    Memberof

    Store

  • Prepare put the value for a key. Use the commit() method to actually submit changes.

    Parameters

    • path: Field
    • value: V

    Returns void

    Memberof

    Store

  • Prepare update the root. Use the commit() method to actually submit changes.

    Parameters

    • root: Field

    Returns void

    Memberof

    Store