Skip to content

Commit

Permalink
Merge pull request #6 from horpto/patch-1
Browse files Browse the repository at this point in the history
Some facilities for AsyncQueryResult
  • Loading branch information
rudyryk committed Jun 19, 2015
2 parents e33c592 + 55c1657 commit 13eca31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions peewee_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ def __init__(self, result_wrapper=None, cursor=None):
def __iter__(self):
return iter(self._result)

def __getitem__(self, key):
return self._result[key]

def __len__(self):
return len(self._result)

@asyncio.coroutine
def fetchone(self):
row = yield from self._cursor.fetchone()
Expand Down

0 comments on commit 13eca31

Please sign in to comment.