FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. For more details, review the migration guide. Contact support@fauna.com with any questions. |
Indexes
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Indexes( [database] )
Description
The Indexes
function, when executed with Paginate
, returns an
array of References for all indexes in the specified child database
.
If a child database
is not specified, the returned index references
all belong to the current database.
Parameters
Parameter | Type | Definition and Requirements |
---|---|---|
|
Reference |
Optional - A Reference to a child database. If not specified, the current database is used. |
Returns
A Set Reference for the available indexes in the specified child
database
(or the current database if database
is not specified).
Examples
-
The following query lists the References for any indexes (up to the pagination limit) in the current database:
{ data: [ Index("spells_by_element"), Index("spellbooks_by_owner"), Index("spells_by_spellbook"), Index("spells_by_element_and_name"), Index("elements_of_spells"), Index("letters"), Index("people_by_age_first"), Index("people_by_last_first"), Index("users_by_email"), Index("products_by_customer"), Index("products_by_store"), Index("inventory_by_product"), Index("products_by_price_high_to_low"), Index("products_by_price_low_to_high"), Index("all_customers"), Index("all_orders"), Index("all_products"), Index("all_stores") ] }
-
The following query lists the References for any indexes (up to the pagination limit) in a child database named "child_db":
{ data: [] }
-
The following query demonstrates what happens when no indexes exist:
{ data: [] }
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!