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. |
Functions
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Functions( [database] )
functions( [database] )
Functions( )
ScopedFunctions( database )
Functions( [database] )
Functions( [database] )
Description
The Functions
function when executed with Paginate
returns an
array of References for all user-defined functions in the database
specified. If a child database
is not specified, the returned function
references all belong to the current database.
When a child Also, Go does not support optional function parameters, nor function
overloading. To specify a child |
Parameters
Parameter | Type | Definition and Requirements |
---|---|---|
|
Reference |
Optional - A Reference to a child database. If not specified, the current database is used. A Reference to a child database. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. Optional - A Reference to a child database. If not specified, the current database is used. |
Returns
A Set Reference for the available user-defined functions in the
specified child database
(or the current database if database
is not
specified).
Examples
-
The following query lists the References for any user-defined functions (up to the pagination limit) in the current database:
{ data: [ Function("increment"), Function("double"), Function("submit_order") ] }
{'data': [Ref(id=increment, collection=Ref(id=functions)), Ref(id=double, collection=Ref(id=functions)), Ref(id=submit_order, collection=Ref(id=functions))]}
map[data:[{increment 0xc0000b71d0 0xc0000b71d0 <nil>} {double 0xc0000b72c0 0xc0000b72c0 <nil>} {submit_order 0xc0000b73b0 0xc0000b73b0 <nil>}]]
ObjectV(data: Arr(RefV(id = "increment", collection = RefV(id = "functions")), RefV(id = "double", collection = RefV(id = "functions")), RefV(id = "submit_order", collection = RefV(id = "functions"))))
{ data: [ Function("increment"), Function("double"), Function("submit_order") ] }
-
The following query lists the References for any user-defined functions (up to the pagination limit) in a child database named "child_db":
{ data: [] }
{'data': []}
map[data:[]]
ObjectV(data: Arr())
{ 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!