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

Consider adding a simple_query method to GenericClient #1069

Open
and-reas-se opened this issue Oct 4, 2023 · 1 comment
Open

Consider adding a simple_query method to GenericClient #1069

and-reas-se opened this issue Oct 4, 2023 · 1 comment

Comments

@and-reas-se
Copy link

It seems like an oversight that the trait GenericClient doesn't have a simple_query method, when both types that implement it have that method. If you have a GenericClient you can call simple_query indirectly by starting a transaction and then calling it on the Transaction you get, but you can't just call it directly.

I ran into it when writing a function to do migrations. I wanted to start the transaction in the caller and have my function take a GenericClient,, but instead had to start the transaction inside the function to get access to the method in question.

Not a big deal, but I thought I'd point out the discrepancy.

@sfackler
Copy link
Owner

sfackler commented Oct 4, 2023

Huh, yeah it looks like it's missing from tokio-postgres's for some reason - strange! Happy to take a PR adding it, or I can do it when I have a chance.

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

No branches or pull requests

2 participants