Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MongoCollection

Index

Constructors

constructor

Properties

Private collectionName

collectionName: string

Private Optional model

model: Model

Private mongo

Methods

aggregate

  • aggregate(pipeline: any[], options?: CollectionAggregationOptions): Promise<AggregationCursor>

countDocuments

  • countDocuments(filter?: any, options?: MongoCountPreferences): Promise<number>

deleteMany

  • deleteMany(filter?: any, options?: CommonOptions): Promise<DeleteWriteOpResultObject>

deleteOne

  • deleteOne(filter?: any, options?: CommonOptions): Promise<DeleteWriteOpResultObject>

distinct

  • distinct(key: string, filter?: any, options?: undefined | object): Promise<any>

find

  • find(filter?: any, options?: FindOneOptions): Promise<Cursor>

findOne

  • findOne(filter?: any, options?: FindOneOptions): Promise<any>

insertMany

  • insertMany(data: any[], options?: CollectionInsertManyOptions): Promise<InsertWriteOpResult>

insertOne

  • insertOne(data: any, options?: CollectionInsertManyOptions): Promise<InsertOneWriteOpResult>

updateMany

  • updateMany(filter?: any, update: any, options?: UpdateManyOptions): Promise<UpdateWriteOpResult>
  • Parameters

    • Default value filter: any = {}
    • update: any
    • Optional options: UpdateManyOptions

    Returns Promise<UpdateWriteOpResult>

updateOne

  • updateOne(filter?: any, update: any, options?: UpdateManyOptions): Promise<UpdateWriteOpResult>
  • Parameters

    • Default value filter: any = {}
    • update: any
    • Optional options: UpdateManyOptions

    Returns Promise<UpdateWriteOpResult>

Generated using TypeDoc