Mosql.ChangeStreamEvent (mosql v0.1.0)
Represents change stream event in a simpler format needed for MOSQL
Link to this section Summary
Functions
Process the change event document from the Mongo change stream.
Change event spec (https://www.mongodb.com/docs/manual/reference/change-events/):
{ _id : { <BSON Object> }, "operationType" : "<operation>", "fullDocument" : { <document> }, "ns" : { "db" : "<database>", "coll" : "<collection>" }, "to" : { "db" : "<database>", "coll" : "<collection>" }, "documentKey" : { "_id" : <value> }, "updateDescription" : { "updatedFields" : { <document> }, "removedFields" : [ "<field>", ... ], "truncatedArrays" : [ { "field" : <field>, "newSize" : <integer> }, ... ] }, "clusterTime" : <Timestamp>, "txnNumber" : <NumberLong>, "lsid" : { "id" : <UUID>, "uid" : <BinData> } }
Link to this section Types
Link to this section Functions
parse_message(change_event)
Process the change event document from the Mongo change stream.
Change event spec (https://www.mongodb.com/docs/manual/reference/change-events/):
{ _id : { <BSON Object> }, "operationType" : "<operation>", "fullDocument" : { <document> }, "ns" : { "db" : "<database>", "coll" : "<collection>" }, "to" : { "db" : "<database>", "coll" : "<collection>" }, "documentKey" : { "_id" : <value> }, "updateDescription" : { "updatedFields" : { <document> }, "removedFields" : [ "<field>", ... ], "truncatedArrays" : [ { "field" : <field>, "newSize" : <integer> }, ... ] }, "clusterTime" : <Timestamp>, "txnNumber" : <NumberLong>, "lsid" : { "id" : <UUID>, "uid" : <BinData> } }