Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor code interacting with pool for consistency, and misc fixes #2398

Merged
merged 9 commits into from
Aug 2, 2022

Conversation

robx
Copy link
Contributor

@robx robx commented Aug 1, 2022

Largely, this collects all interaction with the connection pool in AppState helpers usePool and releasePool. (It's not obviously better to use AppState.usePool in place of SQL.use . AppState.getPool, but for now this approach is more consistent than what we had before, and will allow easily doing things like putting the pool in an IORef in the context of #2391.)

robx added 9 commits August 1, 2022 11:13
Previously, postgrest-style would reformat python files, but their
formatting wasn't enforced.
This prepares for wrapping the pool in a reference.
This is a bit ugly, it would be a bit nicer to just pass
'AppState.usePool appState' but then the types get messy.
Or we could introduce our own 'Pool' wrapper type.
@robx robx merged commit d4950c6 into PostgREST:main Aug 2, 2022
@robx robx deleted the refactor-pool branch August 2, 2022 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants