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

Support feteching T, (T, U), (T, U, P)..etc where they impl TryGetableMany #208

Merged
merged 2 commits into from
Sep 30, 2021

Conversation

MuhannadAlrusayni
Copy link
Contributor

Resolve #180

This is not the best API for sure! but we can start with this. One blocker that I got was SelectorTrait::from_raw_query_result is a function, which doesn't help when I want to store some data into SelectGetableValue, so I used generic type C to work around this, but yeah we don't get very ergonomic API.

@MuhannadAlrusayni
Copy link
Contributor Author

if we could convert SelectorTrait::from_raw_query_result to be a method instead of function, that would help us have way better API in this PR.

But I think this is breaking change API.

@billy1624
Copy link
Member

Thanks!! @MuhannadAlrusayni

if we could convert SelectorTrait::from_raw_query_result to be a method instead of function, that would help us have way better API in this PR.

I think this is worth doing as this enable us to store metadata that is useful when performing from_raw_query_result. And it's potentially useful for downstream types that implement SelectorTrait.

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

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

I think we can use sea_query::Iden to replace ToString.
I will make the changes.

@tyt2y3 tyt2y3 merged commit 5728ac4 into SeaQL:master Sep 30, 2021
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.

Support feteching T, (T, U), (T, U, P)..etc where they impl TryGetableMany
3 participants