Class MongoDBIdGenerator

Hierarchy

  • MongoDBIdGenerator

Implements

Constructors

Properties

Methods

Constructors

Properties

conn: Connection
model: any
regex: RegExp = ...

The regex of the ID. This is used to extract the ID from instance URI and populate into the instance as instance._id.

Methods

  • Get the next ID for some specific counterName. The ID generated each time should be unique within the same countName.

    Parameters

    • counterName: string

    Returns Promise<number>

Generated using TypeDoc