Package com.darkcollective.relix.symbol.function
All function symbols implement
FunctionSymbol, which extends
Symbol.
There are two implementations.
ScalarFunctionSymbol takes zero
or more scalar arguments and returns a single scalar value;
RelationFunctionSymbol is a
table-valued function, whose body is a relational-algebra expression and whose
result is a relation.
Overloading
Function overloading is supported. The uniqueness key for a function in the
symbol table is the triple (namespace, canonicalName, parameterSignature),
where parameterSignature is the ordered list of parameter
ScalarTypes. Two functions with
the same name but different arities or parameter types are considered distinct
overloads and may coexist in the same namespace.
Builder pattern
ScalarFunctionSymbol exposes a
builder to reduce construction verbosity, particularly for functions with many
optional attributes. Sensible defaults are applied for every optional field so
that a minimal built-in can be expressed in a few lines.
-
ClassDescriptionSealed sub-interface of
Symbolfor all function-typed symbols.A table-valued function symbol — a relation-returning user-defined function.Fluent builder forRelationFunctionSymbol.A scalar function symbol — a function that accepts zero or more scalar arguments and returns a single scalar value.Fluent builder forScalarFunctionSymbol.