operation

open suspend fun <R> operation(fn: suspend MongoCollection<T>.() -> R): Result<R>(source)

Runs an operation on this collection.

Does not guarantee ACID. For that, see dev.stashy.kongo.transaction.

Return

Result.Failure if an exception occurs, otherwise Result.