Keys
Keys( [database] )
Keys( [database] )
Keys( [database] )
Keys( [database] )
keys( [database] )
Keys( [database] )
Description
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
Optional - A reference to a child database. If not specified, the current database is used. |
Returns
A Set reference for the available authentication keys in the
specified child database
(or the current database if database
is not
specified).
Examples
The following query gets the references to all keys in the current database:
try
{
Value result = await client.Query(
Paginate(Keys())
);
Console.WriteLine(result);
}
catch (Exception e)
{
Console.WriteLine($"ERROR: {e.Message}");
}
ObjectV(data: Arr(RefV(id = "1", collection = RefV(id = "keys")), RefV(id = "2", collection = RefV(id = "keys"))))
result, err := client.Query(
f.Paginate(f.Keys()))
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {
fmt.Println(result)
}
map[data:[{1 0xc0001480c0 0xc0001480c0 <nil>} {2 0xc0001481b0 0xc0001481b0 <nil>}]]
System.out.println(
client.query(
Paginate(Keys())
).get());
{data: [ref(id = "1", collection = ref(id = "keys")), ref(id = "2", collection = ref(id = "keys"))]}
client.query(
q.Paginate(q.Keys())
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
{ data: [ Ref(Keys(), "1"), Ref(Keys(), "2") ] }
result = client.query(
q.paginate(q.keys())
)
print(result)
{'data': [Ref(id=1, collection=Ref(id=keys)), Ref(id=2, collection=Ref(id=keys))]}
try {
println(Await.result(
client.query(
Paginate(Keys())
),
5.seconds
))} catch {
case unknown: Throwable => println("Error: " + unknown.getMessage())
}
{data: [ref(id = "1", collection = ref(id = "keys")), ref(id = "2", collection = ref(id = "keys"))]}
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's Discourse forums
or email docs@fauna.com
Thank you for your feedback!