Interface Selectable
- All Known Subinterfaces:
SelectableExpression
public interface Selectable
An object which can be part of the output or input of a
PipelineStage
.
The alias of a Selectable is used to refer to it for both pipeline stage construction and query data fetching.
For example:
def qapi = api.queryApi()
def p = qapi.tables().products()
return qapi.source(
p,
[
p.sku(), // selectable with default alias "sku"
qapi.exprs().string("spamEgg").as("breakfast") // selectable with alias "breakfast"
]
).filter { input -> input.sku.like("%foo") } // refers to the previous stage selectable have the "sku" alias
.stream { it.each { row -> print(row.breakfast) } } // refers to the "spamEgg" literal string defined in the source stage
// and propagated through the filter stage (which does not alter its inputs columns)
- Since:
- 14.0 - Caribou Lou
-
Method Summary
-
Method Details
-
alias
String alias()- Returns:
- the sting identifier of this selectable object
- Since:
- 14.0 - Caribou Lou
-