www/indexeddbshim.min.js
function createSysDB(success, failure) {
        function sysDbCreateError(tx, err) {
            err = idbModules.util.findError(arguments);
            idbModules.DEBUG && console.log("Error in sysdb transaction - when creating dbVersions", err);
            failure(err);
        }

        if (sysdb) {
            success();
        }
        else {
            sysdb = window.openDatabase("__sysdb__", 1, "System Database", DEFAULT_DB_SIZE);
            sysdb.transaction(function(tx) {
                tx.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);", [], success, sysDbCreateError);
            }, sysDbCreateError);
        }
    }
function createSysDB(success, failure) {
        function sysDbCreateError(tx, err) {
            err = idbModules.util.findError(arguments);
            idbModules.DEBUG && console.log("Error in sysdb transaction - when creating dbVersions", err);
            failure(err);
        }

        if (sysdb) {
            success();
        }
        else {
            sysdb = window.openDatabase("__sysdb__", 1, "System Database", DEFAULT_DB_SIZE);
            sysdb.transaction(function(tx) {
                tx.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);", [], success, sysDbCreateError);
            }, sysDbCreateError);
        }
    }
function createSysDB ( success , failure ) { function sysDbCreateError ( tx , err ) { err = idbModules . util . findError ( arguments ) ; idbModules . DEBUG && console . log ( "Error in sysdb transaction - when creating dbVersions" , err ) ; failure ( err ) ; } if ( sysdb ) { success ( ) ; } else { sysdb = window . openDatabase ( "__sysdb__" , 1 , "System Database" , DEFAULT_DB_SIZE ) ; sysdb . transaction ( function ( tx ) { tx . executeSql ( "CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);" , [ ] , success , sysDbCreateError ) ; } , sysDbCreateError ) ; } }
Craetes the sysDB to keep track of version numbers for databases
Craetes the sysDB to keep track of version numbers for databases