How to use pouchdb-adapter-websql-core - 6 common examples

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 / pouchdb / packages / node_modules / pouchdb-adapter-node-websql / src / index.js View on Github external
function NodeWebSqlPouch(opts, callback) {
  var _opts = Object.assign({
    websql: websql // pass node-websql in as our "openDatabase" function
  }, opts);

  WebSqlPouchCore.call(this, _opts, callback);
}
github pouchdb-community / pouchdb-adapter-cordova-sqlite / lib / index.js View on Github external
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
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)
  }
}
github craftzdog / pouchdb-adapter-react-native-sqlite / lib / index.js View on Github external
function ReactNativeSQLitePouch (opts, callback) {
  var websql = createOpenDBFunction(opts)
  var _opts = Object.assign({
    websql: websql
  }, opts)

  WebSqlPouchCore.call(this, _opts, callback)
}
github pouchdb / pouchdb / packages / node_modules / pouchdb-adapter-websql / src / index.js View on Github external
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);
}

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