Skip to content
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

refactor: ratings repository #599

Merged
merged 13 commits into from
Feb 15, 2024
Merged

refactor: ratings repository #599

merged 13 commits into from
Feb 15, 2024

Conversation

7mochi
Copy link
Contributor

@7mochi 7mochi commented Feb 13, 2024

Describe your changes

Related Issues / Projects

Checklist

  • I've manually tested my code

@7mochi 7mochi added enhancement New feature or request code quality Something is implemented poorly labels Feb 13, 2024
@7mochi 7mochi mentioned this pull request Feb 13, 2024
17 tasks
return cast(Rating, dict(_rating._mapping))


async def fetch_all(map_md5: str) -> list[Rating]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a bit more flexible - we can make it fetch_many which allows for optional pagination, map md5 as an optional filter as well as an optional user id filter

@cmyui
Copy link
Member

cmyui commented Feb 15, 2024

@cmyui
Copy link
Member

cmyui commented Feb 15, 2024

There is also

"SELECT AVG(rating) rating FROM ratings WHERE map_md5 = :map_md5",

Copy link
Member

@cmyui cmyui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested & working

@cmyui cmyui enabled auto-merge (squash) February 15, 2024 06:09
@cmyui cmyui disabled auto-merge February 15, 2024 06:09
@cmyui cmyui merged commit 0d8012f into master Feb 15, 2024
5 checks passed
@cmyui cmyui deleted the map_ratings_repo branch February 15, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Something is implemented poorly enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants