You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2013/10/15 23:23:43 UTC

[jira] [Resolved] (CB-4505) Database#changeVersion() method is not implemented in Storage plugin

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

Joe Bowser resolved CB-4505.
----------------------------

    Resolution: Fixed

This is apparently fixed with the new org.apache.cordova.websql plugin.

> 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 was sent by Atlassian JIRA
(v6.1#6144)