java.lang.Object
org.litebridge.db.spi.impl.expression.AbstractExpression
org.litebridge.db.spi.impl.expression.AbstractAliasedExpression
org.litebridge.db.spi.impl.expression.AbstractColumnExpression
org.litebridge.db.spi.impl.expression.SelectColumn
- All Implemented Interfaces:
AliasedExpression,ColumnExpression,SelectExpression
Expression to select a database column.
-
Field Summary
Fields inherited from class org.litebridge.db.spi.impl.expression.AbstractColumnExpression
columnFields inherited from class org.litebridge.db.spi.impl.expression.AbstractAliasedExpression
alias, tableAliasFields inherited from class org.litebridge.db.spi.impl.expression.AbstractExpression
labelGenerator -
Constructor Summary
ConstructorsConstructorDescriptionSelectColumn(Column column, @Nullable String alias, @Nullable String tableAlias, LabelGenerator labelGenerator) Creates a newSelectColumn. -
Method Summary
Modifier and TypeMethodDescriptiontoSql(Operation operation, ClauseType clause, @Nullable DelegateExpression parent) Creates a SQL representation of the expression.Methods inherited from class org.litebridge.db.spi.impl.expression.AbstractColumnExpression
column, equals, hashCodeMethods inherited from class org.litebridge.db.spi.impl.expression.AbstractAliasedExpression
addAliasAs, alias, tableAlias, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.litebridge.db.spi.expression.ColumnExpression
alias, tableAliasMethods inherited from interface org.litebridge.db.spi.expression.SelectExpression
toSql
-
Constructor Details
-
SelectColumn
public SelectColumn(Column column, @Nullable String alias, @Nullable String tableAlias, LabelGenerator labelGenerator) Creates a newSelectColumn.- Parameters:
column- the column to selectalias- the alias to assign to the column
-
-
Method Details
-
toSql
Creates a SQL representation of the expression.This is usually used for expressions that do not require any aliases.
- Parameters:
operation- the operation that is being executedclause- The current clause type being evaluatedparent- The parent expression/nesting expression, ornullif this is a top-level expression- Returns:
- the SQL representation of the expression
-