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
Refactor SQL and use ORM queries instead #139
Supersedes #135 by removing all hard-coded SQL statements and replacing them with Django ORM queries. I have split changes into separate commits for easier reviewing but can squash them into one bigger commit before merging if you like.
In this particular instance the ORM queries result in the same SQL statements being sent to the DB backend so there should be no change in performance constraints. There is even a slight improvement at a couple of places where I've gotten rid of secondary hits to DB or fetching duplicate rows when they were not needed.
@tkdchen please review and let me know if you want me to squash all commits together.
OK, I understand it is not priority to do this change right now, but the patch looks good and doesn't actually change the underlying queries. It doesn't bring any negative impact but on the other hand makes Nitrate more portable. I don't understand why not simply merge.