support async iterator on AsyncSelectPagination
This commit is contained in:
parent
6ff27f9858
commit
1384bdfc5b
2 changed files with 6 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ from .validators import matches
|
||||||
from .redact import redact_url_password
|
from .redact import redact_url_password
|
||||||
from .http import WantsContentType
|
from .http import WantsContentType
|
||||||
|
|
||||||
__version__ = "0.5.0-dev31"
|
__version__ = "0.5.0-dev32"
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
||||||
|
|
|
||||||
|
|
@ -146,4 +146,9 @@ class AsyncSelectPagination(Pagination):
|
||||||
self.total = await self._query_count()
|
self.total = await self._query_count()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
async def __aiter__(self):
|
||||||
|
await self
|
||||||
|
for i in self.items:
|
||||||
|
yield i
|
||||||
|
|
||||||
__all__ = ('SQLAlchemy', )
|
__all__ = ('SQLAlchemy', )
|
||||||
Loading…
Add table
Add a link
Reference in a new issue