changing location property is not showing the DB
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react-native, sqlite
- Domain
- databases, mobile-dev
Research direction
Start at the open({ name: "default.db", location: externalDirectory }) call and trace how the Android location is handled. Reproduce it with RNFS.ExternalDirectoryPath and RNFS.DownloadDirectoryPath, then determine the supported backup and import workflow or the conditions under which location changes take effect. No repository file or test is named, and done is not defined beyond making export and import possible.
Written by the indexing model from the issue text.
Description
I am trying to save the DB file inside the App Data folder (e.g. /storage/emulated/0/Android/data/com.package.name). And I have this code:
// other imports
import { QuickSQLiteConnection, open } from "react-native-quick-sqlite";
// get the app directory
const externalDirectory = RNFS.ExternalDirectoryPath; // --> /storage/emulated/0/Android/data/com.package.name/files location
// open the db
const db = open({ name: "default.db", location: externalDirectory });
This opens the DB fine, I am not able to see any file inside the above mentioned location. And, if I change the location property to any other directory (e.g. RNFS.DownloadDirectoryPath), this also not showing any DB, but if I revert to old location, I still have the older data.
My requirement is that I want to give an option to the user to export (backup) the local database, so that they can import it later, or onto any other devices. How can I achieve this?
Thank you in advance!
- Dominant language
- C
- Stars
- 565
- Forks
- 53
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from margelo/react-native-nitro-sqlite
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
margelo/react-native-nitro-sqlite#218 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in margelo/react-native-nitro-sqlite
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·