Functions​

This page documents how to define custom functions, however EdgeDB provides a large library of built-in functions and operators. These are documented in Standard Library.

Functions are ways to transform one set of data into another.

User-defined Functions​

It is also possible to define custom functions. For example, consider a function that adds an exclamation mark '!' at the end of the string:

  1. function exclamation(word: str) -> str
  2. using (word ++ '!');

This function accepts a str as an argument and produces a str as output as well.

  1. select exclamation({'Hello', 'World'});
  1. {'Hello!', 'World!'}

See also

SDL > Functions

DDL > Functions

Reference > Function calls

Introspection > Functions

Cheatsheets > Functions