FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. For more details, review the migration guide. Contact support@fauna.com with any questions. |
Database metadata
Reading or writing database documents requires an admin key. |
Solution
Set the data
field in a database:
{
ref: Database("llyr"),
ts: 1622573509680000,
name: 'llyr',
data: { env: 'test' },
global_id: 'yoiji573cydyy'
}
{'ref': Ref(id=llyr, collection=Ref(id=databases)), 'ts': 1622573512400000, 'name': 'llyr', 'data': {'env': 'test'}, 'global_id': 'yoijihdqgydyy'}
map[data:map[env:test] global_id:yoiji3uwcybyy name:llyr ref:{llyr 0xc00011da10 0xc00011da10 <nil>} ts:1622573473320000]
ObjectV(ref: RefV(id = "llyr", collection = RefV(id = "databases")),ts: LongV(1622573463870000),name: StringV(llyr),data: ObjectV(env: StringV(test)),global_id: StringV(yoijia8e1ybyy))
{
ref: Database("llyr"),
ts: 1624310577730000,
name: 'llyr',
data: { env: 'test' },
global_id: 'yoat8nnggybyy'
}
Discussion
It is not possible to revise the parent database, the current database,
or any of the current database’s peers using Update
. You can only
add metadata to the documents that describe child databases.
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!