MongoDB request DSL • opensavvy.ktmongo.dsl.options • WithReadPreference • readPreference
readPreference¶
open fun readPreference(concern: ReadPreference)
Specifies the ReadPreference
for this operation.
collections.find(
options = {
readPreference(ReadPreference.SecondaryPreferred)
}
) {
User::name eq "David"
}