Skip to content

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

Merged
robx merged 9 commits intoPostgREST:mainfrom
robx:refactor-pool
Aug 2, 2022
Merged

refactor code interacting with pool for consistency, and misc fixes#2398
robx merged 9 commits intoPostgREST:mainfrom
robx:refactor-pool

Conversation

@robx
Copy link
Copy Markdown
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