/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
DybPython::tab::DebugValidityOrdering Class Reference

List of all members.

Public Member Functions

def __init__
def __enter__
def __exit__

Public Attributes

 tmp
 proxy
 prior

Detailed Description


.. warn:: **FOR DEBUGGING ONLY**  NB the change impacts the kls specified only 

Context manger for non standard DBI Validity ordering queries, allowing what happens 
within a tied VERSIONDATE occurs to be examined.
Observation suggests MySQL implicity orders by the PK(SEQNO) asc 
within tied VERSIONDATE sets.

The extra ordering string is impinged between "order by VERSIONDATE desc" 
and the terminating ";" with a "," prefix when the extra is non-blank. 

Usage::
 
     from DybPython.tab import DebugValidityOrdering
     from DybDbi import GDemo

     with DebugValidityOrdering(GDemo,"SEQNO desc"):
         r = GDemo.Rpt()
         n = len(r)
         print n, r.vrec.seqno 

Definition at line 5 of file tab.py.


Constructor & Destructor Documentation

def DybPython::tab::DebugValidityOrdering::__init__ (   self,
  kls,
  tmp 
)

Definition at line 29 of file tab.py.

00030                                    :
00031         self.tmp = tmp
00032         self.proxy = kls.GetTableProxy().GetDBProxy()
        self.prior = None

Member Function Documentation

def DybPython::tab::DebugValidityOrdering::__enter__ (   self)

Definition at line 33 of file tab.py.

00034                          :
00035         if not self.tmp:
00036             self.prior = None
00037             log.warn("extra ordering of None, leaving ordering as is")
00038         else: 
00039             self.prior = self.proxy.GetExtraOrdering()
00040             self.proxy.SetExtraOrdering( self.tmp )       
00041             log.info("changing extra ordering : %s -> %s " % ( self.prior, self.tmp ) )

def DybPython::tab::DebugValidityOrdering::__exit__ (   self,
  type,
  value,
  tb 
)

Definition at line 42 of file tab.py.

00043                                         :
00044         if not self.prior:
00045             log.warn("no prior set ")
00046             return None
00047         self.proxy.SetExtraOrdering(self.prior)
00048         log.info("reverting extra ordering : %s -> %s " % ( self.prior, self.extra) )
00049 


Member Data Documentation

Definition at line 29 of file tab.py.

Definition at line 29 of file tab.py.

Definition at line 29 of file tab.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 Fri May 16 2014 09:55:41 for DybPython by doxygen 1.7.4