How to use the pouchdb-adapter-websql-core.default function in pouchdb-adapter-websql-core

To help you get started, we’ve selected a few pouchdb-adapter-websql-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pouchdb-community / pouchdb-adapter-cordova-sqlite / lib / index.js View on Github external
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)
  }
}
github pouchdb-community / pouchdb-adapter-cordova-sqlite / lib / index.js View on Github external
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)
  }
}

pouchdb-adapter-websql-core

Underlying adapter code for WebSQL and SQLite-based PouchDB adapters.

Apache-2.0
Latest version published 7 years ago

Package Health Score

75 / 100
Full package analysis

Popular pouchdb-adapter-websql-core functions