Home | Trees | Indices | Help |
|
---|
|
Use this class to store the complete contents of a database table in a local Python data object. However, it must be possible to define a unique row of the table with just a single attribute. This obviates the need to constantly query the database, and provides a nice clear Python solution for access to small data sets (e.g. curation tables). Optimised for the scenario where setCurRow is called once, and getAttr many times. Data is stored as a dict(columnName: columnValuesList).
|
|||
new empty dictionary |
|
||
|
|||
|
|||
list |
|
||
scalar |
|
||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Accesses the default database and extracts the requested table data.
|
Sets the current row by finding the row where the specified attribute is equal to the given value. Supply keyword argument as for example: setCurRow(programmeID=101). NB: Keywords must define a unique row (otherwise the row is the first instance of this keyword value). |
Sets the current row by finding the row where the specified attribute is equal to the given value. NB: This must define a unique row (otherwise the row is the first instance of this keyword value). |
Returns the column list of all values for given attribute.
|
Returns the value of the given attribute in the current row (as set by setCurRow()). If a keyword is supplied then the attribute value is sought for the row where that keyword value is true instead of the current row.
|
Updates the Table object with the latest database values. The current row will be reset unless an unchanged unique ID can be supplied to index the new current row.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Sep 8 15:46:51 2014 | http://epydoc.sourceforge.net |