Collection.firstWhere()
| Learn: Collections |
|---|
Get the first collection definition that matches a provided predicate.
Description
Gets the first collection definition,
represented as a Collection
document, that matches a provided
predicate function.
Collection documents are FQL versions of a database’s FSL
collection schema. Collection documents
have the CollectionDef type. See
Collections.
Staged schema
If a database has staged schema, this method interacts with the database’s staged schema, not the active schema.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pred |
Yes |
Anonymous predicate function that:
The method returns the first |