1

I want to store the same type of information in different boxes. Example : One box would contain the tweets I liked, and another the tweets I retweeted.

ouai
  • 150
  • 1
  • 10

1 Answers1

1

You would need to create two separate stores in different directories. This can be accomplished using the directory parameter of openStore.

_store1 = await openStore(directory: '/retweets');
_store2 = await openStore(directory: '/likedTweets');

Be aware that if you do this, you can't use relations between objects stored in separate stores using the built in relations. Ex: You couldn't have any of your retweeted objects use a relation to any liked tweets.

To bypass that, you could use some unique ID to query the other store exactly like you would with a RDB

Swisscheese
  • 571
  • 1
  • 5
  • 21