module: pyrseas.dbobject.schema

The schema module defines two classes, Schema and SchemaDict, derived from DbObject and DbObjectDict, respectively.


Schema is derived from ~pyrseas.dbobject.DbObject and represents a database schema, i.e., a collection of tables and other objects. The 'public' schema is special as in most contexts an unqualified object is assumed to be part of it, e.g., table "t" is usually shorthand for table "public.t."

For now, the schema name is the only attribute and is of course the identifying attribute in the Schema keylist.

autoclass: Schema

automethod: Schema.extern_dir

automethod: Schema.to_map

automethod: Schema.create

automethod: Schema.data_import

Schema Dictionary

SchemaDict is derived from ~pyrseas.dbobject.DbObjectDict. It is a dictionary that represents the collection of schemas in a database. Certain internal schemas (information_schema, pg_catalog, etc.) owned by the 'postgres' user are excluded.

autoclass: SchemaDict

Method from_map is called from Database ~pyrseas.database.Database.from_map to start a recursive interpretation of the input map. The inmap argument is the same as input to the ~pyrseas.database.Database.diff_map method of Database. The newdb argument is the holder of ~pyrseas.dbobject.DbObjectDict-derived dictionaries which is filled in as the recursive interpretation proceeds.

automethod: SchemaDict.from_map

automethod: SchemaDict.link_refs

automethod: SchemaDict.to_map

automethod: SchemaDict.diff_map

automethod: SchemaDict.data_import