Public Member Functions | |
def | __init__ |
def | bulkInsert |
def | createEntryTable |
def | createIDTable |
def | createRevMapTable |
def | createTable |
def | deleteRows |
def | describeSchema |
def | dropAllTables |
def | dropTable |
def | existRow |
def | insertOneRow |
def | listIndex |
def | singleUpdate |
def | tableExists |
def | updateRows |
Private Attributes | |
__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')],[]]
def dbUtil.dbUtil.createEntryTable | ( | self, | |
tableName, | |||
deleteOld = True |
|||
) |
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().
Referenced by dbUtil.dbUtil.createTable().
def dbUtil.dbUtil.createIDTable | ( | self, | |
tableName, | |||
deleteOld = True |
|||
) |
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(), and nameDealer.idTableName().
Referenced by dbUtil.dbUtil.createTable().
def dbUtil.dbUtil.createRevMapTable | ( | self, | |
tableName, | |||
deleteOld = True |
|||
) |
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().
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(), python.IdGenerator.IdGenerator.createIDTable(), dbUtil.dbUtil.createIDTable(), dbUtil.dbUtil.createRevMapTable(), nameDealer.entryTableName(), and mergeVDriftHistosByStation.name.
def dbUtil.dbUtil.deleteRows | ( | self, | |
tableName, | |||
condition, | |||
conditionbindDict | |||
) |
def dbUtil.dbUtil.describeSchema | ( | self | ) |
Print out the overview of the schema
Definition at line 21 of file dbUtil.py.
References dbUtil.dbUtil.listIndex().
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 152 of file dbUtil.py.
References nameDealer.idTableName().
def dbUtil.dbUtil.existRow | ( | self, | |
tableName, | |||
condition, | |||
conditionDefDict, | |||
conditionDict | |||
) |
def dbUtil.dbUtil.insertOneRow | ( | self, | |
tableName, | |||
tabrowDefDict, | |||
tabrowValueDict | |||
) |
def dbUtil.dbUtil.listIndex | ( | self, | |
tablename | |||
) |
Definition at line 12 of file dbUtil.py.
References getHLTprescales.index.
Referenced by dbUtil.dbUtil.describeSchema().
def dbUtil.dbUtil.singleUpdate | ( | self, | |
tableName, | |||
setClause, | |||
updateCondition, | |||
inputData | |||
) |
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.