Welcome to elephant_parsel’s documentation!¶
PostgresDB¶
- class elephant_parsel.postgres_db.PostgresDB(connection_config: dict, logger: Logger, connect=True, register_hstore=False)¶
- censored_config()¶
- execute(statement: str, arguments=None, use_transaction: bool = True)¶
- execute_values(statement: str, arguments: list, template: Optional[str] = None, map_row=None, column: Optional[str] = None)¶
Like query_all, but with a list of arguments: statement must contain a single %s placeholder. args must be a list of sequences or mappings. template can be a string with placeholders, which will be used for each item. see https://www.psycopg.org/docs/extras.html#psycopg2.extras.execute_values
- login()¶
- logout()¶
- query_all(statement: str, arguments: Union[Tuple, dict], map_row=None, column: Optional[str] = None)¶
- query_one(statement: str, arguments: Union[Tuple, dict], map_row=None, column: Optional[str] = None)¶
- transaction()¶
- class elephant_parsel.postgres_db.PostgresTransaction(db)¶
- execute(statement, arguments=None)¶
- execute_values(statement, arguments=None, template=None, map_row=None, column: Optional[str] = None)¶
- query_all(statement, arguments=None, map_row=None, column: Optional[str] = None)¶
- query_one(statement, arguments=None, map_row=None, column: Optional[str] = None)¶
- class elephant_parsel.postgres_db.PostgresDBException¶