Skip to content

Commit 13eca31

Browse files
committed
Merge pull request pytest-dev#6 from horpto/patch-1
Some facilities for AsyncQueryResult
2 parents e33c592 + 55c1657 commit 13eca31

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

peewee_async.py

+6
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@ def __init__(self, result_wrapper=None, cursor=None):
328328
def __iter__(self):
329329
return iter(self._result)
330330

331+
def __getitem__(self, key):
332+
return self._result[key]
333+
334+
def __len__(self):
335+
return len(self._result)
336+
331337
@asyncio.coroutine
332338
def fetchone(self):
333339
row = yield from self._cursor.fetchone()

0 commit comments

Comments
 (0)