Token.where()
Get the Set of accessible Tokens in the database.
Signature
Token.where(predicate: () => Boolean)) => Set<Token>
Token.where(predicate: (val: Token) => Boolean)) => Set<Token>
Description
Each Token in a Fauna database is represented by a Token
object. The Token.where()
method gets the Set of accessible Token
objects that match the predicate function.
If Token.where()
is the last value in a query, the first page
of the Set is returned.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
predicate |
An anonymous function that compares values in each |
Return value
Type | Description |
---|---|
Set representing the documents that match the predicate function. If this
method is the last value in a query, the method returns the first page of the
|
Examples
Token.where(.document.id == "111")
{
data: [
{
id: "401670938431586381",
coll: Token,
ts: Time("2099-08-14T23:54:00.750Z"),
document: Customer("111")
},
...
]
}
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!