Ivshti / linvodb3

Persistent database for Node.js/NW.js/Electron with MongoDB/Mongoose-like features and interface on top of LevelUp
MIT License
747 stars 71 forks source link

is there a way to list all models #75

Open javazquez opened 7 years ago

javazquez commented 7 years ago

I was wondering if there is a way to list all the models that have been created? I am thinking of a list table feature that I have used in relational databases. If not, what would be the recommended approach? Create a meta model that keeps track of created models?

thanks, -jv

flamusdiu commented 7 years ago

What I have seen ppl do is add them as a property of an super object. Something like app.models.[all model objects] I am not sure if there is some way to pull the objects by type out of JS. You could also just keep a list when the models are created too.