function createSysDB (success, failure) {
    function sysDbCreateError (...args /* tx, err */) {
        const err = findError(args);
        CFG.DEBUG && console.log('Error in sysdb transaction - when creating dbVersions', err);
        failure(err);
    }

    if (sysdb) {
        success();
    } else {
        sysdb = CFG.win.openDatabase('__sysdb__.sqlite', 1, 'System Database', CFG.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
Craetes the sysDB to keep track of version numbers for databases
function createSysDB (success, failure) {
    function sysDbCreateError (...args ) {
        const err = findError(args);
        CFG.DEBUG && console.log('Error in sysdb transaction - when creating dbVersions', err);
        failure(err);
    }
    if (sysdb) {
        success();
    } else {
        sysdb = CFG.win.openDatabase('__sysdb__.sqlite', 1, 'System Database', CFG.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 ( ... args ) { const err = findError ( args ) ; CFG . DEBUG && console . log ( 'Error in sysdb transaction - when creating dbVersions' , err ) ; failure ( err ) ; } if ( sysdb ) { success ( ) ; } else { sysdb = CFG . win . openDatabase ( '__sysdb__.sqlite' , 1 , 'System Database' , CFG . 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
/* tx, err */