mongodb-js / mongodb-schema

Infer a probabilistic schema for a MongoDB collection.
https://github.com/mongodb-js/mongodb-schema
Apache License 2.0
137 stars 15 forks source link

feat: analyze a whole database and find its relationships [WIP] [Skunkworks] #207

Open lerouxb opened 1 year ago

lerouxb commented 1 year ago

I should probably change the interface to take all the schemas at once which should make it possible to check references to things other than _id. ie. make _id and every other objectid/uuid field that was selected as a candidate for any collection a possible target field. Although then you have the problem where if two collections reference a third one's _id, then those two would also be referencing each other. Which is not what you want 🤔

coveralls commented 1 year ago

Coverage Status

coverage: 80.741% (-9.2%) from 89.958% when pulling ad54681d1e920042895a13b63239de538432f0b8 on analyze-database into c7b07eaaa6bee59f6feb1f9aac8feb7a9200e99f on main.

coveralls commented 1 year ago

Coverage Status

coverage: 80.741% (-9.2%) from 89.958% when pulling ad54681d1e920042895a13b63239de538432f0b8 on analyze-database into c7b07eaaa6bee59f6feb1f9aac8feb7a9200e99f on main.