From a6bd3cb82b1dd7b604a283c99fbab48667fe392a Mon Sep 17 00:00:00 2001 From: tariq daouda Date: Tue, 19 Jul 2016 16:16:39 -0400 Subject: [PATCH] Query iterrator ok --- pyArango/query.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyArango/query.py b/pyArango/query.py index 48a20c1..c534bae 100644 --- a/pyArango/query.py +++ b/pyArango/query.py @@ -1,11 +1,14 @@ import json +from future.utils import implements_iterator + from .document import Document, Edge from .theExceptions import QueryError, AQLQueryError, SimpleQueryError, CreationError from . import consts as CONST __all__ = ["Query", "AQLQuery", "SimpleQuery", "Cursor", "RawCursor"] +@implements_iterator class RawCursor(object) : "a raw interface to cursors that returns json" def __init__(self, database, cursorId) : @@ -22,6 +25,7 @@ def __next__(self) : raise CursorError(data["errorMessage"], self.id, data) return r.json() +@implements_iterator class Query(object) : "This class is abstract and should not be instanciated. All query classes derive from it"