MongoDB
Suppose you have the Book entity.
And you need to filter by the author and the title. You can create an instance of the Criteria class and define the filters with the values.
This instance of the Criteria class will filter by books with title that contains the "Kotlin" word and by the author "Svetlana Isakova"
To perform a query using this criteria you will need to create a MongoDB connection with the Koltin coroutine MongoDB driver.
Get the books collection and apply the criteria to a FindFlow
with a CriteriaMongoDbFindFlowAdapter
instance.
If you have a FieldMap
you can add it into the CriteriaMongoDbFindFlowAdapter
constructor.
Last updated