Deveel.Data.Sql.Statements.CursorForLoopStatement.Loop C# (CSharp) Méthode

Loop() protected méthode

protected Loop ( ExecutionContext context ) : bool
context ExecutionContext
Résultat bool
        protected override bool Loop(ExecutionContext context)
        {
            var cursor = context.Request.Context.FindCursor(CursorName);
            if (cursor == null)
                throw new StatementException(String.Format("The cursor '{0}' could not be found in the context.", CursorName));

            if (cursor.Status == CursorStatus.Closed ||
                cursor.Status == CursorStatus.Disposed)
                throw new StatementException(String.Format("The cursor '{0}' is disposed or closed.", CursorName));

            cursor.Fetch(FetchDirection.Next);

            return cursor.Status == CursorStatus.Fetching;
        }