Functions
Introduction
Functions provide powerful abstractions of query logic, and a cornerstone of the functional database programming model. Functions calls can be nested, recursive, negated, and they natively embed into TypeQL’s declarative patterns.
Function types
The following table illustrates the types of functions based on two dimensions: number of rows and number of columns returned.
Single output type | Tuple of output types | |
---|---|---|
output up to 1 row |
scalar function type signature returns single |
tuple function type signature returns tuple |
output multiple rows |
(scalar) stream function type signature returns stream |
(tuple) stream function type signature returns stream |