Class CastSpecification

All Implemented Interfaces:
NamedExpression, HasSQL, Typed

public final class CastSpecification extends Function1
A cast specification.
  • Field Details

    • domain

      private Domain domain
  • Constructor Details

  • Method Details

    • getValue

      public Value getValue(SessionLocal session)
      Description copied from class: Expression
      Return the resulting value for the current row.
      Specified by:
      getValue in class Expression
      Parameters:
      session - the session
      Returns:
      the result
    • optimize

      public Expression optimize(SessionLocal session)
      Description copied from class: Expression
      Try to optimize the expression.
      Specified by:
      optimize in class Expression
      Parameters:
      session - the session
      Returns:
      the optimized expression
    • isConstant

      public boolean isConstant()
      Description copied from class: Expression
      Check if this expression will always return the same value.
      Overrides:
      isConstant in class Expression
      Returns:
      if the expression is constant
    • canOptimizeCast

      private static boolean canOptimizeCast(int src, int dst)
    • getUnenclosedSQL

      public StringBuilder getUnenclosedSQL(StringBuilder builder, int sqlFlags)
      Description copied from class: Expression
      Get the SQL statement of this expression. This may not always be the original SQL statement, especially after optimization. Enclosing '(' and ')' are never appended.
      Overrides:
      getUnenclosedSQL in class Function1
      Parameters:
      builder - string builder
      sqlFlags - formatting flags
      Returns:
      the specified string builder
    • getName

      public String getName()
      Description copied from interface: NamedExpression
      Get the name.
      Returns:
      the name in uppercase