let users: [User] = [user1, user2, user3]
try connection.query("INSERT INTO User (id, name, age) VALUES ?", [users])
In mysql-swift I have to manually build the query string depending on the number of rows, e.g. "INSERT INTO User (id, name, age) VALUES (?,?,?), (?,?,?), (?,?,?)".
I could also be missing something. Is there another way to achieve this in mysql-swift?
In node-mysql I can do something like this:
In mysql-swift I have to manually build the query string depending on the number of rows, e.g.
"INSERT INTO User (id, name, age) VALUES (?,?,?), (?,?,?), (?,?,?)"
.I could also be missing something. Is there another way to achieve this in mysql-swift?