question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to use multiple instances

See original GitHub issue

In my opinion, this is a very important feature provided by localForage and missing in ionic-storage.

With this feature, we can iterate on different data stores, (e.g. messages in conversations)

e.g.

let myConversation = localForage.createInstance({name: 'conversationId'});
myConfersation.iterate((v, k) => ...);

https://localforage.github.io/localForage/#multiple-instances-createinstance

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
hozkokcommented, Oct 31, 2016

Hi Max. I think you misunderstood the issue.

The problem is not forEach support, but multiple instances.

In ionic storage, there is no multiple instances support so if we have a list of items of different data models, we have to iterate through every item in the whole database.

Let’s say we have 100 different conversations and we try to iterate messages in one conversation, we have to iterate through all the messages in all the conversations if we do not have multiple instances.

But if we just create new instance for that particular conversation, we can just iterate through these messages.

8reactions
bergbencommented, Sep 10, 2018

Any news on this? The solution from @ahoebeke works but I think it would be cleaner to have a function for this wrapper that uses createInstance from localForage. That would be really great and shouldn’t be much work I guess?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple instance learning - Wikipedia
In machine learning, multiple-instance learning (MIL) is a type of supervised learning. Instead of receiving a set of instances which are individually ...
Read more >
Multiple instances of abilities - Magic Rulings - MTG Salvation
The short answer: yes. The long answer: Whether having multiple instances of abilities actually means something depends on the ability. Multiple ...
Read more >
Configuring multiple instances - IBM
You can run multiple instances on a single system. Each instance is independent from the other instances and there no data is shared...
Read more >
What are the benefits of multiple instances? - Atlassian Support
From achieving a balance between autonomy and control to handling mergers and acquisitions, multiple instances can help you create the right places for...
Read more >
SQL Server — Single instance vs Multiple instances
Multiples instances give us the ability to spread load over more than one TempDB. Multiple instances of SQL Server on a single physical...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found