cognitom / momy

MongoDB to MySQL replication
https://www.npmjs.com/package/momy
MIT License
98 stars 37 forks source link

Feature/relationship #31

Closed game5413 closed 3 years ago

game5413 commented 3 years ago

Sometimes, MongoDB data structure have data type like object and json. The problem is, not every time we need to put that data into data type JSON, instead we can put to another table for make easier querying the data itself. In this PR, i made some change on MySQL lib to make it pure, not passed defs into the constructor, but i'm make some variable on tailer to hold the main defs and relation defs, so it can be used on any function. And last, i make some change on defs, to provide table name aliasing for make it easier naming the relation table.