Package twisted :: Package world :: Module database :: Class Database
[show private | hide private]
[frames | no frames]

Class Database


Method Summary
  __init__(self, dirname)
  cacheInstance(self, inst, uidt)
  close(self)
  dumpHTML(self, f)
  dumpHTMLData(self, f)
  dumpstep(self)
str insert(self, obj)
Insert an object into the database, returning the OID it can be retrieved with.
  keyToMapper(self, key)
  mapperToKey(self, mapper)
  queryClassSelect(self, klass, _cond, **kw)
Table registerClass(self, klass)
Return a table that will store instances of this class
  retrieve(self, uid)
Retrieve an object from the database by UID.
  retrieveOID(self, oid, genhash, uid)
  sanityCheck(self)
  structured(self, name, *fields)
Return
  _genUIDTup(self)
str _insert(self, obj, root)
Actually insert an object.

Class Variable Summary
int _logcount
int _superchatty

Method Details

insert(self, obj)

Insert an object into the database, returning the OID it can be retrieved with.
Returns:
An OID to the object that is being inserted, that it can be retrieved with.
           (type=str)

registerClass(self, klass)

Returns:
a table that will store instances of this class
           (type=Table)

retrieve(self, uid)

Retrieve an object from the database by UID.
Parameters:
uid - The UID to a particular storable, as returned by Database.insert or Storable.getUID
           (type=str)
Raises:
KeyError - the UID was not found.

structured(self, name, *fields)

Return

_insert(self, obj, root)

Actually insert an object.
Parameters:
obj - the Storable to store.
           (type=Storable)
root - should this reference be treated as a `root' reference? i.e. is this a top-level reference added by the user, to which this database should be treated as a container?
           (type=boolean)
Returns:
similar to self.insert
           (type=str)

Class Variable Details

_logcount

Type:
int
Value:
0                                                                      

_superchatty

Type:
int
Value:
0                                                                      

Generated by Epydoc 1.1 on Fri Jun 27 03:49:20 2003 http://epydoc.sf.net