def __init__(self, dbconn=None, single_db=False): """Initialize the various DbObjectDict-derived dictionaries :param dbconn: a DbConnection object """ self.schemas = SchemaDict(dbconn) self.extensions = ExtensionDict(dbconn) self.languages = LanguageDict(dbconn) self.casts = CastDict(dbconn) self.types = TypeDict(dbconn) self.tables = ClassDict(dbconn) self.columns = ColumnDict(dbconn) self.constraints = ConstraintDict(dbconn) self.indexes = IndexDict(dbconn) self.functions = ProcDict(dbconn) self.operators = OperatorDict(dbconn) self.operclasses = OperatorClassDict(dbconn) self.operfams = OperatorFamilyDict(dbconn) self.rules = RuleDict(dbconn) self.triggers = TriggerDict(dbconn) self.conversions = ConversionDict(dbconn) self.tstempls = TSTemplateDict(dbconn) self.tsdicts = TSDictionaryDict(dbconn) self.tsparsers = TSParserDict(dbconn) self.tsconfigs = TSConfigurationDict(dbconn) self.fdwrappers = ForeignDataWrapperDict(dbconn) self.servers = ForeignServerDict(dbconn) self.usermaps = UserMappingDict(dbconn) self.ftables = ForeignTableDict(dbconn) self.collations = CollationDict(dbconn) self.eventtrigs = EventTriggerDict(dbconn) # Populate a map from system catalog to the respective dict self._catalog_map = {} for _, d in self.all_dicts(single_db): if d.cls.catalog is not None: self._catalog_map[d.cls.catalog] = d # Map from objects extkey to their (dict name, key) self._extkey_map = {}