FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard. For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions. |
Create a document
Solution
Use the Create
function:
{
ref: Ref(Collection("dilapidated_huts"), "300223085354680832"),
ts: 1622573895720000,
data: { material: 'straw' }
}
{'ref': Ref(id=300223090590220800, collection=Ref(id=dilapidated_huts, collection=Ref(id=collections))), 'ts': 1622573900720000, 'data': {'material': 'straw'}}
map[data:map[material:straw] ref:{300223005074653696 0xc000180570 0xc000180570 <nil>} ts:1622573819180000]
ObjectV(ref: RefV(id = "300222988909806080", collection = RefV(id = "dilapidated_huts", collection = RefV(id = "collections"))),ts: LongV(1622573803740000),data: ObjectV(material: StringV(straw)))
{ref: ref(id = "300223068194734592", collection = ref(id = "dilapidated_huts", collection = ref(id = "collections"))), ts: 1622573879370000, data: {material: "straw"}}
{
ref: Ref(Collection("dilapidated_huts"), "302044124774662656"),
ts: 1624310574250000,
data: { material: 'straw' }
}
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!