update()

Update an database field.

Signature

update(object: {*: Any}): DatabaseDef

Description

The update() replaces the value of the given database object fields with the given object values. The object must provide valid field names.

Parameters

Parameter Type Required Description

object

Object

Yes

New database field values.

Return value

Type Description

DatabaseDef

Database definition with updated fields.

Examples

Database.byName("DemoChildDB")!.update({typechecked: false})
{
  name: "DemoChildDB",
  coll: Database,
  ts: Time("2023-11-09T09:51:56.480Z"),
  typechecked: false,
  global_id: "yirw85d1wyyrn"
}

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!