- q = projectB.query("SELECT o.package, p.priority, s.section, o.maintainer, p.level FROM override o, priority p, section s WHERE o.suite = %s AND o.component = %s AND o.type = %s AND o.priority = p.id AND o.section = s.id ORDER BY s.section, p.level, o.package" % (suite_id, component_id, otype_id))
- for i in q.getresult():
- i = i[:-1]; # Strip the priority level
- override[suite][component][otype][i[0]] = i
- output_file.write(utils.result_join(i)+'\n')
+ #q = session.query(Override).filter_by(suite_id = suite.suite_id)
+ #q = q.filter_by(component_id = component.component_id)
+ #q = q.filter_by(overridetype_id = otype.overridetype_id)
+ #q = q.join(Priority).join(Section).order_by(Section.section, Priority.level, Override.package)
+ #for o in q.all():
+ # dat = (o.package, o.priority.priority, o.section.section, o.maintainer)
+ # output_file.write(utils.result_join(dat) + '\n')
+ q = session.execute("SELECT o.package, p.priority, s.section, o.maintainer FROM override o, priority p, section s WHERE o.suite = %s AND o.component = %s AND o.type = %s AND o.priority = p.id AND o.section = s.id ORDER BY s.section, p.level, o.package" % (suite.suite_id, component.component_id, otype.overridetype_id))
+ for i in q.fetchall():
+ output_file.write(utils.result_join(i) + '\n')