Base class for bridge stores.

Hierarchy (view full)

Constructors

Properties

db: Nedb<any>

Methods

  • Convenience method to convert a document to something.

    Type Parameters

    • T

    • O

    Parameters

    • func: ((input) => O)

      The function which will be called with a single document object. Guaranteed not to be null.

        • (input): O
        • Parameters

          • input: T

          Returns O

    Returns ((doc) => O)

    A transformFn function to pass to the standard select/delete/upsert/etc methods.

      • (doc): O
      • Parameters

        • doc: T

        Returns O

  • Set a UNIQUE key constraint on the given field.

    Parameters

    • fieldName: string

      The field name. Use dot notation for nested objects.

    • sparse: boolean = false

      Allow sparse entries (undefined won't cause a key violation).

    Returns void

  • UPDATE a single document. If the document already exists, this will NOT update it.

    Parameters

    • query: Query
    • updateVals: Record<string, unknown>

    Returns Promise<void>

Generated using TypeDoc