Public Member Functions | |
def | __init__ (self, schema) |
def | bulkInsert (self, tableName, tabrowDef, bulkinput) |
def | createEntryTable (self, tableName, deleteOld=True) |
def | createIDTable (self, tableName, deleteOld=True) |
def | createRevMapTable (self, tableName, deleteOld=True) |
def | createTable (self, description, withIdTable=False, withEntryTables=False, withRevMapTable=False) |
def | deleteRows (self, tableName, condition, conditionbindDict) |
def | describeSchema (self) |
def | dropAllTables (self) |
def | dropTable (self, tableName) |
def | existRow (self, tableName, condition, conditionDefDict, conditionDict) |
def | insertOneRow (self, tableName, tabrowDefDict, tabrowValueDict) |
def | listIndex (self, tablename) |
def | singleUpdate (self, tableName, setClause, updateCondition, inputData) |
def | tableExists (self, tableName) |
def | updateRows (self, tableName, updateAction, updateCondition, bindvarDef, bulkinput) |
Private Attributes | |
__schema | |
def dbUtil.dbUtil.__init__ | ( | self, | |
schema | |||
) |
def dbUtil.dbUtil.bulkInsert | ( | self, | |
tableName, | |||
tabrowDef, | |||
bulkinput | |||
) |
input: tableName, string tabrowDef,[('RUNNUM':'unsigned int'),('CMSLSNUM','unsigned int'),('FLAG','string'),('COMMENT','string')] bulkinput,[[('RUNNUM',1234),('CMSLSNUM',1234),('FLAG','GOOD'),('COMMENT','coment')],[]]
Definition at line 118 of file dbUtil.py.
Create Entry table for the given table.\n Input: name of the table which needs new associated id table Output: name of the id table created
Definition at line 229 of file dbUtil.py.
References nameDealer.entryTableName(), and harvestTrackValidationPlots.str.
Referenced by dbUtil.dbUtil.createTable().
Create ID table for the given table.\n Input: name of the table which needs new associated id table Output: name of the id table created
Definition at line 201 of file dbUtil.py.
References nameDealer.idTableColumnDefinition(), nameDealer.idTableName(), and harvestTrackValidationPlots.str.
Referenced by dbUtil.dbUtil.createTable().
Create Rev table for the given table.\n Input: name of the table Output: name of the id table
Definition at line 253 of file dbUtil.py.
References nameDealer.revmapTableName(), and harvestTrackValidationPlots.str.
Referenced by dbUtil.dbUtil.createTable().
def dbUtil.dbUtil.createTable | ( | self, | |
description, | |||
withIdTable = False , |
|||
withEntryTables = False , |
|||
withRevMapTable = False |
|||
) |
Create table if non-existing, create Id table if required
Definition at line 172 of file dbUtil.py.
References dbUtil.dbUtil.createEntryTable(), dbUtil.dbUtil.createIDTable(), dbUtil.dbUtil.createRevMapTable(), nameDealer.entryTableName(), dataset.name, and harvestTrackValidationPlots.str.
def dbUtil.dbUtil.deleteRows | ( | self, | |
tableName, | |||
condition, | |||
conditionbindDict | |||
) |
Delete row(s)
Definition at line 141 of file dbUtil.py.
References harvestTrackValidationPlots.str.
def dbUtil.dbUtil.describeSchema | ( | self | ) |
Print out the overview of the schema
Definition at line 21 of file dbUtil.py.
References dbUtil.dbUtil.listIndex(), and harvestTrackValidationPlots.str.
def dbUtil.dbUtil.dropAllTables | ( | self | ) |
Drop all tables can be listed by schema.listTables
Definition at line 162 of file dbUtil.py.
References harvestTrackValidationPlots.str.
def dbUtil.dbUtil.dropTable | ( | self, | |
tableName | |||
) |
Drop specified table.If associated Id table exists, drop also Id table
Definition at line 152 of file dbUtil.py.
References nameDealer.idTableName(), and harvestTrackValidationPlots.str.
def dbUtil.dbUtil.existRow | ( | self, | |
tableName, | |||
condition, | |||
conditionDefDict, | |||
conditionDict | |||
) |
Return true if one row fulfills the selection criteria
Definition at line 49 of file dbUtil.py.
References GetRecoTauVFromDQM_MC_cff.next, and harvestTrackValidationPlots.str.
def dbUtil.dbUtil.insertOneRow | ( | self, | |
tableName, | |||
tabrowDefDict, | |||
tabrowValueDict | |||
) |
Insert row
Definition at line 70 of file dbUtil.py.
References harvestTrackValidationPlots.str.
def dbUtil.dbUtil.listIndex | ( | self, | |
tablename | |||
) |
def dbUtil.dbUtil.singleUpdate | ( | self, | |
tableName, | |||
setClause, | |||
updateCondition, | |||
inputData | |||
) |
Definition at line 86 of file dbUtil.py.
References harvestTrackValidationPlots.str.
def dbUtil.dbUtil.tableExists | ( | self, | |
tableName | |||
) |
def dbUtil.dbUtil.updateRows | ( | self, | |
tableName, | |||
updateAction, | |||
updateCondition, | |||
bindvarDef, | |||
bulkinput | |||
) |
update rows, note update must be ordered input : tableName, string updateAction,string e.g. flag=:newflag conditionstring, string ,e.g. runnum=:runnum and cmslsnum=:cmslsnum bindvarDef,[('newflag','string'),('runnum','unsigned int'),('cmslsnum','unsigned int')] bulkinput,[[('newflag','GOOD'),('runnum',1234),('cmslsnum',1)],[]]
Definition at line 94 of file dbUtil.py.
References harvestTrackValidationPlots.str.