blob: b1a8df51f5105fa9fe09091a40e7d0c16e8a881d [file] [log] [blame]
import WebSqlPouchCore from 'pouchdb-adapter-websql-core';
import { jsExtend as extend } from 'pouchdb-utils';
import valid from './valid';
function openDB(name, version, description, size) {
// Traditional WebSQL API
return openDatabase(name, version, description, size);
}
function WebSQLPouch(opts, callback) {
var _opts = extend({
websql: openDB
}, opts);
WebSqlPouchCore.call(this, _opts, callback);
}
WebSQLPouch.valid = valid;
WebSQLPouch.use_prefix = true;
export default function (PouchDB) {
PouchDB.adapter('websql', WebSQLPouch, true);
}