private IASTNode CreatePredicateRightValue(MySqlCommandParser.BooleanPrimaryContext ctx)
        {
            if (null != ctx.subquery())
            {
                new SubQuerySegment(ctx.Start.StartIndex, ctx.Stop.StopIndex, (SelectCommand)Visit(ctx.subquery()));
            }
            IASTNode rightValue = Visit(ctx.predicate());

            return(CreatePredicateRightValue(ctx, rightValue));
        }
 public override IASTNode VisitBooleanPrimary(MySqlCommandParser.BooleanPrimaryContext ctx)
 {
     if (null != ctx.comparisonOperator() || null != ctx.SAFE_EQ_())
     {
         return(CreateCompareSegment(ctx));
     }
     if (null != ctx.predicate())
     {
         return(Visit(ctx.predicate()));
     }
     if (null != ctx.subquery())
     {
         return(new SubQuerySegment(ctx.Start.StartIndex, ctx.Stop.StopIndex, (SelectCommand)Visit(ctx.subquery())));
     }
     //TODO deal with IS NOT? (TRUE | FALSE | UNKNOWN | NULL)
     return(new CommonExpressionSegment(ctx.Start.StartIndex, ctx.Stop.StopIndex, ctx.GetText()));
 }