Functions
Introduction
Functions provide powerful abstractions of query logic. They are a cornerstone of the functional query programming model, and generalize logic programs à la Datalog. Functions calls can be nested, recursive, and negated. There syntax natively embeds into TypeQL’s declarative pattern language.
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 |