AccessProviders

AccessProviders( )
AccessProviders( )
AccessProviders( )
AccessProviders( )
access_providers( )
AccessProviders( )
AccessProviders( )

Description

The AccessProviders function, when executed with Paginate, returns an array of References for all AccessProviders in the specified child database. If a child database is not specified, the returned index references all belong to the current database.

Parameters

None.

Returns

A Set Reference for the available AccessProviders in the specified child database (or the current database if database is not specified).

Examples

The following query gets the references to all AccessProviders in the current database:

try
{
    Value result = await client.Query(
        Paginate(AccessProviders())
    );

    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
ObjectV(data: Arr(RefV(id = "Auth0-myapp", collection = RefV(id = "access_providers"))))
result, err := client.Query(
	f.Paginate(f.AccessProviders()))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
map[data:[{Auth0-myapp 0xc0001084e0 0xc0001084e0 <nil>}]]
System.out.println(
    client.query(
        Paginate(AccessProviders())
    ).get());
{data: [ref(id = "Auth0-myapp", collection = ref(id = "access_providers"))]}
client.query(
  q.Paginate(q.AccessProviders())
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
{ data: [ AccessProvider("Auth0-myapp") ] }
result = client.query(
    q.paginate(q.access_providers())
)
print(result)
{'data': [Ref(id=Auth0-myapp, collection=Ref(id=access_providers))]}
try {
  println(Await.result(
    client.query(Paginate(AccessProviders())),
    5.seconds
  ))
} catch {
  case unknown: Throwable => println("Error: " + unknown.getMessage())
}
{data: [ref(id = "Auth0-myapp", collection = ref(id = "access_providers"))]}
Paginate(AccessProviders())
{ data: [ AccessProvider("Auth0-myapp") ] }

The following query demonstrates what happens when no AccessProviders exist:

try
{
    Value result = await client.Query(
        Paginate(AccessProviders())
    );

    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
ObjectV(data: Arr())
result, err := client.Query(
	f.Paginate(f.AccessProviders()))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
map[data:[]]
System.out.println(
    client.query(
        Paginate(AccessProviders())
    ).get());
{data: []}
client.query(
  q.Paginate(q.AccessProviders())
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
{ data: [] }
result = client.query(
    q.paginate(q.access_providers())
)
print(result)
{'data': []}
try {
  println(Await.result(
    client.query(Paginate(AccessProviders())),
    5.seconds
  ))
} catch {
  case unknown: Throwable => println("Error: " + unknown.getMessage())
}
{data: []}
Paginate(AccessProviders())
{ data: [] }

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!