Class SelectColumn

java.lang.Object
org.litebridge.db.spi.expression.ColumnExpressionImpl
org.litebridge.db.spi.impl.function.SelectColumn
All Implemented Interfaces:
ColumnExpression, SelectExpression

public class SelectColumn extends ColumnExpressionImpl
Expression to select a database column.
  • Field Details

    • columnIdentifierGenerator

      protected final ColumnIdentifierGenerator columnIdentifierGenerator
      The column identifier generator used to create SQL column identifiers.
  • Constructor Details

    • SelectColumn

      public SelectColumn(Column column, ColumnIdentifierGenerator columnIdentifierGenerator)
      Creates a new SelectColumn.
      Parameters:
      column - the column
      columnIdentifierGenerator - the column identifier generator
  • Method Details

    • toSql

      public String toSql(Operation operation, ClauseType clause, @Nullable DelegateExpression parent)
      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 executed
      clause - The current clause type being evaluated
      parent - The parent expression/nesting expression, or null if this is a top-level expression
      Returns:
      the SQL representation of the expression