Exemple #1
0
        public override object VisitIs_null_predicate([NotNull] KoraliumParser.Is_null_predicateContext context)
        {
            var scalarExpressionNode = context.scalar_expression();

            if (scalarExpressionNode == null)
            {
                throw new SqlParserException("Left side of IS NOT? NULL could not be parsed");
            }

            var scalarExpression = Visit(scalarExpressionNode) as ScalarExpression;

            if (scalarExpression == null)
            {
                throw new SqlParserException("Left side of IS NOT? NULL is not a scalar expression");
            }

            bool isNot = context.NOT() != null;

            return(new BooleanIsNullExpression()
            {
                IsNot = isNot,
                ScalarExpression = scalarExpression
            });
        }
 /// <summary>
 /// Exit a parse tree produced by <see cref="KoraliumParser.is_null_predicate"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitIs_null_predicate([NotNull] KoraliumParser.Is_null_predicateContext context)
 {
 }
Exemple #3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="KoraliumParser.is_null_predicate"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitIs_null_predicate([NotNull] KoraliumParser.Is_null_predicateContext context)
 {
     return(VisitChildren(context));
 }