2019-09-08 23:05:43 +02:00
|
|
|
import logging
|
|
|
|
|
|
|
|
import asyncpg
|
|
|
|
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
2019-09-19 01:48:52 +02:00
|
|
|
class Table:
|
2019-09-08 23:05:43 +02:00
|
|
|
@classmethod
|
2019-09-19 01:48:52 +02:00
|
|
|
async def create_pool(cls, uri, **kwargs) -> asyncpg.pool.Pool:
|
|
|
|
cls._pool = db = await asyncpg.create_pool(uri, **kwargs)
|
|
|
|
return db
|