pyrseas.dbobject.column
The column
module defines two classes, Column
derived from DbSchemaObject
and ColumnDict
, derived from DbObjectDict
.
Column
is derived from ~pyrseas.dbobject.DbSchemaObject
and represents a column in a table, or an attribute in a composite type. Its keylist
attributes are the schema name and the table name.
A Column
has the following attributes: name
, type
, not_null
and default
. The number
attribute is also present but is not made visible externally.
Column
Column.to_map
Column.add
Column.add_privs
Column.diff_privileges
Column.comment
Column.drop
Column.rename
Column.set_sequence_default
Column.diff_map
Class ColumnDict
is a dictionary derived from ~pyrseas.dbobject.DbObjectDict
and represents the collection of columns in a database, across multiple tables. It is indexed by the schema name and table name, and each value is a list of Column
objects.
ColumnDict
ColumnDict.from_map
ColumnDict.diff_map