Exemplo n.º 1
0
        public GraphTraversal2 Times(int maxLoops)
        {
            GremlinRepeatOp lastOp = GetEndOp() as GremlinRepeatOp;

            if (lastOp != null)
            {
                lastOp.RepeatTimes = maxLoops;
            }
            else
            {
                this.AddOperator(new GremlinRepeatOp()
                {
                    RepeatTimes = maxLoops
                });
            }
            return(this);
        }
Exemplo n.º 2
0
        public GraphTraversal2 Emit()
        {
            GremlinRepeatOp lastOp = GetEndOp() as GremlinRepeatOp;

            if (lastOp != null)
            {
                lastOp.IsEmit = true;
            }
            else
            {
                this.AddOperator(new GremlinRepeatOp()
                {
                    EmitContext = true,
                    IsEmit      = true
                });
            }
            return(this);
        }
Exemplo n.º 3
0
        public GraphTraversal2 Until(GraphTraversal2 untilTraversal)
        {
            GremlinRepeatOp lastOp = GetEndOp() as GremlinRepeatOp;

            if (lastOp != null)
            {
                lastOp.TerminationTraversal = untilTraversal;
            }
            else
            {
                this.AddOperator(new GremlinRepeatOp()
                {
                    TerminationTraversal = untilTraversal,
                    StartFromContext     = true
                });
            }
            return(this);
        }