update()
Add the provided fields to the existing fields.
Description
The update()
method updates the Collection definition with
the given object values.
The object must have valid field names.
The method does not check for duplicate field names.
A query can’t update a collection’s definition and write to documents in the collection. Use separate queries instead.
Examples
-
View the current document:
{ id: "387120252471738436", coll: Customer, ts: Time("2024-01-16T22:51:32.170Z"), identifier: "00123" }
-
Update the current document:
{ id: "387120252471738436", coll: Customer, ts: Time("2024-01-16T23:27:32.533Z"), identifier: "00123", name: "Alex" }
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!