{"id":42352931,"url":"https://github.com/dhkatz/gmsv_mongodb","last_synced_at":"2026-01-27T16:10:11.388Z","repository":{"id":59600872,"uuid":"247227698","full_name":"dhkatz/gmsv_mongodb","owner":"dhkatz","description":"A MongoDB module for Garry's Mod","archived":false,"fork":false,"pushed_at":"2020-06-19T11:58:46.000Z","size":96,"stargazers_count":18,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"development","last_synced_at":"2023-03-10T01:31:58.111Z","etag":null,"topics":["garrysmod","gmod","gmod-modules","mongodb"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhkatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-14T06:55:46.000Z","updated_at":"2023-01-25T19:05:13.000Z","dependencies_parsed_at":"2022-09-25T14:50:53.500Z","dependency_job_id":null,"html_url":"https://github.com/dhkatz/gmsv_mongodb","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/dhkatz/gmsv_mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhkatz%2Fgmsv_mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhkatz%2Fgmsv_mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhkatz%2Fgmsv_mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhkatz%2Fgmsv_mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhkatz","download_url":"https://codeload.github.com/dhkatz/gmsv_mongodb/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhkatz%2Fgmsv_mongodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28816557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["garrysmod","gmod","gmod-modules","mongodb"],"created_at":"2026-01-27T16:10:10.784Z","updated_at":"2026-01-27T16:10:11.379Z","avatar_url":"https://github.com/dhkatz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gmsv_mongodb\r\n\r\nA MongoDB module for Garry's Mod!\r\n\r\n| Windows | Linux |\r\n|---------|-------|\r\n| [![Build status](https://ci.appveyor.com/api/projects/status/8ervbutov5w0144n/branch/development?svg=true)](https://ci.appveyor.com/project/dhkatz/gmsv-mongodb/branch/development)| [![Build Status](https://travis-ci.com/dhkatz/gmsv_mongodb.svg?branch=development)](https://travis-ci.com/dhkatz/gmsv_mongodb) |\r\n\r\n## Quickstart\r\n\r\n### Information\r\n\r\nWhy does Garry's Mod need a MongoDB module? Because MongoDB is a NoSQL database.\r\nMySQL is designed for static schemas and performs best with complex queries.\r\n\r\nTypically, the data stored by Garry's Mod servers is extremely dynamic \r\nand the queries performed are very simple. This makes MySQL a pain.\r\n\r\nWith MongoDB you don't have to worry about schemas at all! Just write\r\nand query whatever data you want!\r\n\r\n### Download\r\n\r\nDownload a pre-built binary for your system from the [Releases](https://github.com/dhkatz/gmsv_mongodb/releases) section.\r\n\r\nPlace the `.dll` in `garrysmod/lua/bin`.\r\n\r\n## Usage\r\n\r\nFor more details see the [documentation](docs/README.md) or [examples](examples).\r\n\r\n```lua\r\nrequire('mongodb')\r\n\r\n-- Note: Connecting to the MongoDB cluster can hang! Cache the result in a global!\r\nclient = client or mongodb.Client('\u003cCONNECTION_URI\u003e', '\u003cAPP_NAME\u003e')\r\n\r\n-- Retrieve databases\r\nlocal database = client:Database('test')\r\n\r\n-- Retrieve collections\r\nlocal players = database:GetCollection('players')\r\n\r\n-- Run queries (Find, Insert, Update, Remove)\r\nlocal data = players:Find({ name = 'Bob', age = 25 })\r\n\r\nprint(data[1].name)\r\n\r\nplayers:Update({ name = 'Bob' }, { ['$set'] = { age = 26 } })  \r\n\r\n-- Execute bulk queries\r\nlocal bulk = players:Bulk()\r\n\r\nfor i, ply in ipairs({ 'Bob', 'Jim', 'Ann' }) do\r\n    bulk:Insert({ name = ply, age = 20 + i })\r\nend \r\n\r\nlocal result = bulk:Execute()\r\n```\r\n\r\n## License\r\n\r\nCode licensed under the [MIT License](LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhkatz%2Fgmsv_mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhkatz%2Fgmsv_mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhkatz%2Fgmsv_mongodb/lists"}