예제 #1
0
 public GraphTraversal2 Or(params GraphTraversal2[] orTraversals)
 {
     if (orTraversals.Length == 0)
     {
         //Infix And step
         GraphTraversal2 firstTraversal   = GraphTraversal2.__();
         GraphTraversal2 sencondTraversal = GraphTraversal2.__();
         for (var i = 1; i < GremlinTranslationOpList.Count; i++)
         {
             firstTraversal.AddGremlinOperator(GremlinTranslationOpList[i].Copy());
         }
         for (var i = 1; i < GremlinTranslationOpList.Count; i++)
         {
             GremlinTranslationOpList.RemoveAt(i);
         }
         LastGremlinTranslationOp = GremlinTranslationOpList.First();
         GremlinOrOp newOrOp = new GremlinOrOp(firstTraversal, sencondTraversal);
         AddGremlinOperator(newOrOp);
     }
     else
     {
         AddGremlinOperator(new GremlinOrOp(orTraversals));
     }
     return(this);
 }
예제 #2
0
 internal GremlinTranslationOperator GetStartOp()
 {
     return(GremlinTranslationOpList.Count == 0 ? null : GremlinTranslationOpList.First());
 }