This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Description
I need to issue a set of SQL commands at the start of each connection, e.g. to set up the search path. Currently it looks like this can only be done by subclassing Database and completely reimplementing its connection method to return a subclass of Connection that overrides __aenter__. Would it be acceptable to add something akin to Django's connection_created signal? Syntax might look like
@db.connection_created
async def set_search_path(connection):
await connection.execute("set search_path = my_schema")