connection¶
Attributes¶
Functions¶
Context manager for database connections. |
|
|
Context manager for database cursors. |
Module Contents¶
- DB_PARAMS¶
- pool¶
- get_db_connection()¶
Context manager for database connections.
- Yields:
psycopg2.extensions.connection – A database connection from the pool.
- get_db_cursor(commit=False)¶
Context manager for database cursors.
- Parameters:
commit (bool) – Whether to commit the transaction after executing queries.
- Yields:
psycopg2.extensions.cursor – A database cursor.