Package Pootle :: Package storage :: Module api :: Class IDatabase
[show private | hide private]
[frames | no frames]

Type IDatabase

object --+    
         |    
 Interface --+
             |
            IDatabase


A database.

This acts as the root of the content object hierarchy.

Its constructor may accept arbitrary arguments for configuration. TODO: unified way to open a database (a config parser object)?
Method Summary
  commitTransaction(self)
Commit a transaction.
  flush(self)
Flush modified data to the database.
  refresh(self, obj)
Mark an object as expired.
  rollbackTransaction(self)
Commit a transaction.
  startTransaction(self)
Start a transaction.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __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)

Class Variable Summary
type languages = Pootle.storage.api.IMapping
type root = Pootle.storage.api.IFolder

Method Details

commitTransaction(self)

Commit a transaction.

Does nothing if transactions are not supported.

flush(self)

Flush modified data to the database.

To be used when some attributes have been changed on an object. Not needed for TranslationUnits and TranslationStores, which have their own save() method.

refresh(self, obj)

Mark an object as expired.

Reloads the object from database. Call this on modified objects after performing a transaction rollback.

rollbackTransaction(self)

Commit a transaction.

Raises NotImplementedError if transactions are not supported.

startTransaction(self)

Start a transaction.

Does nothing if transactions are not supported.

Generated by Epydoc 2.1 on Tue Aug 22 04:29:45 2006 http://epydoc.sf.net