sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Provide a `replace_arguments` dual to `take_arguments

Open lu-zero opened this issue 8 months ago • 0 comments

I have found these related issues/pull requests

I did not create an issue regarding having a mean to run explain before running a query, but I can prepare one

Description

It should allow to take_arguments from a query, use it in another query and put them back.

It makes simpler to have a non-destructive way to run EXPLAIN over already built queries before executing them.

Prefered solution

Adding the replace_arguments call to a companion trait and implement it on Query and related structs would be simple enough, I can provide a PR if you deem it acceptable.

Is this a breaking change? Why or why not?

If it is implemented as companion trait it wouldn't break anything.

lu-zero avatar Apr 23 '25 09:04 lu-zero