Properties

Link copied to clipboard
abstract val context: ERROR CLASS: Symbol not found for BsonContext

Functions

Link copied to clipboard

Start an aggregation pipeline.

Link copied to clipboard
abstract 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
abstract fun count(): Long

Counts how many documents exist in the collection.

abstract fun count(options: ERROR CLASS: Symbol not found for CountOptions<Document>.() -> Unit, predicate: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit): Long

Counts how many documents match predicate in the collection.

Link copied to clipboard
abstract fun countEstimated(): Long

Counts all documents in the collection.

Link copied to clipboard
abstract 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
abstract fun deleteOne(options: ERROR CLASS: Symbol not found for DeleteOneOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit)

Deletes the first document found that matches filter.

Link copied to clipboard
abstract fun drop(options: ERROR CLASS: Symbol not found for DropOptions<Document>.() -> Unit)

Removes an entire collection from the database.

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
abstract fun find(): MongoIterable<Document>

Finds all documents in this collection.

abstract fun find(options: ERROR CLASS: Symbol not found for FindOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit): MongoIterable<Document>

Finds all documents in this collection that satisfy filter.

Link copied to clipboard
open fun findOne(options: ERROR CLASS: Symbol not found for FindOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit): Document?

Finds a document in this collection that satisfies filter.

Link copied to clipboard
abstract 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?

Updates one element that matches filter according to update and returns it, atomically.

Link copied to clipboard
open fun insertMany(vararg documents: Document, options: ERROR CLASS: Symbol not found for InsertManyOptions<Document>.() -> Unit)
abstract 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
abstract fun insertOne(document: Document, options: ERROR CLASS: Symbol not found for InsertOneOptions<Document>.() -> Unit)

Inserts a document.

Link copied to clipboard
abstract fun replaceOne(options: ERROR CLASS: Symbol not found for ReplaceOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, document: Document)

Replaces a document that matches filter by document.

Link copied to clipboard
abstract fun repsertOne(options: ERROR CLASS: Symbol not found for ReplaceOptions<Document>.() -> Unit, filter: ERROR CLASS: Symbol not found for FilterQuery<Document>.() -> Unit, document: Document)

Replaces a document that matches filter by document.

Link copied to clipboard
abstract 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)

Updates all documents that match filter according to update.

Link copied to clipboard
abstract 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)

Updates all documents that match filter according to the update pipeline.

Link copied to clipboard
abstract fun updateOne(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)

Updates a single document that matches filter according to update.

Link copied to clipboard
abstract 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)

Updates a single document that matches filter according to the update pipeline.

Link copied to clipboard
abstract fun upsertOne(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 UpsertQuery<Document>.() -> Unit)

Updates a single document that matches filter according to update.

Link copied to clipboard
abstract 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)

Updates a single document that matches filter according to the update pipeline.