Call a function

Creating and updating a function requires:

Problem

You need to execute a function within the current database.

Solution

Use the Call function:

Copied!
(
  ('create_post'),
  [ 'First Post Title', 'This is my first blog post!' ],
)
{
  ref: (("posts"), "302044131605086720"),
  ts: 1624310580730000,
  data: { title: 'First Post Title', body: 'This is my first blog post!' }
}
Query metrics:
  •    bytesIn:   98

  •   bytesOut:  232

  • computeOps:    1

  •    readOps:    0

  •   writeOps:    1

  •  readBytes:    0

  • writeBytes:  250

  •  queryTime: 21ms

  •    retries:    0

More information

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!