{"id":19142228,"url":"https://github.com/eldoy/easymongo","last_synced_at":"2026-05-11T07:53:37.063Z","repository":{"id":62557669,"uuid":"96940873","full_name":"eldoy/easymongo","owner":"eldoy","description":"Fast MongoDB client which makes using mongodb super easy","archived":false,"fork":false,"pushed_at":"2017-08-22T12:45:06.000Z","size":25,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T16:16:06.519Z","etag":null,"topics":["mongo","mongodb","mongodb-ruby-driver","ruby","rubygem"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/eldoy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-07-11T22:01:51.000Z","updated_at":"2022-06-04T21:57:43.000Z","dependencies_parsed_at":"2022-11-03T06:45:38.215Z","dependency_job_id":null,"html_url":"https://github.com/eldoy/easymongo","commit_stats":null,"previous_names":["fugroup/easymongo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Feasymongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Feasymongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Feasymongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldoy%2Feasymongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldoy","download_url":"https://codeload.github.com/eldoy/easymongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240223215,"owners_count":19767597,"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":["mongo","mongodb","mongodb-ruby-driver","ruby","rubygem"],"created_at":"2024-11-09T07:26:24.410Z","updated_at":"2026-02-13T08:22:32.215Z","avatar_url":"https://github.com/eldoy.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easymongo\nSuper easy MongoDB Ruby client. This is the way mongo should be.\n\nIf you need something closer to pure Mongo, have a look at [Minimongo.](https://github.com/fugroup/minimongo)\n\nWe also have [Mongocore](https://github.com/fugroup/mongocore) if you're looking for a full ORM.\n\n### Installation\n```\ngem install easymongo\n```\nor add to Gemfile.\n\n### Usage\n```ruby\n# All commands supported\n# https://docs.mongodb.com/ruby-driver/master/quick-start\n\n# Connect\n$db = Easymongo::Query.new(['127.0.0.1:27017'], :database =\u003e \"easymongo_#{ENV['RACK_ENV']}\")\n\n# First\nuser = $db.users.get(:moon =\u003e 'animation').first\n\n# Uses dot annotation\nuser.moon =\u003e 'animation'\nuser.name =\u003e 'Zetetic'\nuser.id =\u003e '596675a40aec08bfe7271e14'\nuser.bson_id =\u003e BSON::ObjectId('596675a40aec08bfe7271e14')\nuser.date =\u003e 2017-07-12 20:24:57 UTC\nuser.hello = 'Wake up' =\u003e Assign temporary value\n\n# Very flexible, also works like this for last and count\nuser = $db.users.first\nuser = $db.users.first(:id =\u003e '596675a40aec08bfe7271e14')\nuser = $db.users.first('596675a40aec08bfe7271e14')\nuser = $db.users.first(:tv =\u003e 'tull')\nuser = $db.users.get(:food =\u003e 'healthy').first\n\n# Last\n$db.users.last\n$db.users.last(:sun =\u003e 'close')\n$db.users.get(:sun =\u003e 'close').last\n\n# Count\n$db.users.count\n$db.users.count(:life =\u003e 'humancentric')\n$db.users.get(:life =\u003e 'humancentric').count\n\n# All\n$db.users.all\n$db.users.get.all\n$db.users.all(:spread =\u003e 'knowledge')\n$db.users.get(:earth =\u003e 'beautiful').all\n\n# Insert / Update\nresult = $db.users.set(:space =\u003e 'unreal')\nresult.date =\u003e 2017-07-12 20:24:57 UTC\nresult.id =\u003e '596675a40aec08bfe7271e14'\nresult.bson_id =\u003e BSON::ObjectId('596675a40aec08bfe7271e14')\n\n# Access Mongo result\nresult.ok? =\u003e true\nresult.n =\u003e 1\n\n# All these methods work on the result\nhttp://api.mongodb.com/ruby/current/Mongo/Operation/Write/Update/Result.html\n\n# Delete\n$db.users.rm('596675a40aec08bfe7271e14')\n$db.users.rm(:satellites =\u003e 'fragile')\n\n```\n\nCreated and maintained by [Fugroup Ltd.](https://www.fugroup.net) We are the creators of [CrowdfundHQ.](https://crowdfundhq.com)\n\n`@authors: Vidar`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Feasymongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldoy%2Feasymongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldoy%2Feasymongo/lists"}