Package gavo :: Package rsc :: Module data :: Class Data
[frames] | no frames]

Class Data

source code

         object --+    
                  |    
base.meta.MetaMixin --+
                      |
         object --+   |
                  |   |
  common.ParamMixin --+
                      |
                     Data

A collection of tables.

``Data``, in essence, is the instanciation of a ``DataDescriptor``.

It is what ``makeData`` returns. In typical one-table situations, you just want to call the ``getPrimaryTable()`` method to obtain the table built.

Instance Methods
 
__init__(self, dd, tables, parseOptions=<ParseOptions validateRows=False maxRows=None keepGoing=False>)
is a constructor for standalone use.
source code
 
__iter__(self) source code
 
validateParams(self)
raises a ValidationError if any required parameters within this data's tables are still None.
source code
 
dropTables(self, parseOptions) source code
 
updateMeta(self, updateIndices=False)
updates meta information kept in the DB on the contained tables.
source code
 
recreateTables(self, connection)
drops and recreates all table that are onDisk.
source code
 
getPrimaryTable(self)
returns the table contained if there is only one, or the one with the role primary.
source code
 
getTableWithRole(self, role) source code
 
getFeeder(self, **kwargs) source code
 
runScripts(self, phase, **kwargs) source code

Inherited from base.meta.MetaMixin: addMeta, buildRepr, copyMetaFrom, delMeta, getAllMetaPairs, getMeta, getMetaKeys, getMetaParent, isEmpty, iterMeta, keys, makeOriginal, setMeta, setMetaParent, traverse

Inherited from common.ParamMixin: getParam, getParamByName, getParamByUtype, getParamDict, iterParams, setParam, setParams

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

Class Methods
 
create(cls, dd, parseOptions=<ParseOptions validateRows=False maxRows=None keepGoing=False>, connection=None)
returns a new data instance for dd.
source code
 
drop(cls, dd, parseOptions=<ParseOptions validateRows=False maxRows=None keepGoing=False>, connection=None)
drops all tables made by dd if necessary.
source code
Properties

Inherited from object: __class__

Method Details

__init__(self, dd, tables, parseOptions=<ParseOptions validateRows=False maxRows=None keepGoing=False>)
(Constructor)

source code 

is a constructor for standalone use. You do *not* want to call this when mixing into a Structure.

Overrides: object.__init__
(inherited documentation)

create(cls, dd, parseOptions=<ParseOptions validateRows=False maxRows=None keepGoing=False>, connection=None)
Class Method

source code 

returns a new data instance for dd.

Existing tables on the database are not touched. To actually re-create them, call recrateTables.

recreateTables(self, connection)

source code 

drops and recreates all table that are onDisk.

System tables are only recreated when the systemImport parseOption is true.

getPrimaryTable(self)

source code 

returns the table contained if there is only one, or the one with the role primary.

If no matching table can be found, raise a DataError.