Closed ramnivas closed 4 days ago
Thinking about it, it seems like we could make query_typed do this when invoked with a non-prepared statement instead of adding a new method.
Thinking about it, it seems like we could make query_typed do this when invoked with a non-prepared statement instead of adding a new method.
Did you mean prepare_typed
(there is no query_typed
). One nice thing about the new query_with_param_types
is that it takes param values and param types through tuples, so the client cannot specify fewer (or more) types than parameter length.
Did you mean
prepare_typed
(there is noquery_typed
).
Ah yeah my idea didn't really make much sense :D
Let's rename the method to query_typed
, which aligns with prepare_typed
and is a bit shorter.
Let's rename the method to
query_typed
, which aligns withprepare_typed
and is a bit shorter.
Done!
LGTM but there's one small clippy error to fix.
LGTM but there's one small clippy error to fix.
Fixed.
Thanks!
Thanks!
Thank you!
Introduce a new
query_with_param_types
method that allows to specify Postgres type parameters. This obviated the need to use prepared statements just to obtain parameter types for a query. It then combines parse, bind, and execute in a single packet.Related: #1017, #1067