in reply to Re^2: How to get collection schema from mongo using perl
in thread How to get collections from mongo using perl
Thanks for reply. My dead line is very near. I almost there. In my previous program I manually create a template with column names and inserting data into it. its working properly. But my mentor told to get collection schema from data base instead of writing template. Please help me with this.
Ok, I'll give it a shot
So site:https://docs.mongodb.org/ introspection
site:https://docs.mongodb.org/ collection schema
site:https://docs.mongodb.org/ retrieve schema
site:https://docs.mongodb.org/ query schema
So basically, it says while collections have similar schemas, schemas aren't actually enforced, so there is no way to retrieve a "schema" -- it doesn't exist
You can however retrieve every single document ( http://docs.mongodb.org/manual/reference/method/db.collection.find/ )
So does that help or clarify anything?
If I had a deadline I'd ask mentor for help :)
|
|---|