All Downloads are FREE. Search and download functionalities are using the official Maven repository.

utility.MongoCollection.kt Maven / Gradle / Ivy

package com.github.fluidsonic.baku

import com.github.fluidsonic.fluid.mongo.*
import com.mongodb.client.model.Filters.eq
import com.mongodb.client.model.FindOneAndUpdateOptions
import org.bson.conversions.Bson


suspend fun  MongoCollection.findOneByIdAndUpdate(
	id: Any,
	update: Bson,
	options: FindOneAndUpdateOptions = FindOneAndUpdateOptions()
) =
	findOneAndUpdate(
		filter = eq("_id", id),
		update = update,
		options = options
	)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy