You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
It seems like an oversight that the trait
GenericClient
doesn't have asimple_query
method, when both types that implement it have that method. If you have aGenericClient
you can callsimple_query
indirectly by starting a transaction and then calling it on theTransaction
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.
The text was updated successfully, but these errors were encountered: