Deveel.Data.Sql.Statements.ForLoopStatement.Loop C# (CSharp) Method

Loop() protected method

protected Loop ( ExecutionContext context ) : bool
context ExecutionContext
return bool
        protected override bool Loop(ExecutionContext context)
        {
            var variable = context.Request.Context.FindVariable(IndexName);
            var upperBound = ((SqlConstantExpression) UpperBound).Value;
            var lowerBound = ((SqlConstantExpression) LowerBound).Value;

            if (Reverse)
                return variable.Evaluate(context.Request) >= lowerBound;

            return variable.Evaluate(context.Request) < upperBound;
        }