I would like to generate parameterized queries using rusqlite, to be executed in a different thread. That is, I would like to parameterize a string into the final SQL statement, before passing it to conn.execute.
I can see that there is an "expanded_sql" function in https://github.com/rusqlite/rusqlite/blob/master/src/statement.rs#L690 -- but I am not sure whether this is the right function and/or how to use it. I don't really want to do a prepared statement, just parameterize the string.
I have also got lost in lots of problems passing a dyn ToSql between threads, which is not allowed. Working with strings of the queries seems much safer?
Is there a good way to do this?