antoniopresto / react-native-local-mongodb

react-native local mongodb storage.
MIT License
304 stars 66 forks source link

Different Collection in Local DB #61

Closed emannick closed 5 years ago

emannick commented 5 years ago

Hi, Is it possible to create different collections of data with different names? Right now DB is Initialized by var Datastore = require('react-native-local-mongodb'), db = new Datastore({ filename: 'xyz' }); If I want to use different collection how should I do that?

antoniopresto commented 5 years ago

One datastore is the equivalent of a MongoDB collection https://github.com/antoniopresto/react-native-local-mongodb#creatingloading-a-database

Of course you can create multiple datastores if you need