find
inline suspend fun <T> MongoCollection<T>.find(filter: BsonDocument? = null, projection: BsonDocument? = null, sort: BsonDocument? = null, limit: Long? = null): List<T>
Retrieve multiple object from the remote collection.
Return
the result of the remote find
invocation deserialized into a list of T-instances.
Parameters
filter
a filter to select specific documents. If null
then no filtering will be done.
projection
a BsonDocument that describes which fields that are returned from the server. If null
then all fields will be returned.
sort
a document describing one or more fields used to sort documents before selecting the single document to return. If null
then no sorting will be applied.
limit
an upper bound of the number of documents to consider. If null
then no limit is applied.
Throws
if the underlying App Service HTTP requests fails.
SerializationException
if App Service response could not be deserialized to List<T>
.