How to build safe dynamic query with sqlx in rust? #2258
Unanswered
finlaydotb
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Did you find a way? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to build queries dynamically and looking at the documentation here I see sqlx supports dynamically building queries of the form:
But I am interested in building more complex queries like
Where any of the where clause is optional. So following should also be dynamically built
I can't seem to find a way to do this with sqlx except from having to manually concatenate the where string myself
Beta Was this translation helpful? Give feedback.
All reactions