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("childDB")!.update({typechecked: false})
{
  name: "childDB",
  coll: Database,
  ts: Time("2099-06-24T21:58:19.346Z"),
  priority: 10,
  global_id: "ysjpykbahyyr1",
  typechecked: false
}

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!