Skip to content

feat: add from_pool constructor for PostgresDatabase#8

Open
Misaka15535 wants to merge 1 commit intothegenius:mainfrom
Misaka15535:main
Open

feat: add from_pool constructor for PostgresDatabase#8
Misaka15535 wants to merge 1 commit intothegenius:mainfrom
Misaka15535:main

Conversation

@Misaka15535
Copy link

When using PostgreSQL, I need to set the session time zone via after_connect, which requires control over how the PgPool is created. To support this, I added a from_pool constructor that allows injecting a pre-built connection pool.

Although this requirement currently applies only to PostgreSQL, I added the same from_pool method to other database implementations as well, for consistency across the API.

@torchello
Copy link

This will be useful to configure min/max connections too. Can we get this merged/released please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants