scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
556 stars 80 forks source link

Can it sync with remote? #61

Closed katopz closed 8 years ago

katopz commented 8 years ago

Let say I use NeDB when offline and sync to remote MongoDB when online similar to this and may I ask for example if it poossible? (BTW offline capability should add to features in readme if it possible tho)

Thanks

scottwrobinson commented 8 years ago

There aren't any native sync capabilities like the one you referenced. You'd have to write the syncing code yourself. I think this is a bit out of scope for an ODM like Camo. I think it would make more sense for syncing to be implemented in the DB or application layer, depending on your needs.

If the underlying DB driver supports syncing (which I don't think either of them do) then you can access the driver using camo.getClient().driver().

dalcib commented 8 years ago

It would be nice to have a driver do marsdb.

scottwrobinson commented 8 years ago

@dalcib from quick glance it looks like that would be possible. If you want to discuss more please open a separate issue. Thanks for the suggestion!

scottwrobinson commented 8 years ago

The sync feature seems to be out of scope for Camo, so I'm closing this issue.