Closed spencerbart closed 1 year ago
One option is to use query_raw instead of query: https://docs.rs/tokio-postgres/latest/tokio_postgres/struct.Client.html#method.query_raw
@spencerbart Can you show how you are calling it in an Axum handler? I just tried something like this in an Actix handler and am not getting any errors.
This is the vector that I initialize.
I then add params dynamically to the vector at runtime (it's a weird use case where I don't know how many or what params are being passed in).
I then create a slice and then pass it into the query method.
This would work but I am using it in Axum and this is the error that comes up.
I try to add Send but that doesn't work because of query's signature
How do I go about creating a vector that can be dynamically allocated to and passed into query?