Package Pyblio :: Package Stores :: Module filestore :: Class Database
[show private | hide private]
[frames | no frames]

Type Database

object --+    
         |    
  Database --+
             |
object --+   |
         |   |
 Publisher --+
             |
object --+   |
         |   |
 Queryable --+
             |
            Database


Method Summary
  __init__(self, schema, file, create)
  __delitem__(self, k)
  __getitem__(self, key)
Get a record by key.
  __setitem__(self, key, value)
  add(self, record, key)
Insert a new entry in the database.
  has_key(self, k)
  index(self)
Turn on indexing of the db content.
  save(self)
  _entries_get(self)
Return the result set that contains all the entries.
  _idxadd(self, key, val)
  _idxdel(self, key)
  _q_anyword(self, query)
    Inherited from Queryable
  count(self, query)
Perform a query and return the count of matching records.
  query(self, query, permanent)
Perform a query and return a result set of the matching records.
  _q_all(self)
  _q_check(self, query)
  _q_hasfield(self, q)
  _q_to_rs(self, res, permanent)
  _q_txo(self, q)
    Inherited from Database
  collate(self, rs, field)
Partition the result set in a list of sets for every value taken by the specified field
  validate(self, entry)
Check an entry for conformance against the Schema.
  xmlread(self, fd)
  xmlwrite(self, fd)
Output a database in XML format
  _txo_get(self)
  _txo_warn(self)
    Inherited from Publisher
  emit(self, signal, *args)
Call this method to emit a signal.
  register(self, signal, callback, *args)
Clients interested in a given signal must register with this method.
  unregister(self, signal, callback)
Stop notifying events for the specified signal/callback pair.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
    Inherited from Database
  entries
  txo

Class Variable Summary
    Inherited from Database
  entries = Pyblio.Store.Database.entries
  rs: a ResultSetStore instance, containing all the result sets defined on this database.
  txo = Pyblio.Store.Database.txo

Method Details

__getitem__(self, key)
(Indexing operator)

Get a record by key.
Parameters:
key - the key of the requested record
           (type=a Key)
Overrides:
Pyblio.Store.Database.__getitem__ (inherited documentation)

add(self, record, key=None)

Insert a new entry in the database.

New entries MUST be added with this method, not via an update with a hand-made Key.

key is only useful for importing an existing database, by proposing a key choice.
Overrides:
Pyblio.Store.Database.add

index(self)

Turn on indexing of the db content.

_entries_get(self)

Return the result set that contains all the entries.
Overrides:
Pyblio.Store.Database._entries_get

Property Details

entries

Get Method:
_entries_get(self)

Generated by Epydoc 2.1 on Sun Sep 24 23:52:43 2006 http://epydoc.sf.net