Module ESVersionManager :: Class ESVersionManager
[show private | hide private]
[frames | no frames]

Class ESVersionManager

ESFileTypes --+    
              |    
    SQLUtil --+    
              |    
         ESInit --+
                  |
                 ESVersionManager


ESVersionManager is in charge of moving grades within EventStore
Method Summary
  __init__(self, db, dbType, logFile)
Initialize database pointer, cursor, db type (MySQL or SQLite).
  checkRunsInDB(self, grade, tStamp)
Check if new list overlap with a list of run-ranges in DB
  diffLists(self, list1, list2)
Compare two list of run-ranges.
  findLatestTimeStamp(self, iGrade)
Search for latest timeStamp in Version table, it will assign a day ahead for non existing grade.
  formNewRunList(self, iGrade, iTime)
Form a new run-range list for given grade/timeStamp from badRunList or use goodRunList for make it
  formQuery(self, iGrade, iTime)
Form a query for given grade/time to lookup in Version table
  moveGrade(self, iGrade, oGrade, iTime, oTime)
Main method to move a grade in EventStore.
  setExcludeRunList(self, runList)
Set list of runs to be excluded
  setGoodRunList(self, runList)
Set list of runs to be excluded
  setMaxRun(self, maxR)
Set upper run range bound to be used
  setMinRun(self, minR)
Set lower run range bound to be used
  setSVName(self, svName)
Set data version name to be used
    Inherited from ESFileTypes
integer allow(self, type)
Check if given file type is allowed in EventStore.
integer allowToInject(self, type)
Check if given file type is allowed for injection in EventStore.
list esFileTypes(self)
Return a list of known file types supported in EventStore.
list esInjectionFileTypes(self)
Return a list of known file types supported in EventStore which allowed for injection.
integer isDatType(self, iFileType)
Check if given file type is data file.
integer isKeyType(self, iFileType)
Check if given file type is index file.
integer isLocType(self, iFileType)
Check if given file type is location file.
    Inherited from SQLUtil
  close(self)
Close cursor and db connector
  commit(self)
Explicit commit
  createTables(self, table)
Create table(s) in EventStore database.
  dropTable(self, table)
Drop table in EventStore
  endTxn(self, msg)
Update EventStore db log and invoke COMMIT transaction.
  fetchAll(self, query)
Update a EventStore log and retrieve all rows for given query
  fetchOne(self, query)
Update a EventStore log and retrieve one row for given query
  findFileForRun(self, run, time)
Find location of the data file holding given run
  getAllParents(self, childName)
Get all parents for given child name
  getIsolationLevel(self)
Get isolation level of SQLite DB
  getLastId(self, table)
Get last autoincemented id for given table
  getTableNames(self)
Return a list of table names in EventStore DB
  getTables(self)
Return list of tables from DB
  getTableSchema(self, tableName)
Return EventStore table schema
  idx(self, name)
  lockTables(self, tableName)
Lock tables in EventStore.
  makeESQuery(self, timeStamp)
Return the following dictionary: dict[time]=[(grade,minR,maxR,svName)]
  printDBContent(self, table)
Print content of given table in EventStore DB
  printESInfo(self, timeStamp)
Dump EventStore DB content in user readable format.
  printRuns(self, minR, maxR)
Print list of runs for given run range
  rollback(self)
Rollback transaction
  setCommitFlag(self, flag)
Set flag which will inform underlying DB what to do with transaction commits.
  setIsolationLevel(self, level)
Set isolation level for internal DB (necessary to perform SQLite transactions.
  setVerboseLevel(self, verbose)
Set verbose level, 0 low, 1 is high.
  showDepend(self, childName)
Print all dependencies for given data version name.
  startTxn(self, msg)
Update EventStore db log and invoke BEGIN transaction.
  unlockTables(self)
Unlock all locked tables in EventStore
  updateDBAndLog(self, iQuery, cQuery)
  updateLog(self, iQuery, cQuery)
Update EventStore log and execute given query.
  writeToLog(self, msg)
Update EventStore db log with time/pid/msg signature

Method Details

__init__(self, db, dbType, logFile)
(Constructor)

Initialize database pointer, cursor, db type (MySQL or SQLite). Retrieve information about table names from underlying DB.
Overrides:
es_init.ESInit.__init__ (inherited documentation)

checkRunsInDB(self, grade, tStamp)

Check if new list overlap with a list of run-ranges in DB

diffLists(self, list1, list2)

Compare two list of run-ranges. Order lists and look first if for intersection between them, if found show difference between list1 and list2

findLatestTimeStamp(self, iGrade)

Search for latest timeStamp in Version table, it will assign a day ahead for non existing grade.

formNewRunList(self, iGrade='', iTime='')

Form a new run-range list for given grade/timeStamp from badRunList or use goodRunList for make it

formQuery(self, iGrade, iTime)

Form a query for given grade/time to lookup in Version table

moveGrade(self, iGrade, oGrade, iTime, oTime)

Main method to move a grade in EventStore. It accepts old/new grade and timeStamp. Based on user settings it can make a duplicates, exclude some runs while moving one grade into another.

setExcludeRunList(self, runList)

Set list of runs to be excluded

setGoodRunList(self, runList)

Set list of runs to be excluded

setMaxRun(self, maxR)

Set upper run range bound to be used

setMinRun(self, minR)

Set lower run range bound to be used

setSVName(self, svName)

Set data version name to be used

Generated by Epydoc 2.1 on Tue Jan 24 10:46:00 2006 http://epydoc.sf.net