Any way to write a Bulk Insert statement?
No, Web SQL doesn't support it, so this plugin doesn't either unfortunately.
I am also looking for bulk import or insert. I don't understand why your (SQLite) API has to be restricted to an outdated (unsupported) Web SQL standard. If I am not mistaken, Web SQL was meant for pure browser world, unlike Cordova for (almost) native mobile app environment.
You're right; just describing the current state of the plugin. :)
I am planning to add bulk import/insert capabilities sometime when I get a chance. The approach given here _may_ work, and _may or may not_ work for all supported platforms (needs investigation and testing): http://stackoverflow.com/questions/1609637/is-it-possible-to-insert-multiple-rows-at-a-time-in-an-sqlite-database
Actually this looks like a better answer (_needs investigation and testing_): http://stackoverflow.com/questions/10031605/optimizing-websql-local-database-population/10031717#10031717
And a couple more links (needs investigation):
Just wondering what the status of bulk inserts is?
+1
You may want to take a look at #282 by @boltex:
sqlQuery = 'INSERT INTO MAX_POINTS(Days,Max_Point) VALUES(1,32.0),(2,35.0);';
This _should_ work for all versions except WP7/8 up to a certain limit (still needs to be tested).
A batch sql function has been added to the API.
Where/how can we learn more about the batch SQL function API?
Where/how can we learn more about the batch SQL function API?
It is documented in the readme.
I am getting an error when use sqlBatch function:
TypeError: db.sqlBatch is not a function
I installed latest plugin. Is not it prepared yet with latest version?
I am getting an error when use sqlBatch function:
TypeError: db.sqlBatch is not a function
I installed latest plugin. Is not it prepared yet with latest version?
Guys this is covered by automatic testing. Please be sure that you use sqlitePlugin.openDatabase as documented. This will not work if you use window.openDatabase.
If this issue persists when you use sqlitePlugin.openDatabase, please open a new issue with a very simple, self-contained program that demonstrates the issue.
Most helpful comment
I am getting an error when use sqlBatch function:
TypeError: db.sqlBatch is not a function
I installed latest plugin. Is not it prepared yet with latest version?