| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybDbiPre::__init__::Tab Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def __call__

Public Attributes

 meta

Static Public Attributes

tuple extras = property( _extras , doc=_extras.__doc__ )
tuple docstring = property( _docstring )

Private Member Functions

def _extras
def _docstring

Detailed Description

    :class:`DybDbiPre.Tab` instances are created by the parsing of :file:`.spec` files (:dybgaudi:`Database/DybDbi/spec`).
    Instances contain a list of dicts corresponding to each payload row in the DBI table together
    with a metadata dictionary for class level information.
       
    To test the parsing of a :file:`.spec` file, use for example::
    
          cat $DYBDBIROOT/spec/GSimPmtSpec.spec | python $DYBDBIPREROOT/python/DybDbiPre/__init__.py
    
    The instances are available in the django context used to fill templates
    :dybgaudi:`Database/DybDbi/templates` used in the generation of:
    
      #. DbiTableRow subclasses allowing DBI to interact with the table
      #. Documentation presenting the DBI tables in :file:`.tex` and wiki formats 
      #. SQL scripts for table creation :file:`.sql` 
    
    The meanings of the quantities in the :file:`.spec` are ultimately determined by their usage
    in the templates, however some guideline definitions are listed below:

    .. rubric:: row level quantities

    name
        column name as used in C++ getter and setter methods
    dbtype
        MySQL column type name used in table description, such as `double` or `int(10) unsigned`
    codetype 
        type used in generated C++ code, eg `DayaBay::FeeChannelId`
    legacy 
        name of the column in database table
    description
        short definition of the meaning of the column      
    code2db
        C++ converter function used to translate a value in code into a value stored in the DB, eg `.fullPackedData()` 
    memb
        name of the column data member in the C++ table row class, **WARNING, CURRENTLY NOT IN USE**         


    .. rubric:: class/table level properties

    meta
        a token that identifies the key, value pairs on the line as metadata rather than a table row 
    table
        name of the payload Database table, eg `CalibFeeSpec`
    class 
        name of the generated DbiTableRow class, follow convention of naming with a **G** prefix eg `GCalibFeeSpec`
    CanL2Cache
        set to `kFALSE`, L2 caching is for debugging only 
    legacy
        name of prior table when migrations are performed, **WARNING, CURRENTLY NOT IN USE**, set to table name             
    rctx
        default read context represented by a comma delimited string, see :dybgaudi:`Database/DybDbi/src/DbiCtx.cxx`  
    wctx
        default write context range represented by a comma delimited string, see :dybgaudi:`Database/DybDbi/src/DbiCtx.cxx` 


    .. rubric:: usage in templates

    The class level and row level quantities are used in django templates with expressions of the form::
         
        {{ t.meta.table }}   

        {% for r in t %}`{{ r.name }}` {{ r.dbtype }} default NULL COMMENT '{{ r.description }}',

  

Definition at line 5 of file __init__.py.


Member Function Documentation

def DybDbiPre::__init__::Tab::__init__ (   self  ) 

Definition at line 7 of file __init__.py.

00007         :class:`DybDbiPre.Tab` instances are created by the parsing of :file:`.spec` files (:dybgaudi:`Database/DybDbi/spec`).
00008         Instances contain a list of dicts corresponding to each payload row in the DBI table together
00009         with a metadata dictionary for class level information.

def DybDbiPre::__init__::Tab::__repr__ (   self  ) 

Definition at line 10 of file __init__.py.

00011                                  :file:`.spec` file, use for example::
00012         

def DybDbiPre::__init__::Tab::_extras (   self  )  [private]

Extras property dict is updated into the context providing handy shortcuts  

Definition at line 13 of file __init__.py.

00016         :dybgaudi:`Database/DybDbi/templates` used in the generation of:
00017         
00018           #. DbiTableRow subclasses allowing DBI to interact with the table
00019           #. Documentation presenting the DBI tables in :file:`.tex` and wiki formats 

def DybDbiPre::__init__::Tab::_docstring (   self  )  [private]

Definition at line 22 of file __init__.py.

00022                                               :file:`.spec` are ultimately determined by their usage
00023         in the templates, however some guideline definitions are listed below:

def DybDbiPre::__init__::Tab::__call__ (   self,
  d 
)

If fields in the :file:`.spec` file include a "meta" key then the  
fieldname(ie key),value pairs are included into the meta dictionary  

Definition at line 26 of file __init__.py.


Member Data Documentation

tuple DybDbiPre::__init__::Tab::extras = property( _extras , doc=_extras.__doc__ ) [static]

Definition at line 20 of file __init__.py.

tuple DybDbiPre::__init__::Tab::docstring = property( _docstring ) [static]

Definition at line 24 of file __init__.py.

DybDbiPre::__init__::Tab::meta

Definition at line 8 of file __init__.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:06:12 2011 for DybDbiPre by doxygen 1.4.7