Options
All
  • Public
  • Public/Protected
  • All
Menu

An interface representing a MongoDB collection accesible via the Stitch MongoDB service.

Type parameters

  • DocumentT

Hierarchy

  • RemoteMongoCollection

Index

Properties

namespace

namespace: string

Gets the namespace of this collection.

returns

the namespace

Methods

aggregate

count

deleteMany

  • deleteMany(query: object): Promise<RemoteDeleteResult>
  • Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.

    Parameters

    • query: object

      the query filter to apply the the delete operation

    Returns Promise<RemoteDeleteResult>

    a Promise containing the result of the remove many operation

deleteOne

  • deleteOne(query: object): Promise<RemoteDeleteResult>
  • Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.

    Parameters

    • query: object

      the query filter to apply the the delete operation

    Returns Promise<RemoteDeleteResult>

    a Promise containing the result of the remove one operation

find

insertMany

  • insertMany(documents: DocumentT[]): Promise<RemoteInsertManyResult>

insertOne

  • insertOne(document: DocumentT): Promise<RemoteInsertOneResult>

updateMany

  • updateMany(query: object, update: object, updateOptions?: RemoteUpdateOptions): Promise<RemoteUpdateResult>
  • Update all documents in the collection according to the specified arguments.

    Parameters

    • query: object

      a document describing the query filter, which may not be null.

    • update: object

      a document describing the update, which may not be null. The update to apply must include only update operators.

    • Optional updateOptions: RemoteUpdateOptions

      the options to apply to the update operation

    Returns Promise<RemoteUpdateResult>

    a Promise containing the result of the update many operation

updateOne

  • updateOne(query: object, update: object, updateOptions?: RemoteUpdateOptions): Promise<RemoteUpdateResult>
  • Update a single document in the collection according to the specified arguments.

    Parameters

    • query: object

      a document describing the query filter, which may not be null.

    • update: object

      a document describing the update, which may not be null. The update to apply must include only update operators.

    • Optional updateOptions: RemoteUpdateOptions

      the options to apply to the update operation

    Returns Promise<RemoteUpdateResult>

    a Promise containing the result of the update one operation

withCollectionType

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc