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"