Interface FunctionSymbol
- All Superinterfaces:
Symbol
- All Known Implementing Classes:
RelationFunctionSymbol,ScalarFunctionSymbol
public sealed interface FunctionSymbol
extends Symbol
permits ScalarFunctionSymbol, RelationFunctionSymbol
Sealed sub-interface of
Symbol for all function-typed symbols.
A function symbol describes a callable entity: its parameter list, return type, optimizer hints, and (for user-defined functions) an optional body expression.
Function overloading is supported. Two FunctionSymbol instances
with the same Symbol.namespace() and Symbol.canonicalName() are considered
distinct overloads if and only if their parameterSignature() lists
differ.
Two implementations exist: ScalarFunctionSymbol (scalar-valued) and
RelationFunctionSymbol (relation-valued / table-valued).
-
Method Summary
Modifier and TypeMethodDescriptionThe ordered list of typed, named parameters.default List<ScalarType> The ordered list of parameter types, derived fromparameters().The set of optimizer hint flags declared for this function.The scalar type of the value this function returns.Methods inherited from interface com.darkcollective.relix.symbol.Symbol
canonicalName, declaredName, namespace, provenance, shadowPolicy
-
Method Details
-
parameters
List<ParameterDefinition> parameters()The ordered list of typed, named parameters.- Returns:
- parameter definitions; never null, may be empty for zero-argument functions
-
returnType
ScalarType returnType()The scalar type of the value this function returns.Meaningful only for a
ScalarFunctionSymbol; aRelationFunctionSymbolreturns a whole relation (seeRelationFunctionSymbol.returnSchema()) and reportsScalarType.ANYhere as a neutral placeholder.- Returns:
- return type; never null
-
properties
Set<FunctionProperty> properties()The set of optimizer hint flags declared for this function.- Returns:
- an unmodifiable set of properties; never null, may be empty
-
parameterSignature
The ordered list of parameter types, derived fromparameters(). This list is the discriminator used for overload resolution.- Returns:
- an ordered list of
ScalarTypevalues, one per parameter
-