GithubHelp home page GithubHelp logo

Comments (7)

andpor avatar andpor commented on August 15, 2024

I will look into this.

from react-native-sqlite-storage.

grittathh avatar grittathh commented on August 15, 2024

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.

andpor avatar andpor commented on August 15, 2024

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.

andpor avatar andpor commented on August 15, 2024

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

  1. default
  2. Documents
  3. 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.

grittathh avatar grittathh commented on August 15, 2024

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.

andpor avatar andpor commented on August 15, 2024

@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.

andpor avatar andpor commented on August 15, 2024

resolved in 3.0.0

from react-native-sqlite-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.