-
Notifications
You must be signed in to change notification settings - Fork 29
Adapter feature question / request #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We have similar issue: we are using react-native-sqlite-2 + @craftzdog/pouchdb-adapter-websql-core and an update to op-sqlite does break existing installations. Now we are upgrading RN to 0.76.6, but websql is no longer working correctly. Queries for non existing pocuhdb documents do not return (disappearing in a black hole.. :-) ). |
sqlite database files are compatible between expo-sqlite, sqlite-2, and op-sqlite since they are just wrappers. import {
IOS_LIBRARY_PATH, // Default iOS
IOS_DOCUMENT_PATH,
ANDROID_DATABASE_PATH, // Default Android
ANDROID_FILES_PATH,
ANDROID_EXTERNAL_FILES_PATH, // Android SD Card
open,
} from '@op-engineering/op-sqlite';
const db = open({
name: 'myDb',
location: Platform.OS === 'ios' ? IOS_LIBRARY_PATH : ANDROID_DATABASE_PATH,
}); Learn more: https://op-engineering.github.io/op-sqlite/docs/configuration#absolute-paths Currently, there is no way to specify a custom location in this adapter because PouchDB doesn't support specifying adapter options. https://github.com/craftzdog/pouchdb-adapter-react-native-sqlite/blob/master/src/index.ts Another solution would be to move the existing db files to the default location of op-sqlite. |
Many thanks for your reply, it's very helpful. 🙏 |
Hello @craftzdog . My team has benefitted from your work for a long time. We appreciate your contributions to the react native community. I wanted to know if an adapter system with this library is possible? We aren't able to use
op-sqlite
and would like to stick withexpo-sqlite
. Happy to do the work myself. I wanted to know if you have a suggestion of where to start or even if this is possible. Thank you!The text was updated successfully, but these errors were encountered: