Database.create()
Learn: Databases and multi-tenancy |
---|
Create a child database.
Signature
Database.create(data: { name: String, priority: Number | Null, typechecked: Boolean | Null, protected: Boolean | Null, data: { *: Any } | Null }) => DatabaseDef
Description
Creates a child database with the provided metadata and settings. The parent database is the database to which the query’s the authentication secret is scoped.
Using Database.create()
to create a top-level database is not supported.
Fauna stores child databases as documents in the parent database’s
Database
system collection.
Database
documents have the DatabaseDef type.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
true |
Document fields containing metadata and settings for the new
For supported document fields, see
|
Return value
Type | Description |
---|---|
The new |