Package lemon :: Package external :: Package gadfly :: Module store :: Class Database0
[show private | hide private]
[frames | no frames]

Class Database0


Quick and dirty in core database representation.

Method Summary
  __init__(self, shadowing, log)
Dictionary of relations.
  __delitem__(self, name)
  __getitem__(self, name)
  __repr__(self)
  __setitem__(self, name, relation)
bind a name (uppercased) to tuples as a relation.
  add_datadef(self, name, defn, logit)
only log the datadef if logit is set, else ignore redefinitions...
  add_index(self, name, index)
  bindings(self, fromlist)
return (attdict, reldict, amb, ambatts) from fromlist = [(name,alias)...]...
  clear(self)
I'm not sure if database has circular structure, so this added...
  commit(self)
commit shadowed changes...
  drop_datadef(self, name)
  drop_index(self, name)
  get_for_update(self, name)
note: does not imply updates, just possibility of them...
  getdatadefs(self)
  has_datadef(self, name)
  has_relation(self, name)
  relations(self)
  reshadow(self, db, dblog)
(re)make self into shadow of db with dblog...
  set_introspection(self)

Class Variable Summary
int introspect = 1                                                                     
int is_scratch = 0                                                                     
int readonly = 0                                                                     
int verbose = 0                                                                     

Method Details

__init__(self, shadowing=None, log=None)
(Constructor)

Dictionary of relations.

__setitem__(self, name, relation)
(Index assignment operator)

bind a name (uppercased) to tuples as a relation.

add_datadef(self, name, defn, logit=1)

only log the datadef if logit is set, else ignore redefinitions

bindings(self, fromlist)

return (attdict, reldict, amb, ambatts) from fromlist = [(name,alias)...]
where reldict: alias > tuplelist
      attdict: attribute_name > unique_relation
      amb: dict of dottedname > (rel, att)
      ambatts: dict of ambiguous_name > witness_alias

clear(self)

I'm not sure if database has circular structure, so this added

commit(self)

commit shadowed changes

get_for_update(self, name)

note: does not imply updates, just possibility of them

reshadow(self, db, dblog)

(re)make self into shadow of db with dblog

Class Variable Details

introspect

Type:
int
Value:
1                                                                     

is_scratch

Type:
int
Value:
0                                                                     

readonly

Type:
int
Value:
0                                                                     

verbose

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.0 on Mon Nov 10 15:07:54 2003 http://epydoc.sf.net