{"id":15373973,"url":"https://github.com/boly38/mongo-scripts","last_synced_at":"2026-05-10T16:34:25.935Z","repository":{"id":151574849,"uuid":"177796432","full_name":"boly38/mongo-scripts","owner":"boly38","description":"various mongodb scripts","archived":false,"fork":false,"pushed_at":"2023-09-05T14:30:28.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T21:51:59.651Z","etag":null,"topics":["hacktoberfest","mongodb","script","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boly38.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-26T13:41:52.000Z","updated_at":"2022-10-01T12:44:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"4804e5d3-f58e-438b-8046-e242d7dd8a26","html_url":"https://github.com/boly38/mongo-scripts","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"4e3fb1b2cc3cbc4e5127228a18e58d6f48c4e548"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boly38/mongo-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2Fmongo-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2Fmongo-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2Fmongo-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2Fmongo-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boly38","download_url":"https://codeload.github.com/boly38/mongo-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boly38%2Fmongo-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266058481,"owners_count":23870157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","mongodb","script","utility"],"created_at":"2024-10-01T13:56:53.142Z","updated_at":"2026-05-10T16:34:25.847Z","avatar_url":"https://github.com/boly38.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mongo Scripts\r\n=============\r\n\r\n## Description\r\n\r\nThis repository provide various mongoDB scripts.\r\n\r\n\r\n## `minMax/` field length\r\n\r\nOriginal idea : [post SO - govin answer](https://stackoverflow.com/questions/26395422/how-to-find-longest-and-shortest-length-of-a-value-for-a-field-in-mongodb)\r\n\r\n - [`minMaxFunctions.js`](./minMax/minMaxFunctions.js) : functions to check min and max length of some field.\r\n \r\n - [`example.js`](./minMax/example.js) : sample usage\r\n\r\n## Quick example\r\n\r\n```shell\r\n$ mongo.exe --host localhost --port 27017 \u003c minMax/example.js\r\nMongoDB shell version (...)\r\nWork on db: mongo-script-test\r\nswitched to db mongo-script-test\r\nLoad REQUIREMENT : minMaxFunctions.js\r\ntrue\r\n * reset myuser data\r\ntrue\r\nWriteResult({ \"nInserted\" : 1 })\r\nWriteResult({ \"nInserted\" : 1 })\r\n * start myuser data analysis\r\nmyuser\r\nmyuser.count: 2\r\nmyuser [name].length - min: 3  max: 6\r\nmyuser [info].keys.length - min:2 max:3\r\nmyuser [info][country].length - min: 2  max: 3\r\nmyuser [info.children][].length - min:1 max:3\r\nmyuser [info.children][*][name].length - min:3  max:30\r\nmyuser [tags].keys.length - min:1 max:3\r\nmyuser [tags](keys).length - min:1 max:3\r\nmyuser [tags](k).length - min:2 max:16\r\nmyuser [comments].length - min: 5  max: 180\r\nmyuser [comments][].length - min: 0  max: 2\r\nmyuser [comments][*][text].length - min: 14  max: 24\r\nmyuser [comments][userId] is missing\r\nmyuser [comments][].length - min:0 max:2\r\nmyuser [comments][*][userIDENTITY.name].length - min:1  max:14\r\nmyuser [properties].keys.length - min:2 max:2\r\nmyuser [properties](keys).length - min:2 max:2\r\nmyuser [properties](k,v).length - minK:3 maxK:5 minV:1 maxV:6\r\nmyuser [myBinary].length - min: 16  max: 16\r\nbye\r\n```\r\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboly38%2Fmongo-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboly38%2Fmongo-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboly38%2Fmongo-scripts/lists"}