Public Member Functions | Public Attributes | List of all members
bp_database.BlessedPlotsDB Class Reference

Public Member Functions

def __init__ (self)
 

Public Attributes

 path
 
 schema
 
 conn
 

Detailed Description

A class for interacting with an SQLite3 file

All relevant metadata associated with a single DocDB document will be 
stored in a member of this class.

Attributes:
    path (str)          : Path to SQLite3 file
    schema (str)         : Path to SQLite3 schema definition file
    conn (sqlite)     : SQLite3 connection

Definition at line 11 of file bp_database.py.

Constructor & Destructor Documentation

def bp_database.BlessedPlotsDB.__init__ (   self)

Definition at line 23 of file bp_database.py.

Referenced by PandAna.core.core.spectrum.fill().

23  def __init__(self):
24  # Class variables
25  self.path = config.SQLITE_FILE_PATH
26  self.schema = config.SQLITE_SCHEMA_PATH
27  self.conn = sqlite3.connect(self.path)
28  self.conn.text_factory = str
29 
30  # Open the database file and apply schema
31  f = open(self.schema, 'r')
32  sql = f.read()
33  self.conn.executescript(sql)
34  f.close()

Member Data Documentation

bp_database.BlessedPlotsDB.conn

Definition at line 27 of file bp_database.py.

bp_database.BlessedPlotsDB.schema

Definition at line 26 of file bp_database.py.

Referenced by ProjMan.Consumer.establish().


The documentation for this class was generated from the following file: