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

Class Database


Method Summary
  __init__(self, filename, virtualtables)
@param filename: database filename...
  __del__(self)
  __enter__(self)
  __exit__(self, ex_type, ex_value, tb)
  doestableexist(self, tablename)
  getcolumns(self, tablename, onlynames)
  sql(self, statement, params)
Executes statement and return a generator of the results
  sqlmany(self, statement, params)
execute statements repeatedly with params
  updateindirecttable(self, tablename, indirects)

Method Details

__init__(self, filename, virtualtables=None)
(Constructor)

@param filename: database filename
@param virtualtables: a list of dict specifying the virtual tables
    Each dict is expected to have the following keys:
    'tablename': the name of the virtual table
    'modulename': the name of the module that implements this virtual
        table
    'moduleclass': the ModuleBase subclass that implements this
        virtual table
    'args': arguments passed to instantiaion of the module class

sql(self, statement, params=())

Executes statement and return a generator of the results

sqlmany(self, statement, params)

execute statements repeatedly with params

Generated by Epydoc 2.1 on Fri Aug 15 18:58:32 2008 http://epydoc.sf.net