Function.all()

Learn: User-defined functions

Get the Set of all accessible user-defined Function documents.

Signature

Function.all(): Set<Function>

Description

The Function.all() method returns the Set of all UDF documents.

If Function.all() is the last value in a query, the first page of the Set is returned.

Parameters

None

Return value

Type Description

Set<Function>

Set of all UDF documents in the current database. See Function document definition.

Examples

Function.all()
{
  data: [
    {
      name: "inventory",
      coll: Function,
      ts: Time("2099-04-10T17:50:39.955Z"),
      role: "server",
      body: <<-END
        (name) => {
          Product.byName(name) {
            name: .name,
            description: .description,
            quantity: .quantity
          }
          
        }
      END
    },
    {
      name: "submitOrder",
      coll: Function,
      ts: Time("2099-04-10T17:50:39.955Z"),
      ...
    }
  ]
}

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!