Options
All
  • Public
  • Public/Protected
  • All
Menu
description

The main service of the Accounts module.

since

v0.2.0

Hierarchy

  • OperationsService

Index

Constructors

Methods

  • This method executes a count query using the {@link model} argument.

    Caution: Count queries require a considerable amount of RAM to execute. It is preferred to use pro-active statistics with collections that contain one document with a counter.

    Parameters

    Returns Promise<number>

    The number of matching transactions.

  • This method creates or updates a document in the operations collection.

    async

    Parameters

    • query: OperationQuery

      The query configuration with sort, order, pageNumber, pageSize.

    • data: OperationModel

      The fields or data that has to be updated (will be added to $set: {}).

    • ops: Record<string, any> = {}

      The operations that must be run additionally (e.g. $inc: {}) (optional).

    Returns Promise<OperationDocument>

    The updated operations document.

  • Method to query the existence of a document in the operations collection.

    This executes a lean mongoose query such that the properties of the returned document are reduced to only the "_id" field.

    Parameters

    • query: OperationQuery

      The query configuration with sort, order, pageNumber, pageSize.

    Returns Promise<boolean>

    Whether a document exists which validates the passed query.

Generated using TypeDoc