pouchdb-adapter-react-native-sqlite
PouchDB adapter using ReactNative SQLite as its backing store.
Prerequisites
Usage
Install from npm:
npm install pouchdb-react-native pouchdb-adapter-react-native-sqlite --save
react-native install react-native-sqlite-storage
Then import
it, notify PouchDB of the plugin, and initialize a database using the react-native-sqlite
adapter name:
import PouchDB from 'pouchdb-react-native'
import SQLite from 'react-native-sqlite-storage'
import SQLiteAdapterFactory from 'pouchdb-adapter-react-native-sqlite'
const SQLiteAdapter = SQLiteAdapterFactory(SQLite)
PouchDB.plugin(SQLiteAdapter)
const db = new PouchDB('mydb.db', {adapter: 'react-native-sqlite'});
Changelog
- 1.0.1
- Remove unnecessary console output
- 1.0.0
- Initial release