igwn_ligolw.dbtables Module¶
This module provides an implementation of the Table element that uses a database engine for storage. On top of that it then re-implements a number of the tables from the lsctables module to provide versions of their methods that work against the SQL database.
NOTE: this is not an object-relational mapper. This module’s function is to facilitate bi-directional format conversion between XML format files and SQLite database files, and the merging of LIGO Light-Weight XML style databases into single database files. Some basic object-relational mapper features have been implemented where it was found to be trivial to do so, in case they come in handy, but applications that wish to interact with the contents of an SQLite database file must, for the most part, do so using SQL code. To be clear, an example of what this means: appending a row object to a table only inserts values of the row object’s attributes at that time into the database; subsequently, modifying the attributes of that row object in the Python calling code only modifies that object, it does not update the contents of the databse.
Functions¶
|
Using the how_to_index annotations in the table class definitions, construct a set of indexes for the database at the given connection. |
|
A totally broken attempt to determine what type of database a connection object is attached to. |
|
Return a list of the table names in the database. |
|
Construct an XML document tree wrapping around the contents of the database. |
|
Modify ContentHandler, a sub-class of igwn_ligolw.ligolw.LIGOLWContentHandler, to cause it to use the DBTable class defined in this module when parsing XML documents. |
Classes¶
|
|
|
A version of the Table class using an SQL database for storage. |
|
|
|
Create and manage the _idmap_ table in an sqlite database. |
|
Manage a working copy of an sqlite database file. |
Class Inheritance Diagram¶
