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.
It is also possible to define custom functions. For example, consider
a function that adds an exclamation mark '!'
at the end of the
string:
function exclamation(word: str) -> str
using (word ++ '!');
This function accepts a str
as an argument and produces a
str
as output as well.
test>
select exclamation({'Hello', 'World'});
{'Hello!', 'World!'}
We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.