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.update()
Learn: Databases and multi-tenancy |
---|
Update a child database's metadata and settings.
Description
Updates a child database's metadata
and settings, represented as a
Database
document, with fields
from a provided data object.
Fauna stores child databases as documents in the parent database’s
Database
system collection.
Database
documents have the DatabaseDef type.
During the update, fields from the data object are copied to the document, creating new fields or updating existing fields. The operation is similar to a merge.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
true |
Document fields for the
For supported document fields, see
The object can’t include the following metadata fields: * |
Return value
Type | Description |
---|---|
The updated |
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!