blob: 943442631cbf05ad855914a8c931a3ad45b117bb [file]
'use strict';
function createOpenDBFunction() {
if (typeof sqlitePlugin !== 'undefined') {
// The SQLite Plugin started deviating pretty heavily from the
// standard openDatabase() function, as they started adding more features.
// It's better to just use their "new" format and pass in a big ol'
// options object.
return sqlitePlugin.openDatabase.bind(sqlitePlugin);
}
if (typeof openDatabase !== 'undefined') {
return function openDB(opts) {
// Traditional WebSQL API
return openDatabase(opts.name, opts.version, opts.description, opts.size);
};
}
}
export default createOpenDBFunction;