Home | Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | Record
A database record.
It behaves like a dictionnary, which returns a list of attributes for each key. The attributes types depend on the database Schema.
As a convenience, it is possible to use Record.add to build up a Record, instead of setting its fields manually.Note: this class is shared by all stores
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
instance of Key |
key the key of the record, unique over the whole database. |
|
|||
Inherited from |
|
|
|
Export as XML. Writes the content of the record as an XML fragment.
|
Adds a new value to a field of this record. This function allows you to add an item to a record. It converts the specified 'value' by calling 'constructor' on it, and appends the resulting attribute to the record. If you specify something like 'a.b' in fields, the 'b' qualifier for field 'a' is set, for the last 'a' added. It is possible, if you know that you will only have one 'a', to set 'a.b' before 'a'. Example:>>> rec.add ('title', u'My title', Attribute.Text) >>> rec.add ('title.subtitle', u'My subtitle', Attribute.Text) >>> rec.add ('author', definition, author_parser)
|
|
keythe key of the record, unique over the whole database. It is generated by the actual storage layer. This key has only an internal meaning. Do not expose it.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Sep 13 21:54:20 2007 | http://epydoc.sourceforge.net |