Closed
Description
I want to bulk insert with sqlx.
-- bulk insert example
INSERT INTO people(name)
VALUES('foo'), ('bar'), ('baz')
I also want to "where in" with this.
-- where in example
SELECT * FROM people WHERE name IN ('foo', 'bar', 'baz')
I wrote the code and created the repository:
https://github.com/dyoshikawa/sqlx-bulk-insert-and-where-in-query-example/blob/fcc50716f4ed8d48924de996863aa6916f89af8d/src/main.rs#L19-L59
Do you have the idea better than this?
Thanks for reading.
Metadata
Metadata
Assignees
Labels
No labels