Module database
[hide private]
[frames] | no frames]

Module database

source code

Interface to the database

Classes [hide private]
  basedataobject
A base object derived from dict that is used for various records.
  dataobjectfactory
Called by the code to read in objects when it needs a new object container
  IntegrityCheckFailed
  Database
  ModuleBase
Base class to implement a specific Virtual Table module with apsw.
Functions [hide private]
 
extractbitpimserials(dict)
Returns a new dict with keys being the bitpim serial for each row.
source code
 
ensurebitpimserials(dict)
Ensures that all records have a BitPim serial.
source code
 
findentrywithbitpimserial(dict, serial)
Returns the entry from dict whose bitpim serial matches serial
source code
 
ensurerecordtype(dict, factory) source code
 
ExclusiveWrapper(method)
Wrap a method so that it has an exclusive lock on the database (noone else can read or write) until it has finished
source code
 
sqlquote(s)
returns an sqlite quoted string (the return value will begin and end with single quotes)
source code
 
idquote(s)
returns an sqlite quoted identifier (eg for when a column name is also an SQL keyword
source code
Variables [hide private]
  dictdataobjectfactory = database.dictdataobjectfactory
  TRACE = False
Function Details [hide private]

extractbitpimserials(dict)

source code 

Returns a new dict with keys being the bitpim serial for each row. Each item must be derived from basedataobject

ensurebitpimserials(dict)

source code 

Ensures that all records have a BitPim serial. Each item must be derived from basedataobject

idquote(s)

source code 

returns an sqlite quoted identifier (eg for when a column name is also an SQL keyword

The value returned is quoted in square brackets