import { mongo } from "https://deno.land/x/hex@0.5.15/src/data/deps.ts";
const { Collection } = mongo;
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: (ObjectId | Required<InsertDocument<T>>["_id"])[]; insertedCount: number; }>
insertOne(doc: InsertDocument<T>, options?: InsertOptions)