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 119 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 230 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 202 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 254 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 173 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 142 of file dbUtil.py.
References str.
def dbUtil.dbUtil.describeSchema | ( | self | ) |
Print out the overview of the schema
Definition at line 22 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 153 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 50 of file dbUtil.py.
References GetRecoTauVFromDQM_MC_cff.next, and str.
def dbUtil.dbUtil.insertOneRow | ( | self, | |
tableName, | |||
tabrowDefDict, | |||
tabrowValueDict | |||
) |
Insert row
Definition at line 71 of file dbUtil.py.
References str.
def dbUtil.dbUtil.listIndex | ( | self, | |
tablename | |||
) |
Definition at line 13 of file dbUtil.py.
References edm.print().
Referenced by dbUtil.dbUtil.describeSchema().
def dbUtil.dbUtil.singleUpdate | ( | self, | |
tableName, | |||
setClause, | |||
updateCondition, | |||
inputData | |||
) |
Definition at line 87 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 95 of file dbUtil.py.
References str.