create()
Create a document in the collection.
Description
Creates a document in the collection with the provided property values.
Returns the created document.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
Yes |
Object describing the document properties and values. |
data fields
Name | Type | Required | Description |
---|---|---|---|
ttl |
Timestamp indicating when to remove the document.
When the document is removed it ceases to exist and temporal queries
can’t recover the document. |
||
id |
By default, the document |
Examples
{
id: "357102606290518049",
coll: Letter,
ts: Time("2023-02-19T14:53:53.940Z"),
name: "Q"
}
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!