-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert raw SQL to ORM #1
Comments
Do you have an ORM already being used for other queries? If not do you have a preference on which ORM is used? |
SQLAlchemy is already being used. These three queries are the only ones remaining that needs to be converted. |
FYI If you're looking to support non postgres dbs I think the insert will need to be refactored to not rely on the postgresql dialect as well. https://github.com/raphattack/espn-ffb/blob/master/espn_ffb/db/query.py#L9 |
get_h2h_standings could probably be left as raw sql as I don't see anything there that's database specific. For the others the |
in order to support more database options. Related issue: raphattack#1
in order to support more database options. Related issue: raphattack#1 Also: - Include ties in denominator when calculating win percentage, average points for, and average points against - Removes get_standings_overall in favor of get_standings now accepting an optional year kwarg that defaults to None. When no year/ None is provided all years are included.
Really appreciate the help @smfarrelly! |
The following queries need to be converted to the ORM equivalent:
The text was updated successfully, but these errors were encountered: