Get a psycopg `Connection`.
(config: PostgreSQLConfig)
| 13 | |
| 14 | |
| 15 | def _get_conn(config: PostgreSQLConfig) -> Connection: |
| 16 | """Get a psycopg `Connection`.""" |
| 17 | conn = psycopg.connect( |
| 18 | conninfo=_get_conninfo(config), |
| 19 | keepalives_idle=config.keepalives_idle, |
| 20 | **_get_conn_kwargs(config), |
| 21 | ) |
| 22 | return conn |
| 23 | |
| 24 | |
| 25 | async def _get_conn_async(config: PostgreSQLConfig) -> AsyncConnection: |
no test coverage detected