-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make tRPC procedure for user and tournament searching #26
Comments
It seems tournaments don't have any field to define if they're public or not. How should it be handled? |
The Tournament table has a |
Might consider moving the publish and conclude dates into their own separate fields in the Tournament table, to make indexing those fields easier and also querying them easier. |
Yeah it sounds more logical to have them separated. Let's go with that |
Alright, I'll create a separate issue for that then, and we'll solve that one first before this one. |
Issue #23 and #37 has to be addressed before doing this issue.
Why?
Any user should be able to search for other users and any published tournaments.
How?
The input would be a string, and the procedure would return an array of users and an array of tournaments.
Searching for users
Each user must return: User.id, User.osuUserId, OsuUser.username. The user must be able to search users using the following fields:
Only if exact match (
{field} = {search_str}
):Relative search (
{field} ilike '%{search_str}%'
):Conditions:
Searching for tournaments
Each tournament must return: Tournament.url_slug, Tournament.name, Tournament.acronym, Tournament.logoMetadata, Tournament.bannerMetadata. The user must be able to search tournaments using the following fields:
Only if exact match (
{field} = {search_str}
):Relative search (
{field} ilike '%{search_str}%'
):Conditions:
Other considerations
Apply database indexes if needed to improve query performance.
The text was updated successfully, but these errors were encountered: