rwynn / gtm

gtm (go tail mongo) is a MongoDB event listener
MIT License
146 stars 33 forks source link

extrace raw fullDocument from changed stream #29

Open shory152 opened 2 years ago

shory152 commented 2 years ago

returning raw fullDocument is very useful for migrating changed stream from a mongodb to another, it can ensure the order of fields will not be changed.

rwynn commented 2 years ago

Thanks for the contribution! This makes sense. Request: Can you change the field name fromRawFullDoc to simply BSONDoc? I think I can merge it otherwise.

rwynn commented 2 years ago

Actually, also can you make the type bson.Raw on Op also instead of interface{}? That would make it easier for cosumers to unmarshal I think.