Package skytools :: Module dbstruct :: Class TableStruct
[frames] | no frames]

Class TableStruct

source code

object --+
         |
        TableStruct

Collects and manages all info about table.

Allow to issue CREATE/DROP statements about any group of elements.

Instance Methods
 
__init__(self, curs, table_name)
Initializes class by loading info about table_name from database.
source code
 
create(self, curs, objs, new_table_name=None, log=None)
Issues CREATE statements for requested set of objects.
source code
 
drop(self, curs, objs, log=None)
Issues DROP statements for requested set of objects.
source code
 
get_column_list(self)
Returns list of column names the table has.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, curs, table_name)
(Constructor)

source code 
Initializes class by loading info about table_name from database.
Overrides: object.__init__

create(self, curs, objs, new_table_name=None, log=None)

source code 

Issues CREATE statements for requested set of objects.

If new_table_name is giver, creates table under that name and also tries to rename all indexes/constraints that conflict with existing table.