internal override BooleanFunction CompileToBatchFunction(QueryCompilationContext context, GraphViewCommand command)
        {
            BooleanFunction bf1 = this.FirstExpr.CompileToBatchFunction(context, command);
            BooleanFunction bf2 = this.SecondExpr.CompileToBatchFunction(context, command);

            if (this.BooleanExpressionType == BooleanBinaryExpressionType.And)
            {
                return(new BooleanBinaryFunction(bf1, bf2, BooleanBinaryFunctionType.And));
            }
            else
            {
                return(new BooleanBinaryFunction(bf1, bf2, BooleanBinaryFunctionType.Or));
            }
        }
        internal override BooleanFunction CompileToFunction(QueryCompilationContext context, GraphViewConnection dbConnection)
        {
            BooleanFunction bf1 = FirstExpr.CompileToFunction(context, dbConnection);
            BooleanFunction bf2 = SecondExpr.CompileToFunction(context, dbConnection);

            if (BooleanExpressionType == BooleanBinaryExpressionType.And)
            {
                return(new BooleanBinaryFunction(bf1, bf2, BooleanBinaryFunctionType.And));
            }
            else
            {
                return(new BooleanBinaryFunction(bf1, bf2, BooleanBinaryFunctionType.Or));
            }
        }
Esempio n. 3
0
        public RepeatOperator(
            GraphViewExecutionOperator inputOp,
            Container initialContainer,
            GraphViewExecutionOperator initialOp,
            Container repeatTraversalContainer,
            GraphViewExecutionOperator repeatTraversalOp,
            BooleanFunction emitCondition,
            bool isEmitFront,
            BooleanFunction untilCondition = null,
            bool isUntilFront = false,
            int repeatTimes   = -1)
        {
            this.inputOp          = inputOp;
            this.initialContainer = initialContainer;
            this.initialOp        = initialOp;

            this.repeatTraversalContainer = repeatTraversalContainer;
            this.repeatTraversalOp        = repeatTraversalOp;

            this.emitCondition = emitCondition;
            this.isEmitFront   = isEmitFront;

            this.untilCondition = untilCondition;
            this.isUntilFront   = isUntilFront;

            // By current implementation of Gremlin, when repeat time is set to 0,
            // it is reset to 1.
            this.repeatTimes        = repeatTimes == 0 ? 1 : repeatTimes;
            this.currentRepeatTimes = 0;

            this.repeatRecords      = new List <RawRecord>();
            this.repeatResultBuffer = new Queue <RawRecord>();
            this.needInitialize     = true;

            this.Open();
        }
Esempio n. 4
0
 public BooleanNotFunction(BooleanFunction booleanFunction)
 {
     this.booleanFunction = booleanFunction;
 }
Esempio n. 5
0
 internal BooleanBinaryFunction(BooleanFunction plhs, BooleanFunction prhs, BooleanBinaryFunctionType ptype)
 {
     lhs  = plhs;
     rhs  = prhs;
     type = ptype;
 }
 public BooleanNotFunction(BooleanFunction booleanFunction)
 {
     _booleanFunction = booleanFunction;
 }