Skip to content

Conversation

MisterBalboa
Copy link

@MisterBalboa MisterBalboa commented Dec 2, 2020

Hi Mongo Hackers!
Thanks for the work so far, very helpful.
Hereby a functionality that i built for myself and that i use on a daily basis. Open to discussion and modifications..

Description of changes

Added describe function on DBCollection prototype to simulate SQL describe table method. As explained in file, since noSQL is meant to be schemaless, i infer it taking a sample of documents from the collection and building the most complete version i can out of them.

Snapshot example

Collection with 2 documents

Screen Shot 2020-12-02 at 12 11 29

Schema

Screen Shot 2020-12-02 at 12 20 53

Testing

Unit tested most helper functions but as far as i see the project has no test suite.

Software Version(s) tested
mongo shell 4.0.3
MongoDB server
Operating system MacOS Catalina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants