psycodict.base¶
The shared plumbing underneath every psycodict object.
PostgresBase is the common base of the database, table and
statistics classes; it owns statement execution through _execute
(logging, slow-query warnings, commit/rollback bookkeeping and
reconnection) together with helpers for inspecting tables, indexes and
constraints. The module also defines the layout of the meta_* tables –
the column lists, types and creation statements shared by everything that
reads or writes them – and the metadata format version (META_FORMAT)
stamped into meta_format.
- psycodict.base.jsonb_idx(cols, cols_type)[source]¶
The positions in
colswhose type isjsonb, as a tuple of indexes. Used to decide which values need json decoding when reading rows of themeta_*tables.INPUT:
cols– a list of column namescols_type– a dictionary mapping column names to their types