Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Functions

An invocation of a built-in function may appear in any expression. A function takes zero or more positional arguments and always produces a single output value. There are no named function parameters.

A declared function whose name conflicts with a built-in function name overrides the built-in function.

Functions are generally polymorphic and can be called with values of varying type as their arguments. When type errors occur, functions will return structured errors reflecting the error.

Note

Static type checking of function arguments and return values is not yet implemented in SuperSQL but will be supported in a future version.

Throughout the function documentation, expected parameter types and the return type are indicated with type signatures having the form

<name> ( [ <formal> : <type> ] [ , <formal> : <type> ] ) -> <type>

where <name> is the function name, <formal> is an identifier representing the formal name of a function parameter, and <type> is either the name of an actual type or a documentary pseudo-type indicating categories defined as follows: