collection.where()
Learn: Documents |
---|
Get a Set of collection documents that match a provided predicate.
Description
Gets a Set of collection documents that match a provided predicate function.
If this method is the last value in a query, the first page of the Set is returned. See Pagination.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
pred |
Yes |
Anonymous predicate function that: * Accepts a collection document as its only argument. Supports shorthand-syntax. * Returns a Boolean value. The method returns collection documents for which the predicate returns true. |
Return value
Type | Description |
---|---|
Set of collection documents that match the predicate. If there are no matching documents, the Set is empty. A document’s data type is taken from its collection’s name. For example,
|