本文整理汇总了Python中WMCore.Database.DBCreator.DBCreator.execute方法的典型用法代码示例。如果您正苦于以下问题:Python DBCreator.execute方法的具体用法?Python DBCreator.execute怎么用?Python DBCreator.execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.Database.DBCreator.DBCreator
的用法示例。
在下文中一共展示了DBCreator.execute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execute
# 需要导入模块: from WMCore.Database.DBCreator import DBCreator [as 别名]
# 或者: from WMCore.Database.DBCreator.DBCreator import execute [as 别名]
def execute(self, conn = None, transaction = None):
"""
_execute_
"""
DBCreator.execute(self, conn, transaction)
return True
示例2: execute
# 需要导入模块: from WMCore.Database.DBCreator import DBCreator [as 别名]
# 或者: from WMCore.Database.DBCreator.DBCreator import execute [as 别名]
def execute(self, conn=None, transaction=None):
"""
_execute_
Check to make sure that all required tables have been defined. If
everything is in place have the DBCreator make everything.
"""
for requiredTable in self.requiredTables:
if requiredTable not in self.create.keys():
raise WMException("The table '%s' is not defined." % requiredTable, "WMCORE-2")
DBCreator.execute(self, conn, transaction)
return True