Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

database.replace()

Replaces a database’s metadata and settings.

Signature

replace(object: {*: Any}) => DatabaseDef

Description

The replace() method replaces the field values for an existing Database collection document.

Parameters

Parameter Type Required Description

object

Object

Yes

Replacement database fields.

Return value

Type Description

DatabaseDef

Database with replaced fields.

Examples

Database.byName("childDB")!.replace({name: "childDB2"})
{
  name: "childDB2",
  coll: Database,
  ts: Time("2099-06-24T21:54:13.225Z"),
  global_id: "ysjpyeykhyyr4"
}

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!