Class ScalarFunctionSymbol.Builder
java.lang.Object
com.darkcollective.relix.symbol.function.ScalarFunctionSymbol.Builder
- Enclosing class:
ScalarFunctionSymbol
Fluent builder for
ScalarFunctionSymbol.
Instances are obtained via ScalarFunctionSymbol.builder(String).
The builder is single-use; call build() once to produce the
immutable record.
-
Method Summary
Modifier and TypeMethodDescriptionSets the body expression for a user-defined function.build()Constructs theScalarFunctionSymbolfrom the current builder state.Sets the namespace (default:"default").parameter(String name, ScalarType type) Appends a parameter to the end of the parameter list.property(FunctionProperty property) Adds a single optimizer hint flag.provenance(Provenance provenance) Sets the provenance (default:Provenance.USER).returnType(ScalarType returnType) Sets the return type (default:ScalarType.ANY).shadowPolicy(ShadowPolicy shadowPolicy) Sets the shadow policy (default:ShadowPolicy.PERMITTED).
-
Method Details
-
namespace
Sets the namespace (default:"default").- Parameters:
namespace- must not be blank- Returns:
- this builder
-
provenance
Sets the provenance (default:Provenance.USER).- Parameters:
provenance- must not be null- Returns:
- this builder
-
shadowPolicy
Sets the shadow policy (default:ShadowPolicy.PERMITTED).- Parameters:
shadowPolicy- must not be null- Returns:
- this builder
-
parameter
Appends a parameter to the end of the parameter list.- Parameters:
name- the parameter name; must not be blanktype- the parameter type; must not be null- Returns:
- this builder
-
returnType
Sets the return type (default:ScalarType.ANY).- Parameters:
returnType- must not be null- Returns:
- this builder
-
property
Adds a single optimizer hint flag.- Parameters:
property- must not be null- Returns:
- this builder
-
body
Sets the body expression for a user-defined function.- Parameters:
body- the scalar expression body; must not be null- Returns:
- this builder
-
build
Constructs theScalarFunctionSymbolfrom the current builder state.- Returns:
- a new immutable
ScalarFunctionSymbol
-