示例#1
0
文件: models.py 项目: xschlef/bcfg2
 def prune_orphans():
     '''Prune oprhaned rows... no good way to use the ORM'''
     cursor = connection.cursor()
     cursor.execute(
         'delete from reports_performance where not exists (select ri.id from reports_performance_interaction ri where ri.performance_id = reports_performance.id)'
     )
     transaction.set_dirty()
示例#2
0
文件: models.py 项目: xschlef/bcfg2
 def prune_orphans():
     '''Prune oprhaned rows... no good way to use the ORM'''
     cursor = connection.cursor()
     cursor.execute(
         'delete from reports_entries where not exists (select rei.id from reports_entries_interactions rei where rei.entry_id = reports_entries.id)'
     )
     transaction.set_dirty()
示例#3
0
文件: models.py 项目: Bcfg2/bcfg2
 def prune_orphans():
     '''Prune oprhaned rows... no good way to use the ORM'''
     cursor = connection.cursor()
     cursor.execute('delete from reports_performance where not exists (select ri.id from reports_performance_interaction ri where ri.performance_id = reports_performance.id)')
     transaction.set_dirty()
示例#4
0
文件: models.py 项目: Bcfg2/bcfg2
 def prune_orphans():
     '''Prune oprhaned rows... no good way to use the ORM'''
     cursor = connection.cursor()
     cursor.execute('delete from reports_entries where not exists (select rei.id from reports_entries_interactions rei where rei.entry_id = reports_entries.id)')
     transaction.set_dirty()