redis-oplog icon indicating copy to clipboard operation
redis-oplog copied to clipboard

Support `View` in Mongo 3.4!

Open thearabbit opened this issue 8 years ago • 4 comments
trafficstars

Now I use Mongo 3.4, and create view for collection relation. Redis-Oplog support reactive data for view or not???

thearabbit avatar May 03 '17 08:05 thearabbit

@thearabbit do you use the view inside minimongo ? how do you create it ?

theodorDiaconu avatar May 04 '17 16:05 theodorDiaconu

I create view directly in Mongo, and then create ViewCollection normal in Meteor.

ViewCollection = new Mongo.Collection('myview');

thearabbit avatar May 04 '17 23:05 thearabbit

Ok so the scenario is I need to subscribe to a view collection, but when actions are dispatched, that view won't know about the inserts, because the subscription to it will listen to "myview"

I believe we could create an aliasing scheme inside Redis.

RedisOplog.connect(ViewCollection, 'actual_database_name')
// whenever ViewCollection is supscribed, it will use 'actual_database_name' instead of viewCollection._name)

Are you interested in doing a PR for this ?

theodorDiaconu avatar May 06 '17 09:05 theodorDiaconu

Thanks for your solve. Sorry I can't `` do this (beginner).

thearabbit avatar May 06 '17 09:05 thearabbit