Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function NodeWebSqlPouch(opts, callback) {
var _opts = Object.assign({
websql: websql // pass node-websql in as our "openDatabase" function
}, opts);
WebSqlPouchCore.call(this, _opts, callback);
}
websql: websql
}, opts)
if (typeof cordova === 'undefined' || (typeof sqlitePlugin === 'undefined' && typeof openDatabase === 'undefined')) {
console.error(
'PouchDB error: you must install a SQLite plugin ' +
'in order for PouchDB to work on this platform. Options:' +
'\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2' +
'\n - https://github.com/litehelpers/Cordova-sqlite-storage' +
'\n - https://github.com/Microsoft/cordova-plugin-websql')
}
if ('default' in WebSqlPouchCore && typeof WebSqlPouchCore.default.call === 'function') {
WebSqlPouchCore.default.call(this, _opts, callback)
} else {
WebSqlPouchCore.call(this, _opts, callback)
}
}
function CordovaSQLitePouch (opts, callback) {
var websql = createOpenDBFunction(opts)
var _opts = assign({
websql: websql
}, opts)
if (typeof cordova === 'undefined' || (typeof sqlitePlugin === 'undefined' && typeof openDatabase === 'undefined')) {
console.error(
'PouchDB error: you must install a SQLite plugin ' +
'in order for PouchDB to work on this platform. Options:' +
'\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2' +
'\n - https://github.com/litehelpers/Cordova-sqlite-storage' +
'\n - https://github.com/Microsoft/cordova-plugin-websql')
}
if ('default' in WebSqlPouchCore && typeof WebSqlPouchCore.default.call === 'function') {
WebSqlPouchCore.default.call(this, _opts, callback)
} else {
WebSqlPouchCore.call(this, _opts, callback)
}
}
var websql = createOpenDBFunction(opts)
var _opts = assign({
websql: websql
}, opts)
if (typeof cordova === 'undefined' || (typeof sqlitePlugin === 'undefined' && typeof openDatabase === 'undefined')) {
console.error(
'PouchDB error: you must install a SQLite plugin ' +
'in order for PouchDB to work on this platform. Options:' +
'\n - https://github.com/nolanlawson/cordova-plugin-sqlite-2' +
'\n - https://github.com/litehelpers/Cordova-sqlite-storage' +
'\n - https://github.com/Microsoft/cordova-plugin-websql')
}
if ('default' in WebSqlPouchCore && typeof WebSqlPouchCore.default.call === 'function') {
WebSqlPouchCore.default.call(this, _opts, callback)
} else {
WebSqlPouchCore.call(this, _opts, callback)
}
}
function ReactNativeSQLitePouch (opts, callback) {
var websql = createOpenDBFunction(opts)
var _opts = Object.assign({
websql: websql
}, opts)
WebSqlPouchCore.call(this, _opts, callback)
}
function WebSQLPouch(opts, callback) {
var msg = 'WebSQL is deprecated and will be removed in future releases of PouchDB. ' +
'Please migrate to IndexedDB: https://pouchdb.com/2018/01/23/pouchdb-6.4.2.html';
guardedConsole('warn', msg);
var _opts = Object.assign({
websql: openDB
}, opts);
WebSqlPouchCore.call(this, _opts, callback);
}