Instance Methodmongokitten 7.9.5Meow
deleteAll(where:writeConcern:)
Non type-checked API that deletes all entities in this collection matching the filter
parameter.
@discardableResult func deleteAll(where filter: Document, writeConcern: WriteConcern? = nil) async throws -> DeleteReply
Returns
A DeleteReply
containing information about the (partial) success of this query
try await users.deleteAll(where: "age" < 18)
Other members in extension
Instance members
func deleteAll<Q>(where: Q, writeConcern: WriteConcern?
) async throws -> DeleteReply Non type-checked API that deletes all entities in this collection matching the
filter
parameter.func deleteOne(where: Document, writeConcern: WriteConcern?
) async throws -> DeleteReply Non type-checked API that deletes (up to) one entity in this collection matching the
filter
parameter.func deleteOne<Q>(where: Q, writeConcern: WriteConcern?
) async throws -> DeleteReply Non type-checked API that deletes (up to) one entity in this collection matching the
filter
parameter.func insert(M, writeConcern: WriteConcern?
) async throws -> InsertReply func insertMany([M], writeConcern: WriteConcern?
) async throws -> InsertReply func upsert(M
) async throws -> UpdateReply