cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shingo Toda (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-4505) Database#changeVersion() method is not implemented in Storage plugin
Date Wed, 21 Aug 2013 01:05:51 GMT

     [ https://issues.apache.org/jira/browse/CB-4505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shingo Toda updated CB-4505:
----------------------------

    Description: 
I'm using Cordova 2.9.0.

In my understanding, when window.openDatabase() is called, if SECURITY_ERR is returned then
Storage plugin is used, otherwise browser's WebSQL is used.

When Storage plugin is used, changeVersion() method cannot be used because the method is actually
not implemented.

I got this issues with my mobile phone (ICS) but anyone can reproduce this in by modifying
the following line in cordova.js to forcedly use Storage plugin (Note that unrelated lines
are deleted). 


{code}
define("cordova/plugin/android/storage/openDatabase", function(require, exports, module) {


module.exports = function(name, version, desc, size) {

    try {
        return storage.openDatabase(name, version, desc, size);  <--- ADD!!

        return originalOpenDatabase(name, version, desc, size);
    } catch (ex) {
        if (ex.code !== 18) {
            throw ex;
        }
    }
    return storage.openDatabase(name, version, desc, size);
};

});
{code}


  was:
I'm using Cordova 2.9.0.

In my understanding, when window.openDatabase() is called, if SECURITY_ERR is returned then
Storage plugin is used, otherwise browser's WebSQL is used.

When Storage plugin is used, changeVersion() method cannot be used because the method is actually
not implemented.

I got this issues with my mobile phone (ICS) but you can reproduce this in any environment
by modifying the following line in cordova.js to forcedly use Storage plugin (Note that unrelated
lines are deleted). 


{code: title=lib/android/plugin/android/storage/openDatabase.js}
define("cordova/plugin/android/storage/openDatabase", function(require, exports, module) {


module.exports = function(name, version, desc, size) {

    try {
        return storage.openDatabase(name, version, desc, size);  <--- ADD!!

        return originalOpenDatabase(name, version, desc, size);
    } catch (ex) {
        if (ex.code !== 18) {
            throw ex;
        }
    }
    return storage.openDatabase(name, version, desc, size);
};

});
{code}


    
> Database#changeVersion() method is not implemented in Storage plugin
> --------------------------------------------------------------------
>
>                 Key: CB-4505
>                 URL: https://issues.apache.org/jira/browse/CB-4505
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CordovaJS
>    Affects Versions: 2.9.0
>         Environment: Android 2.3.x, 3.x, 4.x on emulator
> Android 4.x on physical device
>            Reporter: Shingo Toda
>            Assignee: Joe Bowser
>            Priority: Minor
>
> I'm using Cordova 2.9.0.
> In my understanding, when window.openDatabase() is called, if SECURITY_ERR is returned
then Storage plugin is used, otherwise browser's WebSQL is used.
> When Storage plugin is used, changeVersion() method cannot be used because the method
is actually not implemented.
> I got this issues with my mobile phone (ICS) but anyone can reproduce this in by modifying
the following line in cordova.js to forcedly use Storage plugin (Note that unrelated lines
are deleted). 
> {code}
> define("cordova/plugin/android/storage/openDatabase", function(require, exports, module)
{
> module.exports = function(name, version, desc, size) {
>     try {
>         return storage.openDatabase(name, version, desc, size);  <--- ADD!!
>         return originalOpenDatabase(name, version, desc, size);
>     } catch (ex) {
>         if (ex.code !== 18) {
>             throw ex;
>         }
>     }
>     return storage.openDatabase(name, version, desc, size);
> };
> });
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message