Create a child database

Reading or writing database documents requires an admin key.

Problem

You need to create a child database.

Solution

Use the CreateDatabase function:

Copied!
({ name: 'annuvin' })
{
  ref: ("annuvin"),
  ts: 1624310575420000,
  name: 'annuvin',
  global_id: 'yoat8nnggybyy'
}
Query metrics:
  •    bytesIn:   49

  •   bytesOut:  154

  • computeOps:    1

  •    readOps:    0

  •   writeOps:    1

  •  readBytes:   20

  • writeBytes:  473

  •  queryTime: 40ms

  •    retries:    0

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.

More information

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!