示例#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);
        }
示例#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);
        }
示例#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);
        }