Create a child database
Reading or writing database documents requires an admin key. |
Solution
Use the CreateDatabase
function:
map[global_id:yoiji3uwcybyy name:annuvin ref:{annuvin 0xc0001804b0 0xc0001804b0 <nil>} ts:1622573470750000]
{
ref: Database("annuvin"),
ts: 1622573508720000,
name: 'annuvin',
global_id: 'yoiji573cydyy'
}
{'ref': Ref(id=annuvin, collection=Ref(id=databases)), 'ts': 1622573511610000, 'name': 'annuvin', 'global_id': 'yoijihdqgydyy'}
{
ref: Database("annuvin"),
ts: 1624310575420000,
name: 'annuvin',
global_id: 'yoat8nnggybyy'
}
Discussion
It is not possible to create parent or peer databases with the
CreateDatabase
function; you can only create a child database in
the current database.
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!