Module trase.tools.pcs.db
Functions to connect to databases; loading of credentials.
Functions
def apply_db_patch(patch_name, cnx, cur)def connect_once_to_db()def connect_to_db()def set_search_path(cur)
Classes
class MoreLoggingCursor (*args, **kwargs)-
Adds a few missing methods to LoggingCursor
Ancestors
- psycopg2.extras.LoggingCursor
- psycopg2.extensions.cursor
Methods
def copy_expert(self, sql, *args, **kwargs)-
copy_expert(sql, file, size=8192) – Submit a user-composed COPY statement.
filemust be an open, readable file for COPY FROM or an open, writable file for COPY TO. The optionalsizeargument, when specified for a COPY FROM statement, will be passed to file's read method to control the read buffer size.