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

Generic type filter 1 #97

Merged
merged 5 commits into from
Nov 10, 2022
Merged

Generic type filter 1 #97

merged 5 commits into from
Nov 10, 2022

Conversation

billy1624
Copy link
Member

karatakis and others added 4 commits November 8, 2022 15:29
* separate StringFilter
* implement FilterTrait for enumerations Filters
* implement FilterTrait for FilterType struct
@billy1624 billy1624 self-assigned this Nov 10, 2022
@billy1624
Copy link
Member Author

Hey @karatakis, check this. To be honest, this is harder than I originally thought loll

I introduce one more trait, FilterTypeTrait to mark the filter struct for every support primitives and custom types including db Enums.

@karatakis karatakis marked this pull request as ready for review November 10, 2022 12:32
Copy link
Collaborator

@karatakis karatakis left a comment

Choose a reason for hiding this comment

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

Amazing work!!! Thanks for solving this puzzle for me :)

@karatakis karatakis merged commit c49bd99 into main Nov 10, 2022
@billy1624 billy1624 linked an issue Nov 11, 2022 that may be closed by this pull request
@tyt2y3
Copy link
Member

tyt2y3 commented Nov 15, 2022

To be honest, this is harder than I originally thought loll

Just being curious, where the difficulty lies in? Rust? or mechanism of Seaography itself?

@billy1624
Copy link
Member Author

The difficulty comes from Rust. So in this case we need to take any input object accepted by async_graphql then construct a filter object for that input object. How can we tell Rust compiler the corresponding type of the filter object? Associated type! That's something I miss out at the planning phase.

@billy1624 billy1624 mentioned this pull request Dec 1, 2022
3 tasks
@karatakis karatakis deleted the generic-type-filter-1 branch December 6, 2022 14:59
@skopz356 skopz356 mentioned this pull request Jan 17, 2023
1 task
@github-actions
Copy link

🎉 Released In 0.3.0 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A generic filter for any types and database enums support type alias
3 participants