RowSource
index
/usr/local/zope/zope1/Products/Hornet/RowSource.py

 
Classes
       
RowSource

 
class RowSource
    Wraps the C cursor object in a python iterable object
This object keeps its own copy of the iterator position and explicitly calls scroll()
on the cursor for each request; This allows multiple RowSource objects
to work on the same cursor without conflicting;
 
The extra scroll() method should not slow mysql down significantly.
In most cases, we would already be on the specified row and as such 
the scroll() call would be ignored.
 
  Methods defined here:
__getitem__(self, item)
Returns the specified row
int => {}
__getslice__(self, start, end)
Return a new RowSource that iterates only over the specified slice
If self has already been sliced, return a slice of that slice
 
i,j => [i:j]
__init__(self, cursor, start=0, limit=None, position=0)
__iter__(self)
Returns a new instance of RowSource
If we have previously been 'sliced' (i.e. result[100:200] ) 
the resulting iterator will also only iterate over that slice
(Multiple instances of RowSource can safely be used without conflicts on the same cursor)
__len__(self)
buildDict(self, row)
Builds a dictionary out of the specified row, based on self.fields (The query description from the cursor)
() => {}
describe(self)
Returns resultset field information
next(self)
Seeks to the correct row, builds a dictionary of key=>value pairs, and returns it
seek(self, row)
Lazily seeks to the specified row

Data and other attributes defined here:
__ac_permissions__ = ()
__allow_access_to_unprotected_subobjects__ = 1