Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

WEBSQL 2TB allocation

Hi ,


We currently working on a App that may go over the standard 50mb allocation for WEBSQL. In the QA section a phonegap plugin is mentioned to get pass this limit what phonegap plugin is this?


Update:

Should I be using the SQLLite Plugin?

https://github.com/brodysoft/Cordova-SQLitePlugin


and if so it looks like I need to change the window.openDatabase statement to

sqlitePlugin.openDatabase()

 

Currently the following is being generated: Where would I change this in the backend or in the generated phonegap application? 


if (window.openDatabase){

AppDB = window.openDatabase("AppCache", "1.0", "AppCache", 50000000);

AppDB.transaction(function (tx){

tx.executeSql("CREATE TABLE IF NOT EXISTS model (KEY VARCHAR PRIMARY KEY, VALUE VARCHAR)");

});

}


Thanks

Rikardt


Hi Rikardt


We do recommend you to implement this open statement into the deviceready script for the neptune_appcache.


// Wait for Cordova to load
document.addEventListener("deviceready", onDeviceReady, false);

// Cordova is ready
function onDeviceReady() {
  var db = window.sqlitePlugin.openDatabase({name: "my.db"});
  // ...
}


In the next release NAD 3.0 we are testing if we can implement this as a default.


Regards

Ole Andre


Hi Ole Andre


Thanks for the prompt response. I will give it a test.


Regards

Rikardt

Hi,


whats the current status on this? 


BR

Tim Lutz

Hi Tim


With Neptune UX Platform 4.0 we are using SQLite as the default database in the mobile app. There is no limit for the storage. (Actually an hard limit on 2Tb, but then you have to much data offline).


In need of very large dataset I do recommend using sap.n.Database. The sync options are also very powerful allowing you to parallell sync or serial sync. 


Regards

Ole Andre 

Login or Signup to post a comment