Skip to main content

Operations

Operations listed in this section describe the procedures that can be executed on a MongoCollection[F, T] instance. All operations return values wrapped in the effect type F[_] (typically IO for Cats Effect or Task for ZIO). Long-running queries can alternatively be consumed as a stream.

  • Indexes — Create and manage indexes for efficient querying
  • Find — Query documents with filters, sorting, pagination, and projections
  • Update — Modify existing documents with a rich set of update operators
  • Distinct — Retrieve unique field values across a collection
  • Aggregate — Build multi-stage aggregation pipelines for complex data transformations
  • Watch — Subscribe to real-time change streams
  • Transactions — Run multiple operations atomically with ACID guarantees
  • Bulk Writes — Execute mixed batches of inserts, updates, and deletes efficiently