Package pylal :: Module autotrackutils :: Class autotrackSQL
[hide private]
[frames] | no frames]

Class autotrackSQL

source code

This class provides sqlite table creation query deletion etc, related funtions for working the the autotrack databases. This

Instance Methods [hide private]
 
__init__(self, dbName="autotrack_default.sqlite")
Initializes the variables associated with the autotrackSQL database manipulations.
source code
 
__selectDB__(self, dbName='autotrack_default.sqlite')
Selects the specified if it exists is reads the contents or if not is issues a warning and tells you the db needs to be created.
source code
 
DEPRICATEDgetTableIndex(self, name="")
Given a string searches the tuple self.defineTables to determine the index of that table to various function calls.
source code
 
__DEPRICATEDcreateSingleTable__(self, name)
This method will generate a table from the list of tables and definitions specified by self.autotrackTableDef or self.auxTableDef
source code
 
__createSingleTable__(self, name=None, tabledef=None)
This method will generate a table from the list of tables and definitions specified by self.autotrackTableDef or self.auxTableDef
source code
 
getSocket(self)
Returns an object which is a raw handle to the dqlite DB.
source code
 
createTables(self, overwrite=bool(False))
This function call will create the specified sqlite db unless there exists one already.
source code
 
getThreads(self, table='tgn', time=None)
This method will fetch the groups defined at time NOW in table TGN(default).
source code
 
getThreadHeads(self, table='tgn', time=None)
This returns only the head of the thread to keep memory requirements to a minimum.
source code
 
getThreadByName(self, table='tgn', name=None)
This function will return a thread object (list) for a TGN thread that exists in the table specified.
source code
 
getThreadHeadByName(self, table='tgn', name=None)
Returns a single TGN object the thread head for quoted thread.
source code
Method Details [hide private]

__init__(self, dbName="autotrack_default.sqlite")
(Constructor)

source code 

Initializes the variables associated with the autotrackSQL database manipulations. Setup is {TableName,Bool,{Definition}}

getSocket(self)

source code 

Returns an object which is a raw handle to the dqlite DB. This is equivalent to being returned X from X=sqlite.connect('dbfilename')

createTables(self, overwrite=bool(False))

source code 

This function call will create the specified sqlite db unless there exists one already. In that case we throw an error unless we explicitly want to overwrite that table.

getThreads(self, table='tgn', time=None)

source code 

This method will fetch the groups defined at time NOW in table TGN(default). It returns these groups as a list of TGN objects.

getThreadHeads(self, table='tgn', time=None)

source code 

This returns only the head of the thread to keep memory requirements to a minimum. The thread object will only be loaded if a manipulation to the thread or thread report method is called.

getThreadByName(self, table='tgn', name=None)

source code 

This function will return a thread object (list) for a TGN thread that exists in the table specified. By default we search the active threads in table TGN.