Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe collections, main methods and helpers #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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