public override object VisitLike_expression([NotNull] KoraliumParser.Like_expressionContext context) { if (context.element != null) { var left = Visit(context.element) as ScalarExpression; if (left == null) { throw new SqlParserException("Could not find a scalar expression in left side of 'LIKE'"); } var right = Visit(context.right) as ScalarExpression; if (right == null) { throw new SqlParserException("Could not find a scalar expression in right side of 'LIKE'"); } return(new LikeExpression() { Left = left, Right = right, Not = context.NOT() != null }); } throw new NotImplementedException(); }
/// <summary> /// Exit a parse tree produced by <see cref="KoraliumParser.like_expression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitLike_expression([NotNull] KoraliumParser.Like_expressionContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="KoraliumParser.like_expression"/>. /// <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 VisitLike_expression([NotNull] KoraliumParser.Like_expressionContext context) { return(VisitChildren(context)); }