I'm using perfect
with SQLite driver and StORM as connector. I can save (create) multiple rows one by one. To make it faster, I'd like to create multiple rows at once, how do I do that?
Asked
Active
Viewed 80 times
1 Answers
0
Judging by the source code for perfect SQLite-StORM
and Perfect-SQLite
- currently there seems to be no logic to handle multiple rows insert statements. Tossing raw statements like this seems to be the only way with perfect
for now.
INSERT INTO notifications (id, text, date, isRead)
VALUES
('7888968F-7817-4386-BAD3-20094A10A0EF', 'this is notification 1', 10000, "true"),
('C161335B-865D-42F8-9468-5942F4579AE5', 'this is notification 2', 20000, "true"),
('527F425A-618A-4C92-9B12-96B781F54819', 'this is notification 3', 30000, "false"),
('76AC88BA-304B-45D4-853B-DE482B1D1916', 'this is notification 4', 40000, "true"),

Dannie P
- 4,464
- 3
- 29
- 48