{"id":18084528,"url":"https://github.com/endel/mongo-sugar","last_synced_at":"2025-04-06T00:11:22.412Z","repository":{"id":5747931,"uuid":"6960473","full_name":"endel/mongo-sugar","owner":"endel","description":"Syntactic Sugar for Official MongoDB Driver","archived":false,"fork":false,"pushed_at":"2012-12-02T00:11:32.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T21:21:24.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://endel.github.io/mongo-sugar/","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/endel.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":"2012-12-01T22:40:38.000Z","updated_at":"2013-10-07T03:28:32.000Z","dependencies_parsed_at":"2022-09-06T02:51:14.189Z","dependency_job_id":null,"html_url":"https://github.com/endel/mongo-sugar","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/endel%2Fmongo-sugar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fmongo-sugar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fmongo-sugar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endel%2Fmongo-sugar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endel","download_url":"https://codeload.github.com/endel/mongo-sugar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415973,"owners_count":20935387,"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":[],"created_at":"2024-10-31T15:07:05.109Z","updated_at":"2025-04-06T00:11:22.391Z","avatar_url":"https://github.com/endel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mongo Sugar [![Build Status](https://secure.travis-ci.org/endel/mongo-sugar.png)](http://travis-ci.org/endel/mongo-sugar)\n===\n\nProvide a syntatic sugar for official MongoDB ruby driver, similar to an ORM.\n\nBut it isn't another ORM. If you need relationship features, you should use\n[MongoID](http://mongoid.org/), [MongoMapper](http://mongomapper.com/), or, why\nnot - a relational database.\n\nUsage\n===\n\nAdd mongo-sugar to your gemfile:\n\n    gem 'mongo-sugar'\n\nRequire it on your code:\n\n    require 'mongo-sugar'\n\nDefine classes as collections. By default, collection names are the class name\nunderscored. On the following example, the collection name is `my_collection`.\n\n    class MyCollection \u003c Mongo::Sugar::Collection\n      #\n      # Define your custom methods, like this:\n      #\n      def do_upsert(hash)\n        @collection.update({\n          key: hash[:key]\n        }, {\n          :$addToSet =\u003e {\n            :value =\u003e hash[:value]\n          }\n        }, :upsert =\u003e true)\n      end\n    end\n\nYou can customize the collection names using `store_in`, which is similar to mongoid\nsyntax.\n\n    class MyCollection \u003c Mongo::Sugar::Collection\n      store_in :collection =\u003e 'custom_collection'\n    end\n\nFor more details, read the [documentation](http://rubydoc.info/github/endel/mongo-sugar/master/frames) here.\n\nLicense\n===\n\nThis library is released under MIT License. Please see LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendel%2Fmongo-sugar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendel%2Fmongo-sugar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendel%2Fmongo-sugar/lists"}