Class BindVariableExpression

java.lang.Object
dev.frostlake.executor.expressions.BindVariableExpression
All Implemented Interfaces:
Expression

public class BindVariableExpression extends Object implements Expression
A :name bind-variable reference — inside a Snowflake Scripting block, SQL statements refer to the block's variables (and a procedure's parameters) as :name. Resolved at evaluation time from the procedural scope.
  • Constructor Details

    • BindVariableExpression

      public BindVariableExpression(String varName)
    • BindVariableExpression

      public BindVariableExpression(String varName, SourcePosition position)
  • Method Details

    • getVarName

      public String getVarName()
    • getPosition

      public SourcePosition getPosition()
      Where the reference begins, relative to the fragment being parsed — the COLON's offset, which is what live reports for an unresolvable one: :nope in BEGIN RETURN :nope; END is position 13, the colon, not the name after it.
    • accept

      public <T> T accept(ExpressionVisitor<T> visitor)
      Description copied from interface: Expression
      Accept a visitor for the visitor pattern
      Specified by:
      accept in interface Expression
    • toString

      public String toString()
      Overrides:
      toString in class Object