Indexes

Indexes( [database] )
Indexes( [database] )
Indexes( [database] )
Indexes( [database] )
indexes( [database] )
indexes [database]
Indexes( [database] )
Indexes( [database] )

Description

The Indexes function when executed with Paginate returns an array of Refs for all indexes in the database specified. If no database is provided, it returns an array of references to all indexes in the current database.

Parameters

Argument Type Definition and Requirements

database

Ref

Optional - The target database.

Returns

A schema set reference.

Examples

The query below gets the references to all indexes in the current database.

curl https://db.fauna.com/ \
    -u fnAChGwBcAACAO70ziE0cfROosNJHdgBmJU1PgpL: \
    -d '{ "paginate": { "indexes": null } }'
client.Query(Paginate(Indexes()));
System.out.println(client.query(Paginate(Indexes())).get());
result, _ := client.Query(f.Paginate(f.Indexes()))

fmt.Println(result)
client.query(Paginate(Indexes()))
client.query(q.paginate(q.indexes()))
$client.query do
  paginate indexes
end
client.query(Paginate(Indexes()))
client.query(q.Paginate(q.Indexes()))
  .then((ret) => console.log(ret))
HTTP/1.1 200 OK
{ "resource": [{ "@ref": "indexes/spells_by_element" }] }
[{ "@ref": "indexes/spells_by_element" }]
[ref(id = "spells_by_element", collection = ref(id = "indexes"))]
[{spells_by_element 0xc4202d0fa0 <nil>}]
[{ "@ref": "indexes/spells_by_element" }]
[{ "@ref": "indexes/spells_by_element" }]
[{ "@ref": "indexes/spells_by_element" }]
[{ "@ref": "indexes/spells_by_element" }]
[Ref(id=spells_by_element, collection=Ref(id=indexes))]

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!