本文整理汇总了Python中auto_gen.DBWorkflow.do_copy方法的典型用法代码示例。如果您正苦于以下问题:Python DBWorkflow.do_copy方法的具体用法?Python DBWorkflow.do_copy怎么用?Python DBWorkflow.do_copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auto_gen.DBWorkflow
的用法示例。
在下文中一共展示了DBWorkflow.do_copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_copy
# 需要导入模块: from auto_gen import DBWorkflow [as 别名]
# 或者: from auto_gen.DBWorkflow import do_copy [as 别名]
def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
cp = _DBWorkflow.do_copy(self, new_ids, id_scope, id_remap)
cp.__class__ = DBWorkflow
# need to go through and reset the index to the copied objects
cp.build_index()
cp.tmp_id = copy.copy(self.tmp_id)
return cp
示例2: do_copy
# 需要导入模块: from auto_gen import DBWorkflow [as 别名]
# 或者: from auto_gen.DBWorkflow import do_copy [as 别名]
def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
cp = _DBWorkflow.do_copy(self, new_ids, id_scope, id_remap)
cp.__class__ = DBWorkflow
# need to go through and reset the index to the copied objects
cp.objects = {}
for (child, _, _) in cp.db_children():
cp.add_to_index(child)
cp.tmp_id = copy.copy(self.tmp_id)
return cp