Class SelectColumnFactory
java.lang.Object
com.illumon.iris.db.tables.select.SelectColumnFactory
A factory to create
SelectColumns from an input expression. There are two types of supported expressions
- By Existing column - Simply the name of an existing column in the table
- ResultColumn = <Expression> - Where the expression may simply identify a column from the source, or be something more sophisticated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SelectColumngetExpression(@NotNull String expression) Create aSelectColumnbased on the expression.static @NotNull SelectColumn[]getExpressions(String... expressions) Convert all the supplied expressions intoSelectColumns.static SelectColumn[]getExpressions(Collection<String> expressions) Convert all the supplied expressions intoSelectColumns.static StringgetFormatBaseColumn(SelectColumn selectColumn) Returns the base column-name used to create a formatting column viagetFormatExpression(String)methodstatic SelectColumngetFormatExpression(String expression) static DhFormulaColumn[]getFormatExpressions(String... expressions) static @NotNull SelectColumnofAlwaysUpdate(@NotNull String expression) Create aSelectColumnthat will always be updated during an update cycle, regardless of the engine's determined set of modified columns.
-
Constructor Details
-
SelectColumnFactory
public SelectColumnFactory()
-
-
Method Details
-
ofAlwaysUpdate
@ScriptApi @NotNull public static @NotNull SelectColumn ofAlwaysUpdate(@NotNull @NotNull String expression) Create aSelectColumnthat will always be updated during an update cycle, regardless of the engine's determined set of modified columns.- Parameters:
expression- the expression to convert.- Returns:
- a new
SelectColumnbased upon the expression.
-
getExpression
@ScriptApi @NotNull public static @NotNull SelectColumn getExpression(@NotNull @NotNull String expression) Create aSelectColumnbased on the expression.- Parameters:
expression- the expression to convert.- Returns:
- a new
SelectColumnbased upon the expression.
-
getExpressions
Convert all the supplied expressions intoSelectColumns.- Parameters:
expressions- an array of expressions to convert.- Returns:
- an array of
SelectColumns, one for each expression.
-
getExpressions
Convert all the supplied expressions intoSelectColumns.- Parameters:
expressions- a collection of expressions to convert.- Returns:
- an array of
SelectColumns, one for each expression.
-
getFormatExpression
-
getFormatExpressions
-
getFormatBaseColumn
Returns the base column-name used to create a formatting column viagetFormatExpression(String)method- Parameters:
selectColumn- aSelectColumnreturned from thegetFormatExpression(String)method- Returns:
- the baseColumn used to define the provided selectColumn
-