Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now GA. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. Migrating from v3 of the CLI? See the CLI migration guide. |
set.take()
Examples
Get the first two documents in the Set of Product
documents:
Product.all().take(2)
{
data: [
{
id: "111",
coll: Product,
ts: Time("2099-10-22T21:56:31.260Z"),
name: "cups",
description: "Translucent 9 Oz, 100 ct",
price: 698,
stock: 100,
category: Category("123")
},
{
id: "222",
coll: Product,
ts: Time("2099-10-22T21:56:31.260Z"),
name: "donkey pinata",
description: "Original Classic Donkey Pinata",
price: 2499,
stock: 50,
category: Category("123")
}
]
}
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!