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 120 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 231 of file dbUtil.py.
References nameDealer.entryTableName(), edm.print(), and 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 203 of file dbUtil.py.
References nameDealer.idTableColumnDefinition(), nameDealer.idTableName(), edm.print(), and 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 255 of file dbUtil.py.
References edm.print(), nameDealer.revmapTableName(), and 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 174 of file dbUtil.py.
References dbUtil.dbUtil.createEntryTable(), dbUtil.dbUtil.createIDTable(), dbUtil.dbUtil.createRevMapTable(), nameDealer.entryTableName(), dataset.name, and str.
def dbUtil.dbUtil.deleteRows | ( | self, | |
tableName, | |||
condition, | |||
conditionbindDict | |||
) |
Delete row(s)
Definition at line 143 of file dbUtil.py.
References str.
def dbUtil.dbUtil.describeSchema | ( | self | ) |
Print out the overview of the schema
Definition at line 23 of file dbUtil.py.
References dbUtil.dbUtil.listIndex(), edm.print(), and str.
def dbUtil.dbUtil.dropAllTables | ( | self | ) |
def dbUtil.dbUtil.dropTable | ( | self, | |
tableName | |||
) |
Drop specified table.If associated Id table exists, drop also Id table
Definition at line 154 of file dbUtil.py.
References nameDealer.idTableName(), and str.
def dbUtil.dbUtil.existRow | ( | self, | |
tableName, | |||
condition, | |||
conditionDefDict, | |||
conditionDict | |||
) |
Return true if one row fulfills the selection criteria
Definition at line 51 of file dbUtil.py.
References GetRecoTauVFromDQM_MC_cff.next, and str.
def dbUtil.dbUtil.insertOneRow | ( | self, | |
tableName, | |||
tabrowDefDict, | |||
tabrowValueDict | |||
) |
Insert row
Definition at line 72 of file dbUtil.py.
References str.
def dbUtil.dbUtil.listIndex | ( | self, | |
tablename | |||
) |
Definition at line 14 of file dbUtil.py.
References edm.print().
Referenced by dbUtil.dbUtil.describeSchema().
def dbUtil.dbUtil.singleUpdate | ( | self, | |
tableName, | |||
setClause, | |||
updateCondition, | |||
inputData | |||
) |
Definition at line 88 of file dbUtil.py.
References 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 96 of file dbUtil.py.
References str.