Package Pyblio :: Module Store
[show private | hide private]
[frames | no frames]

Module Pyblio.Store

Overview

Contains the base classes and interfaces used to define a database of records.

The databases can be managed in different physical stores. To create a new database, get a specific store implementation with the get function, and call the provided dbcreate function:
>>> db = get ('file').dbcreate (path, schema)
Once this is done, the database is ready to accept records:
>>> record = Store.Record()
>>> record.add('title', u'my title', Attribute.Text)
>>> key = db.add(record)

See Also: the Database class to know what operations can be performed on databases.

Classes
Database A bibliographic database.
Key A key that uniquely identifies a record in a database.
Record A database record.
ResultSet A set of keys from the database.
ResultSetStore Interface to the stored result sets.
TxoGroup Definition of a group of Txo items.
TxoStore This class is the interface via which Txo items can be manipulated.
View A view of a Result Set represents the Result Set sorted according to a specific criterion.

Exceptions
StoreError Generic error occuring while accessing a database storage

Function Summary
  get(fmt)
Return the methods provided by a specific storage layer.
  modules()

Function Details

get(fmt)

Return the methods provided by a specific storage layer.

For instance:
>>> fmt = get ('file')
>>> db = fmt.dbopen (...)
The methods are:
  • dbcreate (file, schema): create a new database
  • dbopen (file): open a database in the specific store
  • dbimport (file): import an XML database into the specific store
  • dbdestroy (file): destroy a database
For more information, consult the documentation for the specific backends, Pyblio.Stores.filestore, Pyblio.Stores.bsddbstore and Pyblio.Stores.memorystore.

Generated by Epydoc 2.1 on Wed Feb 15 23:19:37 2006 http://epydoc.sf.net