MongoCollection
interface MongoCollection<Document : Any> : FindOperations<Document> , CountOperations<Document> , UpdateOperations<Document> , DeleteOperations<Document> , CollectionOperations<Document> , InsertOperations<Document> , AggregationOperations<Document> , UpdatePipelineOperations<Document> (source)
Methods to interact with a MongoDB collection.
Operations
External resources
Inheritors
Properties
Functions
Link copied to clipboard
Start an aggregation pipeline.
Link copied to clipboard
abstract suspend fun bulkWrite(options: ERROR CLASS: Symbol not found for BulkWriteOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, operations: ERROR CLASS: Symbol not found for BulkWrite<Document>.() -> Unit)
Performs multiple update operations in a single request.
Link copied to clipboard
Link copied to clipboard
Counts all documents in the collection.
Link copied to clipboard
abstract suspend fun deleteMany(options: ERROR CLASS: Symbol not found for DeleteManyOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit)
Deletes all documents that match filter.
Link copied to clipboard
fun <Document : Any> MongoCollection<Document>.filter(filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit): MongoCollection<Document>
Returns a filtered collection that only contains the elements that match filter.
Link copied to clipboard
Link copied to clipboard
abstract suspend fun findOneAndUpdate(options: ERROR CLASS: Symbol not found for UpdateOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, update: ERROR CLASS: Symbol not found for UpdateQuery<Document>.() -> Unit): Document?
Link copied to clipboard
open suspend fun insertMany(vararg documents: Document, options: ERROR CLASS: Symbol not found for InsertManyOptions<Document>.() -> Unit)
abstract suspend fun insertMany(documents: Iterable<Document>, options: ERROR CLASS: Symbol not found for InsertManyOptions<Document>.() -> Unit)
Inserts multiple documents in a single operation.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract suspend fun updateMany(options: ERROR CLASS: Symbol not found for UpdateOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, update: ERROR CLASS: Symbol not found for UpdateQuery<Document>.() -> Unit)
Link copied to clipboard
abstract suspend fun updateManyWithPipeline(options: ERROR CLASS: Symbol not found for UpdateOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, update: ERROR CLASS: Symbol not found for UpdateWithPipelineQuery<Document>.() -> Unit)
Link copied to clipboard
abstract suspend fun updateOneWithPipeline(options: ERROR CLASS: Symbol not found for UpdateOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, update: ERROR CLASS: Symbol not found for UpdateWithPipelineQuery<Document>.() -> Unit)
Link copied to clipboard
abstract suspend fun upsertOneWithPipeline(options: ERROR CLASS: Symbol not found for UpdateOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, update: ERROR CLASS: Symbol not found for UpdateWithPipelineQuery<Document>.() -> Unit)