How to use the aiopg.sa.result.RowProxy function in aiopg

To help you get started, we’ve selected a few aiopg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aio-libs / aiopg / aiopg / sa / result.py View on Github external
def __eq__(self, other):
        if isinstance(other, RowProxy):
            return self.as_tuple() == other.as_tuple()
        elif isinstance(other, Sequence):
            return self.as_tuple() == other
        else:
            return NotImplemented
github aio-libs / create-aio-app / create_aio_ms / template_project / template_project / types.py View on Github external
from typing import List

from aiopg.sa.result import RowProxy


RowsProxy = List[RowProxy]
github aio-libs / aiopg / aiopg / sa / result.py View on Github external
def _process_rows(self, rows):
        process_row = RowProxy
        metadata = self._metadata
        keymap = metadata._keymap
        processors = metadata._processors
        return [process_row(metadata, row, processors, keymap)
                for row in rows]
github aio-libs / aiohttp-demos / demos / graphql-demo / graph / api / models / room.py View on Github external
    async def resolve_owner(self, info: ResolveInfo) -> List[RowProxy]:
        app = info.context['request'].app

        return await app['loaders'].users.load(self['owner_id'])
github aio-libs / aiohttp-demos / demos / graphql-demo / graph / api / queries / rooms.py View on Github external
    async def resolve_rooms(self, info: ResolveInfo) -> List[RowProxy]:
        app = info.context['request'].app

        async with app['db'].acquire() as conn:
            return await select_rooms(conn)
github aio-libs / aiohttp-demos / demos / graphql-demo / graph / types.py View on Github external
from typing import List
from aiopg.sa.result import RowProxy


RowsProxy = List[RowProxy]