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:
Copy
function exclamation(word: str) -> str
using (word ++ '!');
This function accepts a str
as an argument and produces a
str
as output as well.
Copy
test>
select exclamation({'Hello', 'World'});
{'Hello!', 'World!'}