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

query should probably accept impl Into<T> instead of T #6

Closed
GlenDC opened this issue Apr 18, 2024 · 0 comments
Closed

query should probably accept impl Into<T> instead of T #6

GlenDC opened this issue Apr 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@GlenDC
Copy link
Member

GlenDC commented Apr 18, 2024

Let's say you have something called struct StringFilter(string) that you use as the property in your proxy db instance struct.
Most likely you do implement From<String> for StringFilter where you sanitise the string prior to storing it.

Thing is... Right now if you have the property foo: StringFilter, you need to do query.foo("a".into()).

This QoL improvement would make it that you can do query.foo("a") instead, which is easier to use and also
is closer to the intent of the property, given that the StringFilter wrapper is only there to facilitate behaviour
we want from the database interaction, rather then a high level detail that a user should really care about.

@GlenDC GlenDC added the enhancement New feature or request label Apr 18, 2024
@GlenDC GlenDC added this to the v0.2.2 milestone Apr 18, 2024
@GlenDC GlenDC self-assigned this Apr 18, 2024
@GlenDC GlenDC closed this as completed in c5d4f5f Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant