Class CharConstantNode

All Implemented Interfaces:
Visitable

public final class CharConstantNode extends ConstantNode
  • Field Details

  • Constructor Details

  • Method Details

    • getString

      String getString() throws StandardException
      Return the value from this CharConstantNode
      Returns:
      The value of this CharConstantNode.
      Throws:
      StandardException - Thrown on error
    • getConstantValueAsObject

      Object getConstantValueAsObject() throws StandardException
      Return an Object representing the bind time value of this expression tree. If the expression tree does not evaluate to a constant at bind time then we return null. This is useful for bind time resolution of VTIs. RESOLVE: What do we do for primitives?
      Overrides:
      getConstantValueAsObject in class ValueNode
      Returns:
      An Object representing the bind time value of this expression tree. (null if not a bind time constant.)
      Throws:
      StandardException - Thrown on error
    • bindExpression

      ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException
      Description copied from class: ConstantNode
      Bind this expression. This means binding the sub-expressions, as well as figuring out what the return type is for this expression. In this case, there are no sub-expressions, and the return type is already known, so this is just a stub.
      Overrides:
      bindExpression in class ConstantNode
      Parameters:
      fromList - The FROM list for the query this expression is in, for binding columns.
      subqueryList - The subquery list being built as we find SubqueryNodes
      aggregates - The aggregate list being built as we find AggregateNodes
      Returns:
      The new top of the expression tree.
      Throws:
      StandardException - Thrown on error. Although this class doesn't throw this exception, it's subclasses do and hence this method signature here needs to have throws StandardException
    • generateConstant

      void generateConstant(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
      This generates the proper constant. It is implemented by every specific constant node (e.g. IntConstantNode).
      Specified by:
      generateConstant in class ConstantNode
      Parameters:
      acb - The ExpressionClassBuilder for the class being built
      mb - The method the code to place the code
      Throws:
      StandardException - Thrown on error
    • isSameNodeKind

      boolean isSameNodeKind(ValueNode o)
      Description copied from class: ValueNode
      Some node classes represent several logical node types (to reduce footprint), which we call kinds. This means that implementations of ValueNode.isEquivalent(org.apache.derby.impl.sql.compile.ValueNode) cannot always just use instanceof to check if the other node represents the same kind. Hence this method needs to be overridden by all node classes that represent several kinds. This default implementation does not look at kinds. It is only called from implementations of isEquivalent.
      Overrides:
      isSameNodeKind in class ValueNode
      Parameters:
      o - The other value node whose kind we want to compare with.
      Returns:
      true if this and o represent the same logical node type, i.e. kind.