Giter VIP home page Giter VIP logo

Comments (8)

Irrelon avatar Irrelon commented on July 23, 2024

So the way we've decided to do this is:

var fdb = new ForerunnerDB('myStoreName');

You name your forerunnerdb instance first, then all other sub-instances are namespaced. Update coming very soon.

from forerunnerdb.

markphillips100 avatar markphillips100 commented on July 23, 2024

Can you include the name property too (currently ForerunnerDB) as this is the true database app separation from localforage's perspective.

from forerunnerdb.

markphillips100 avatar markphillips100 commented on July 23, 2024

Or use the name property rather than the storeName if you prefer only one config property. Name is more important than storeName from an app separation concern.

from forerunnerdb.

Irrelon avatar Irrelon commented on July 23, 2024

I had envisaged using the instance name (passed in ForerunnerDB() instantiation) as the "name" property and the DB name as the "storeName" property.

Would this work for your use case?

from forerunnerdb.

markphillips100 avatar markphillips100 commented on July 23, 2024

Perfect.

from forerunnerdb.

Irrelon avatar Irrelon commented on July 23, 2024

:) 👍 fantastic.

from forerunnerdb.

Irrelon avatar Irrelon commented on July 23, 2024

OK could you give that a go? I've set up tests (they are passing) and merged changes. New version 1.3.54.

I couldn't use the db name as the storeName parameter because chrome complained. You can test on Chrome yourself by editing the JS code in realtime and providing any other string instead of "FDB" and it will fail to get the store. I don't know why it is happening but anyway, this should be enough to satisfy your requirement hopefully since now you can namespace the whole instance for different app customers while keeping the DB name the same if you want to and the persisted data will be unique.

Let me know if it is doing what you need.

from forerunnerdb.

markphillips100 avatar markphillips100 commented on July 23, 2024

Works great. Thanks for a quick resolution.

from forerunnerdb.

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.