public override SqlObject Visit(SqlLikeScalarExpression sqlLikeScalarExpression)
 {
     return(SqlLikeScalarExpression.Create(
                sqlLikeScalarExpression.Expression.Accept(this) as SqlScalarExpression,
                sqlLikeScalarExpression.Pattern.Accept(this) as SqlScalarExpression,
                sqlLikeScalarExpression.Not,
                sqlLikeScalarExpression.EscapeSequence?.Accept(this) as SqlStringLiteral));
 }
        public override SqlObject VisitLike_scalar_expression([NotNull] sqlParser.Like_scalar_expressionContext context)
        {
            Contract.Requires(context != null);

            SqlScalarExpression expression  = (SqlScalarExpression)this.Visit(context.binary_scalar_expression()[0]);
            SqlScalarExpression pattern     = (SqlScalarExpression)this.Visit(context.binary_scalar_expression()[1]);
            bool             not            = context.K_NOT() != null;
            SqlStringLiteral escapeSequence = (context.escape_expression() != null)
                                                ? (SqlStringLiteral)this.Visit(context.escape_expression())
                                                : null;

            return(SqlLikeScalarExpression.Create(expression, pattern, not, escapeSequence));
        }