Comments (7)
I will look into this.
from react-native-sqlite-storage.
I have a sort of related question...Is there any way to use the app without making another copy of the database? My app is based on a static sqlite database that is never written to by the app. It's large... > 100mb. The app copies that into whatever location (Documents) so it ends up taking >200mg of space. Is there any way to not have it copy to some other location and just read directly from whereever it's stored in the bundle file? Thanks!
from react-native-sqlite-storage.
There maybe a solution for iOS...but would have to make it optional with a macro..turned off by default.
from react-native-sqlite-storage.
I have committed code changed to address both issues. by adding readOnly to the param list you will be able to point to app bundle db without requirign a copy. For locations, this is a backward incompatible change. default is now nosync location rather than docs. There are 32 choices for location param
- default
- Documents
- Library
You will find fixes on master. Please test them out and let me know how you make out. These are iOS specific changes so Android should not be impacted.
from react-native-sqlite-storage.
Thanks! The readOnly code works, except dealloc in SQLite.m needs some small changes I think (it crashes on reloading in the simulator with a "pointerValue" unrecognized error).
Edit: I created a new issue for this, and posted a code snippet that seems to solve the problem.
from react-native-sqlite-storage.
@scgough - can you test the location modifications?
openDatabase({..., location: one-of-three},...)
deleteDatabase({...,location: one-of-three},...}
if old style name only param list is used, location defaults to 'default' in both calls.
from react-native-sqlite-storage.
resolved in 3.0.0
from react-native-sqlite-storage.
Related Issues (20)
- Error while opening the database on React 0.71.2 HOT 2
- Update a pre-populated sqlite database HOT 10
- Can't downgrade database from version 2 to 1
- Is this repo still maintained? HOT 3
- Error in opening the database : openDatabase() HOT 2
- Package react-native-sqlite-storage contains invalid configuration HOT 11
- install error on android
- TypeError: Cannot read properties of undefined (reading 'open') HOT 2
- can we retrive database file from iPhone?
- receiving the error "Invalid database handle" HOT 1
- Duplicate Symbol resulting in link error
- No rollback on failed transactions HOT 1
- too slow
- Slow run
- [Query] Support for new Architecture HOT 1
- db.executeSql('PRAGMA foreign_keys = ON');
- Depracated Jcenter needs to be change to mavenCentral
- Cannot get data from the pre-populated sqlite database in react native HOT 1
- in android 14 database not work HOT 5
- Error on query with RETURNING keyword on Android HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-sqlite-storage.