Class MongoStore<V>

Store based on MongoDB

Implements

Type Parameters

  • V

Hierarchy

  • MongoStore

Implements

Constructors

  • Creates an instance of MongoStore.

    Memberof

    MongoStore

    Type Parameters

    • V

    Parameters

    • db: Connection
    • eltTyp: Provable<V>
    • smtName: string

    Returns MongoStore<V>

Properties

db: Connection
eltTyp: Provable<V>
nodesModel: Model<IKV, {}, {}, {}, any>
nodesOperationCache: any[]
valuesModel: Model<IKV, {}, {}, {}, any>
valuesOperationCache: any[]

Methods

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

    Returns

    {Promise}

    Memberof

    MongoStore

    Returns Promise<void>

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

    Returns

    {Promise<Field[]>}

    Memberof

    MongoStore

    Parameters

    • key: Field

    Returns Promise<Field[]>

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

    Returns

    {Promise}

    Memberof

    MongoStore

    Returns Promise<Field>

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

    Returns

    {Promise}

    Memberof

    MongoStore

    Parameters

    • path: Field

    Returns Promise<V>

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

    Returns

    {Promise<Map<string, V>>}

    Memberof

    MongoStore

    Returns Promise<Map<string, V>>

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

    Memberof

    MongoStore

    Parameters

    • path: Field

    Returns void

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

    Memberof

    MongoStore

    Parameters

    • key: Field
    • value: Field[]

    Returns void

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

    Memberof

    MongoStore

    Parameters

    • path: Field
    • value: V

    Returns void

  • Protected

    Convert value string to a value of FieldElements type.

    Returns

    {V}

    Memberof

    MongoStore

    Parameters

    • valueStr: string
    • eltTyp: Provable<V>

    Returns V

  • Protected

    Serialize the value of the FieldElements type into a string

    Returns

    {string}

    Memberof

    RocksStore

    Parameters

    • value: V

    Returns string

Generated using TypeDoc