public override void EnterBinaryComparasionPredicate([NotNull] MySqlParser.BinaryComparasionPredicateContext context)
 {//обернуть в два листенера
     if (_depth == _tmpDepth)
     {
         if (!context.GetChild(2).GetChild(0).GetType().ToString().Contains("SubqueryExpessionAtom"))
         {
             if (context.Stop.Type != 968)
             {
                 ExprColumnNames.Add(context.left.GetText());
                 WhereList.Add(new WhereStructure(context.GetText(), context.left.GetText()));
             }
             else
             {
                 if (context.Stop.Type == 968)
                 {
                     JoinListener    tmpJoinListener = new JoinListener();
                     ParseTreeWalker wlk             = new ParseTreeWalker();
                     wlk.Walk(tmpJoinListener, context);
                     JoinStructures.Add(new JoinStructure(context.Start.Text, context.Stop.Text,
                                                          tmpJoinListener.Output));
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 public override void EnterBinaryComparasionPredicate(MySqlParser.BinaryComparasionPredicateContext context)
 {
     if (_isOtherListener == 1 && Rules.Count > 0 && _isFirst)
     {
         Rules.Remove(Rules[Rules.Count - 1]);
         _isFirst = false;
     }
 }
Ejemplo n.º 3
0
 public override void EnterBinaryComparasionPredicate(MySqlParser.BinaryComparasionPredicateContext context)
 {
     if (_isOtherListener == 1)
     {
         BinaryComparasionPredicate binaryComparasionPredicate =
             new BinaryComparasionPredicate(context.SourceInterval, context, context.GetText());
         Rules.Remove(Rules[Rules.Count - 1]);
         Rules.Add(binaryComparasionPredicate);
     }
     _isOtherListener++;
 }
Ejemplo n.º 4
0
 public override void EnterBinaryComparasionPredicate([NotNull] MySqlParser.BinaryComparasionPredicateContext context)
 {//обернуть в два листенера
     if (context.Stop.Type != 968)
     {
         ExprColumnNames.Add(context.left.GetText());
         WhereList.Add(new WhereStructure(context.GetText(), context.left.GetText()));
     }
     else
     {
         if (context.Stop.Type == 968)
         {
             JoinListener    tmpJoinListener = new JoinListener();
             ParseTreeWalker wlk             = new ParseTreeWalker();
             wlk.Walk(tmpJoinListener, context);
             JoinStructures.Add(new JoinStructure(context.Start.Text, context.Stop.Text, tmpJoinListener.Output));
         }
     }
 }
Ejemplo n.º 5
0
 public override void ExitBinaryComparasionPredicate(MySqlParser.BinaryComparasionPredicateContext context)
 {
     _isOtherListener--;
 }