{"id":15713694,"url":"https://github.com/kimvex/mongodb-crystal","last_synced_at":"2025-05-12T22:15:26.484Z","repository":{"id":88928463,"uuid":"178661153","full_name":"kimvex/mongodb-crystal","owner":"kimvex","description":"Library for use of MongoDB driver","archived":false,"fork":false,"pushed_at":"2020-04-21T06:56:11.000Z","size":138,"stargazers_count":15,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T22:14:39.041Z","etag":null,"topics":["crystal","crystal-lang","mongo","mongodb"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/kimvex.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-31T08:21:53.000Z","updated_at":"2022-01-06T18:03:53.000Z","dependencies_parsed_at":"2023-03-13T18:17:41.856Z","dependency_job_id":null,"html_url":"https://github.com/kimvex/mongodb-crystal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimvex%2Fmongodb-crystal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimvex%2Fmongodb-crystal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimvex%2Fmongodb-crystal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kimvex%2Fmongodb-crystal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kimvex","download_url":"https://codeload.github.com/kimvex/mongodb-crystal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253831009,"owners_count":21971008,"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":["crystal","crystal-lang","mongo","mongodb"],"created_at":"2024-10-03T21:32:55.683Z","updated_at":"2025-05-12T22:15:26.453Z","avatar_url":"https://github.com/kimvex.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongodb-crystal\n\nThis repository is a fork of [datanoise/mongo.cr](https://github.com/datanoise/mongo.cr) to keep the Mongo db connection library up-to-date\n\nThis library provides binding for MongoDB C Driver. The goal is to provide a driver to access MongoDB.\n\n# Status\n\n_Beta_\n\n# Requirements\n\n- Crystal language version 0.27.2 and higher.\n- libmongoc version 1.15.0\n- libbson verion 1.15.0\n\nOn Mac OSX use `homebrew` to install the required libraries:\n\n```\n$ brew install mongo-c\n```\n\nOn Linux you need to install `libmongoc-1.15-1` and `libbson-1.15-1` from your package manager or from source:\n\n[http://mongoc.org/libmongoc/current/installing.html](http://mongoc.org/libmongoc/current/installing.html)\n\nOn Linux/Ubuntu\n\n```\n  sudo apt install libmongoc-dev libmongoc-1.0-0 libmongoclient-dev\n```\n\n## Installation\n\nAdd this to your application's `shard.yml`:\n\n```yaml\nmongo:\n  github: kimvex/mongodb-crystal\n  branch: master\n```\n\n# Usage\n\n```crystal\nrequire \"mongo\"\n\nclient = Mongo::Client.new \"mongodb://\u003cuser\u003e:\u003cpassword\u003e@\u003chost\u003e:\u003cport\u003e/\u003cdb_name\u003e\"\ndb = client[\"db_name\"]\n\ncollection = db[\"collection_name\"]\ncollection.insert({ \"name\" =\u003e \"James Bond\", \"age\" =\u003e 37 })\n\ncollection.find({ \"age\" =\u003e { \"$gt\" =\u003e 30 } }) do |doc|\n  puts typeof(doc)    # =\u003e BSON\n  puts doc\nend\n```\n\n# License\n\nMIT clause - see LICENSE for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimvex%2Fmongodb-crystal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkimvex%2Fmongodb-crystal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimvex%2Fmongodb-crystal/lists"}