We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evaluate
What does evaluate do when no results are found?
Ideally, I'd like it to call the lambda with an empty sequence:
myCollection.find(…).evaluate { println(isEmpty()) // prints 'true' }
In case this is the current behavior, would it be possible to add a sentence to make it clear in evaluate's documentation?
The text was updated successfully, but these errors were encountered:
Kotlin sequences (https://kotlinlang.org/docs/sequences.html) do not have isEmpty() method but you can write
col.find().evaluate { println(count() == 0) // prints 'true' }
HTH
Sorry, something went wrong.
Is it possible to make it clear in evaluate's documentation?
What would you like to add to the current doc? https://litote.org/kmongo/dokka/kmongo/org.litote.kmongo/com.mongodb.client.-mongo-iterable/evaluate.html
“Evaluates the current MongoIterable given the expression of Sequences, including when it is empty.” or similar.
At least this way it's clear that it's an intended behavior and it won't go away in the future.
No branches or pull requests
What does
evaluate
do when no results are found?Ideally, I'd like it to call the lambda with an empty sequence:
In case this is the current behavior, would it be possible to add a sentence to make it clear in
evaluate
's documentation?The text was updated successfully, but these errors were encountered: