Skip to content

Commit 55c1657

Browse files
committed
some facilities for AsyncQueryResult
1 parent e33c592 commit 55c1657

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)