def get_inserts(self):
"""
Construct insert queries from this aggregation
Args:
selects: the dictionary of select queries to use
if None, use self.get_selects()
this allows you to customize select queries before creation
Returns:
a dictionary of group : inserts pairs where
group are the same keys as groups
inserts is a list of InsertFromSelect objects
"""
return {group: [InsertFromSelect(self.get_table_name(group), sel) for sel in sels]
for group, sels in self.get_selects().items()}
评论列表
文章目录