Hi.
I have successfully implemented this tutorial to fit my requirements: http://devcenter.appery.io/tutorials/...
I have it working perfectly with a small dataset.
However, I am now working with a larger database (over 200 entries) and the code below is only pulling the first 100 rows. How can I increase the number of rows so that the entire database is downloaded when the javascript service is invoked?
var db = window.openDatabase("Stores", "", "Stores", 3024*3000);
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS "Stores"(_objectId TEXT, Company TEXT, StoreName TEXT, StoreNumber TEXT, Address TEXT, City TEXT, State TEXT, ZipCode TEXT, PhoneNumber TEXT, Website TEXT, Hours TEXT, StoreManager TEXT, DairyManager TEXT, GeoCodey TEXT, Merchandiser TEXT, _createdAt DATETIME, updatedAt DATETIME)', []);
tx.executeSql('SELECT * FROM "Stores" WHERE "objectId" = "' + value._id + '"', [], function(tx, results){
console.log('rows :' + results.rows.length);
Code: Select all
//if (results.rows.length === 0){
if (results.rows.length === 0){
console.log('Go and add table ' + value.number);
tx.executeSql('INSERT INTO "Stores" (_objectId, Company, StoreName, StoreNumber, Address, City, State, ZipCode, PhoneNumber, Website, Hours, StoreManager, DairyManager, GeoCodey, Merchandiser, _createdAt, _updatedAt) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [value._id, value.Company, value.StoreName, value.StoreNumber, value.Address, value.City, value.State, value.ZipCode, value.PhoneNumber, value.Website, value.Hours, value.StoreManager, value.DairyManager, value.GeoCodey, value.Merchandiser, value._createdAt, value._updatedAt]);
}
});
});