create()
Create a document in the collection.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
Yes |
Object describing the document properties and values. |
data fields
Name | Type | Required | Description |
---|---|---|---|
id |
Document identifier. If id is not provided, the document id is assigned by Fauna. The id must be a 64-bit unsigned integer. Setting id to a negative value
causes a The id can be a Number type or a String type provided it can
be coerced to an integer that is in the range 253-1. A
The |
||
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. |
Examples
{
id: "357102606290518049",
coll: Product,
ts: Time("2099-02-19T14:53:53.940Z"),
name: "key limes"
}
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!