I upgraded Cordova-sqlite-storage from version 1.2.1 to 1.5.1 and when I launch the app I'm getting following error:
Error: AMBIGUOUS: both location or iosDatabaseLocation values are present in openDatabase call
at newSQLError (file:///android_asset/www/plugins/cordova-sqlite-storage/www/SQLitePlugin.js:26:18)
The error should read "both location and iosDatabaseLocation values are present...". I will fix this when I get a chance.
As I already documented you must specify exactly one or the other.
Thank you.
It was working fine with 1.2.1 version but when I upgraded to the latest one I get to this error.
if (!!openargs.location && !!openargs.iosDatabaseLocation) {
throw newSQLError('AMBIGUOUS: both location or iosDatabaseLocation values are present in openDatabase call');
}
and for open database I have:
var db= $window.sqlitePlugin.openDatabase({
name: 'my.db',
location: 'default',
iosDatabaseLocation: 'Documents'
}
Do I need to make any changes to work with it?
Please read the documentation and check your code very carefully. The documentation explains how you should use the sqlitePlugin.openDatabase call. As I tried to explain in another comment before you have to use either location or iosDatabaseLocation. You have to use exactly one. You cannot use both.
Is the documentation not clear enough?
The documentation isn't clear enough. If you guys cleaned up the Readme so it didn't look like someone mashed the keyboard for an hour, people wouldn't be so confused at already what is a confusing option set.
The documentation isn't clear enough.
@jpike88 I would definitely agree, please see my response in https://github.com/litehelpers/Cordova-sqlite-help/issues/33.
Most helpful comment
The documentation isn't clear enough. If you guys cleaned up the Readme so it didn't look like someone mashed the keyboard for an hour, people wouldn't be so confused at already what is a confusing option set.