Closed
Description
ATM to use connection we need to write the following code:
connection_pool = psqlpy.ConnectionPool()
conn = await connection_pool.connection()
conn.execute("SELECT * from users")
But it would be more pythonic to use context manager here like:
connection_pool = psqlpy.ConnectionPool()
async with connection_pool.connection() as conn:
conn.execute("SELECT * from users")
Metadata
Metadata
Assignees
Labels
No labels