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

In This Package:

DybPython::dbsvn::DBIValidate Class Reference

List of all members.

Public Member Functions

def __init__
def validate_msg
def validate_update
def __call__

Public Attributes

 diff
 msg
 author
 tabledict

Static Public Attributes

tuple tables = property(lambda self:[c.name for c in self.diff.children])
tuple exts = property(lambda self:[c.ext for c in self.diff.children])

Detailed Description

Basic validation of commit that represents an intended DB update

Definition at line 257 of file dbsvn.py.


Member Function Documentation

def DybPython::dbsvn::DBIValidate::__init__ (   self,
  diff,
  msg,
  author 
)

Definition at line 259 of file dbsvn.py.

00261                                            :
00262          self.diff = diff
00263          self.msg = msg
00264          self.author = author
         self.tabledict = dict([(c.name,c.smry) for c in self.diff.children])

def DybPython::dbsvn::DBIValidate::validate_msg (   self  ) 

Definition at line 268 of file dbsvn.py.

00268                                  :[c.ext  for c in self.diff.children])
00269 
00270     def validate_msg(self):

def DybPython::dbsvn::DBIValidate::validate_update (   self  ) 

Current checks do not verify tail addition  

Definition at line 271 of file dbsvn.py.

00273                               :
00274         """
00275         Current checks do not verify tail addition  
00276         """
00277         tdict = self.tabledict 
00278         tabs = tdict.keys()
00279         print tabs
00280         print tdict
00281 
00282         assert 'LOCALSEQNO' in tabs, "No LOCALSEQNO in %s " % tabs
00283         assert tdict['LOCALSEQNO'] == "-+", "Unexpected LOCALSEQNO change %r " % tdict 
00284         tabs = filter(lambda t:t != 'LOCALSEQNO', tabs )
00285         assert len(tabs) % 2 == 0 , "An even number of changed tables is required %r " % tabs
00286         vlds = filter( lambda t:t[-3:] == 'Vld' , tabs )
00287         assert len(vlds) == len(tabs)/2 , "Need equal number of payload and validity table changes "
00288         for vld in vlds:
00289             pay = vld[:-3]
            assert pay in tabs, "Vld table %s is not paired " % vld 

def DybPython::dbsvn::DBIValidate::__call__ (   self  ) 

Definition at line 290 of file dbsvn.py.

00292                       :
00293         self.validate_msg()
00294         self.validate_update()


Member Data Documentation

tuple DybPython::dbsvn::DBIValidate::tables = property(lambda self:[c.name for c in self.diff.children]) [static]

Definition at line 265 of file dbsvn.py.

tuple DybPython::dbsvn::DBIValidate::exts = property(lambda self:[c.ext for c in self.diff.children]) [static]

Definition at line 266 of file dbsvn.py.

DybPython::dbsvn::DBIValidate::diff

Definition at line 260 of file dbsvn.py.

DybPython::dbsvn::DBIValidate::msg

Definition at line 261 of file dbsvn.py.

DybPython::dbsvn::DBIValidate::author

Definition at line 262 of file dbsvn.py.

DybPython::dbsvn::DBIValidate::tabledict

Definition at line 263 of file dbsvn.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:13:02 2011 for DybPython by doxygen 1.4.7