You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
sqlx::query("INSERT INTO table VALUES ?", my_vector_of_objects);
It's not even possible to say
sqlx::query("INSERT INTO table VALUES ?", my_object);
You have to put each field of your object into the placeholder
sqlx::query("INSERT INTO table VALUES (?, ..., ?)", my_object.a, ..., my_object.z);
It becomes a nightmare when we are talking about batch inserts.
I've created the solution which builds the correct SQL from pieces, but it leads to the SQL injections.
I also abused fmt::Display for this, which is also not good.
We need to think about a better solution.
The text was updated successfully, but these errors were encountered:
With
sqlx
, it's not possible to sayIt's not even possible to say
You have to put each field of your object into the placeholder
It becomes a nightmare when we are talking about batch inserts.
I've created the solution which builds the correct SQL from pieces, but it leads to the SQL injections.
I also abused
fmt::Display
for this, which is also not good.We need to think about a better solution.
The text was updated successfully, but these errors were encountered: