Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace SQL with ORM in reporting app. Fix #127 #146
Note: I've wanted to have each change in its own commit but when I started working on Custom Report and Testing Report I realized some of the classes inherit from each other and that's why the last commit lumps several changes together.
I realize this PR is quite big and possibly impractical for review but I've taken case to optimize the new ORM queries and validate the results are correct.
Note2: In Testing Report (possibly others) there are places which utilize 2 or 3 queries but can be now optimized to only 1 query. These are often where we count number of plans, runs. All of that info can be fetched with a single query and put together with a bit of Python code if need be. I've optimized in a few places but not all of them since my goal was to get all reports running on PostgreSQL.