import { Collection } from "https://deno.land/x/model@v1.2/dependencies/mongo.ts";
Methods
aggregate<U = T>(pipeline: AggregatePipeline<U>[], options?: AggregateOptions): AggregateCursor<U>
deprecated
count(filter?: Filter<T>, options?: CountOptions): Promise<number>countDocuments(filter?: Filter<T>, options?: CountOptions): Promise<number>
createIndexes(options: CreateIndexOptions)
deleteMany(filter: Filter<T>, options?: DeleteOptions): Promise<number>
deleteOne(filter: Filter<T>, options?: DeleteOptions)
distinct()
drop(options?: DropOptions): Promise<void>
dropIndexes(options: DropIndexOptions)
estimatedDocumentCount(): Promise<number>
find(filter?: Filter<T>, options?: FindOptions): FindCursor<T>
findAndModify(filter?: Filter<T>, options?: FindAndModifyOptions<T>): Promise<T | undefined>
Find and modify a document in one, returning the matching document.
findOne(filter?: Filter<T>, options?: FindOptions): Promise<T | undefined>
deprecated
insert(docs: InsertDocument<T> | InsertDocument<T>[], options?: InsertOptions)insertMany(docs: InsertDocument<T>[], options?: InsertOptions): Promise<{ insertedIds: (Bson.ObjectId | Required<InsertDocument<T>>["_id"])[]; insertedCount: number; }>
insertOne(doc: InsertDocument<T>, options?: InsertOptions)