Dalmart
    Preparing search index...

    Represents an IZDatabase object that connects to mongodb.

    Implements

    Index

    Constructors

    Accessors

    • get $database(): string

      Gets the connection database.

      Returns string

      The connection database.

    • get $url(): string

      Gets the connection url.

      Returns string

      The connection host.

    Methods

    • Inserts many documents in the database.

      Type Parameters

      • T

      Parameters

      • source: string

        The source to create into.

      • template: T[]

        The template documents.

      Returns Promise<T[]>

      A list of matching documents that have been inserted into the database.

    • Deletes documents from the database.

      Parameters

      • source: string

        The source to delete from.

      • Optionalscope: IZFilter

        The scope of data to delete.

      Returns Promise<number>

      The total number of documents deleted.

    • Updates fields in the database.

      Type Parameters

      • T

      Parameters

      • source: string

        The source to update.

      • template: Partial<T>

        The partial template that contains the fields to update.

      • Optionalscope: IZFilter

        The scope to filter to. If this is undefined, then all documents are updated.

      Returns Promise<number>

      The total number of documents updated.