Home | Trees | Indices | Help |
|
---|
|
object --+ | Database
A bibliographic database.
A database behaves like a dictionnary, linking a key with a record. The records are typed, and must follow the specifications of a Schema.>>> record = Record () >>> record ['title'] = Attribute.Text ('my title') >>> # ... >>> key = db.add (record)When the record is added, a key is generated which uniquely references the record.
>>> r = db [k]
Alternatively, one can access all the records in a database in
random order:
>>> for key, record in db.entries.iteritems (): >>> # do something with the record...
>>> record = db [key] >>> ... # update the record >>> db [key] = record
See Also: queries
Attention: getting a record from the database returns a new copy at each access. Updating this copy does not change the stored value.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
rs a ResultSetStore instance, containing all the result sets defined on this database. |
|
|||
txo DEPRECATED, use schema.txo
instead.
|
|||
entries a resultset containing all the records of the database. |
|||
Inherited from |
|
|
Insert a new entry in the database. New entries MUST be added with this method, not via an update with a hand-made Key. |
Update a record. Updates a record with a new value. |
|
|
|
|
txoDEPRECATED, useschema.txo instead. A
TxoGroup
instance, containing all the taxonomy definitions in the database. See TxoItem.
|
entriesa resultset containing all the records of the database.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Sep 13 21:54:20 2007 | http://epydoc.sourceforge.net |