Ability to use multiple instances
See original GitHub issueIn 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:
- Created 7 years ago
- Reactions:6
- Comments:14 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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?