forEach()
Iterate over all values in a Set, executing a function on each value.
Description
The forEach()
method iterates over all values in the Set and executes
the provided functionBody on each value. It is used for mutations or
writing documents based on each Set value.
Because this method scans the full set, it returns an error if there are more than 16000 documents in the set. This method can timeout for large sets under that limit.
Examples
Update all Customers documents where the first name is Carol
and the
last name is Clark
, to change the phone number to 1-555-555-1212
:
null
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!