__init__¶
-
PostgresWrapper.
__init__
(db=None, db_user='root', db_host=None, db_pass=None, **kwargs)[source]¶ Initialise the database wrapper class.
- Parameters
- Key str db_schema
(Default:
'public'
) Schema used for querying table existence- Key str query_mode
Either
'flat'
(query returns tuples) or'dict'
(query returns dicts). More details in PyDoc block underquery_mode
- Key psycopg2.extensions.cursor cursor_cls
If necessary, you may override the Psycopg2 cursor class used by specifying this kwarg. If this isn’t specified,
cursor_cls
will default to eitherpsycopg2.extras.RealDictCursor
if query_mode isdict
, orpsycopg2.extras.NamedTupleCursor
if query_mode isflat
.