Home | Trees | Indices | Help |
|
---|
|
object --+ | common.RowIterator --+ | common.FileRowIterator --+ | RowIterator
An object that encapsulates the a source being parsed by a grammar.
RowIterators are returned by Grammars' parse methods. Iterate over them to retrieve the rows contained in the source.
You can also call getParameters on them to retrieve document-global values (e.g., the parameters of a VOTable, a global header of a FITS table).
The getLocator method should return some string that aids the user in finding out why something went wrong (file name, line number, etc.)
This default implementation works for when source is a sequence of dictionaries. You will, in general, want to override _iteRows and getLocator, plus probably __init__ (to prepare external resources) and getParameters (if you have them; make sure to update any parameters you have with self.sourceRow as shown in the default getParameters implementation).
RowIterators are supposed to be self-destructing, i.e., they should release any external resources they hold when _iterRows runs out of items.
_iterRows should arrange for the instance variable recNo to be incremented by one for each item returned.
Instance Methods | |||
|
|||
Inherited from Inherited from Inherited from |
Class Variables | |
chunkSize = 8192
|
|
Inherited from |
Properties | |
Inherited from Inherited from |
Method Details |
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |