x/denomongo_unittest_utils/deps.ts

Unittest utilities for deno_mongo
Latest
class Collection
import { Collection } from "https://deno.land/x/denomongo_unittest_utils@v0.5.3/deps.ts?s=Collection";

Constructors

new
Collection(
protocol: WireProtocol,
dbName: string,
name: string,
)
[src]

Methods

aggregate<U = T>(pipeline: AggregatePipeline<U>[], options?: AggregateOptions): AggregateCursor<U>[src]
deprecated
count(filter?: Filter<T>, options?: CountOptions): Promise<number>
[src]
countDocuments(filter?: Filter<T>, options?: CountOptions): Promise<number>[src]
createIndexes(options: CreateIndexOptions)[src]
deleteMany(filter: Filter<T>, options?: DeleteOptions): Promise<number>[src]
deleteOne(filter: Filter<T>, options?: DeleteOptions)[src]
distinct(
key: string,
query?: Filter<T>,
options?: DistinctOptions,
)
[src]
drop(options?: DropOptions): Promise<void>[src]
dropIndexes(options: DropIndexOptions)[src]
estimatedDocumentCount(): Promise<number>[src]
find(filter?: Filter<T>, options?: FindOptions): FindCursor<T>[src]
findAndModify(filter?: Filter<T>, options?: FindAndModifyOptions<T>): Promise<T | undefined>[src]

Find and modify a document in one, returning the matching document.

findOne(filter?: Filter<T>, options?: FindOptions): Promise<T | undefined>[src]
deprecated
insert(docs: InsertDocument<T> | InsertDocument<T>[], options?: InsertOptions)
[src]
insertMany(docs: InsertDocument<T>[], options?: InsertOptions): Promise<{ insertedIds: (Bson.ObjectId | Required<InsertDocument<T>>["_id"])[]; insertedCount: number; }>[src]
insertOne(doc: InsertDocument<T>, options?: InsertOptions)[src]
listIndexes()[src]
replaceOne(
filter: Filter<T>,
replacement: InsertDocument<T>,
options?: UpdateOptions,
)
[src]
updateMany(
filter: Filter<T>,
doc: UpdateFilter<T>,
options?: UpdateOptions,
)
[src]
updateOne(
filter: Filter<T>,
update: UpdateFilter<T>,
options?: UpdateOptions,
)
[src]