{"id":26378098,"url":"https://github.com/rakeshpatra/custom_db_driver","last_synced_at":"2025-07-27T08:05:47.948Z","repository":{"id":62556606,"uuid":"59832877","full_name":"rakeshpatra/custom_db_driver","owner":"rakeshpatra","description":"A gem for cross db associations.","archived":false,"fork":false,"pushed_at":"2018-07-16T07:42:10.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T07:02:38.913Z","etag":null,"topics":["activerecord","mongoid","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","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/rakeshpatra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-27T12:29:28.000Z","updated_at":"2023-03-04T11:26:25.000Z","dependencies_parsed_at":"2022-11-03T06:00:42.662Z","dependency_job_id":null,"html_url":"https://github.com/rakeshpatra/custom_db_driver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rakeshpatra/custom_db_driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakeshpatra%2Fcustom_db_driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakeshpatra%2Fcustom_db_driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakeshpatra%2Fcustom_db_driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakeshpatra%2Fcustom_db_driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rakeshpatra","download_url":"https://codeload.github.com/rakeshpatra/custom_db_driver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakeshpatra%2Fcustom_db_driver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267327534,"owners_count":24069442,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["activerecord","mongoid","ruby","ruby-on-rails"],"created_at":"2025-03-17T04:21:08.735Z","updated_at":"2025-07-27T08:05:47.931Z","avatar_url":"https://github.com/rakeshpatra.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# custom_db_driver\nThis gem solves a common problem when you try to write basic associations across multiple ORMs.\n\n## Installation\n\nIn Bundler\n\n```\ngem 'custom_db_driver'\n```\n\nOtherwise\n\n```\ngem install custom_db_driver\n```\n\n## Configuration\n\njust include the association module in your model in-order to use the association\n\n\n\nFor activerecord\n\n```\nclass MySqlModel \u003c ActiveRecord::Base\n  CustomDbDriver::CustomAssociation\n\n  to_mongo_db do\n    has_many :mongo_data, class_name: 'MongoModel', foreign_key: \"foreign_key_id\"\n  end\nend\n```\n\n\nand For mongo\n\n```\nclass MongoModel\n  include Mongoid::Document\n  include Mongoid::Timestamps\n\n  include CustomDbDriver::CustomAssociation\n\n  to_my_sql do\n    belongs_to :my_sql_model\n    has_one :other_my_sql_model\n  end\nend\n```\n\n\n## Note\nCurrently it only supports with only activerecord(mysql) and mongoid, we will add support for others in near future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frakeshpatra%2Fcustom_db_driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frakeshpatra%2Fcustom_db_driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frakeshpatra%2Fcustom_db_driver/lists"}