Tokens( )
The Tokens function provides access to the system collection that stores access tokens, created with the Login function. This is useful for:
- Listing currently existing tokens
{ "name": "Hybrid Cluster 1", | |
"children": [ | |
{ | |
"name": "Replica 1", | |
"children": [ | |
{"name": "Node 1", "size": 25}, | |
{"name": "Node 2", "size": 25}, | |
{"name": "Node 3", "size": 25}, | |
{"name": "Node 4", "size": 25}, | |
{"name": "Node 5", "size": 25}, |
# Recursion UDF from FaunaDB Community user | |
--- | |
Q: Is there an approved way to loop/repeat FQL an arbitrary number of times? Or generate a set/array of arbitrary size to Foreach on? | |
A: You can play with UDF to achieve it. Here is a quick idea (using recursion, careful it's max 200 iterations). | |
Calling it would be something like this Call("Repeat", ["3", "AnotherFunctionName", 0]) . | |
It's really just an example, you can mess around it to add input values if needs be, etc. | |
const Repeat = Query( |
When the FaunaDB JavaScript driver returns query results, it's exposing the the response payload, but not the response headers. However, the response headers contain query metrics you might want (e.g., read ops, write ops, transaction retires, query time, bytes in/out, storage bytes read/written, read ops).
The web shell/REPL at dashboard.fauna.com also presents this information to you through the GUI (click the "i" on left).
Here are some examples to help you get the repsonse headers