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

    if (sysdb) {
        success();
    } else {
        sysdb = _CFG2.default.win.openDatabase('__sysdb__.sqlite', 1, 'System Database', _CFG2.default.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 = (0, _DOMException.findError)(args);
        _CFG2.default.DEBUG && console.log('Error in sysdb transaction - when creating dbVersions', err);
        failure(err);
    }
    if (sysdb) {
        success();
    } else {
        sysdb = _CFG2.default.win.openDatabase('__sysdb__.sqlite', 1, 'System Database', _CFG2.default.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 = ( 0 , _DOMException . findError ) ( args ) ; _CFG2 . default . DEBUG && console . log ( 'Error in sysdb transaction - when creating dbVersions' , err ) ; failure ( err ) ; } if ( sysdb ) { success ( ) ; } else { sysdb = _CFG2 . default . win . openDatabase ( '__sysdb__.sqlite' , 1 , 'System Database' , _CFG2 . default . 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 */