{"id":36871410,"url":"https://github.com/omarghader/multidb","last_synced_at":"2026-01-12T15:01:50.070Z","repository":{"id":57709860,"uuid":"175617408","full_name":"omarghader/multidb","owner":"omarghader","description":"One interface, multiple databases","archived":false,"fork":false,"pushed_at":"2020-10-22T21:07:28.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T02:15:38.994Z","etag":null,"topics":["arangodb","golang","mongodb","mysql","neo4j","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omarghader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-14T12:27:20.000Z","updated_at":"2022-03-12T22:21:44.000Z","dependencies_parsed_at":"2022-09-26T22:30:30.643Z","dependency_job_id":null,"html_url":"https://github.com/omarghader/multidb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omarghader/multidb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarghader%2Fmultidb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarghader%2Fmultidb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarghader%2Fmultidb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarghader%2Fmultidb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omarghader","download_url":"https://codeload.github.com/omarghader/multidb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarghader%2Fmultidb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["arangodb","golang","mongodb","mysql","neo4j","postgresql"],"created_at":"2026-01-12T15:01:49.982Z","updated_at":"2026-01-12T15:01:50.062Z","avatar_url":"https://github.com/omarghader.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multidb\nThe aim of this library is to make one interface for multiple databases.\n\n# Todo :\n* Relational DB\n\t* [ ]  MySQL\n\t* [ ]  PostgreSql\n* NoSQL DB\n\t* [ ] Mongodb\n\t* [ ] Arangodb\n* Graph DB\n\t* [ ] Neo4j\n\t* [x] Arangodb\n\n\n# Example\n\n```go\ndb := arangodb.NewArangodb(multidb.ConnectionOptions{\n  Host:     \"localhost\",\n  Port:     \"8529\",\n  Username: \"root\",\n  Password: \"root\",\n  DBName:   \"db\",\n})\n\ndb.Create()\n\n// Create a table\ndb.Table(\"table_test\").Create()\n\n// Insert documents\ntype DocTest struct {\n  Key   string `json:\"_key,omitempty\"`\n  ID    string `json:\"_id,omitempty\"`\n  Name  string\n}\n\ndoc1 := DocTest{Key:  \"doc1\", Name: \"document1\"}\nvar doc1Res DocTest\ndb.Table(\"table_test\").Insert(doc1, \u0026doc1Res)\n\ndoc2 := DocTest{Key:  \"doc2\", Name: \"document2\"}\nvar doc2Res DocTest\ndb.Table(\"table_test\").Insert(doc2, \u0026doc2Res)\n\n\n// Create a graph\ndb.Graph(\"graph_test\").Create()\n\n// Create relation\ndb.Graph(\"graph_test\").Relation(\"is_related\").Insert(\n  arangodb.Edge{\n    From: doc1Res.ID,\n    To:   doc2Res.ID,\n  }, map[string]interface{}{\"prop1\": \"friend\"})\n\n```\n\n# API\n\n```go\ntype Database interface {\n\tCreate() error\n\tExists() bool\n\tDrop() error\n\tTable(name string) Table\n\tGraph(name string) Graph\n\tExecQuery(query string, params map[string]interface{}, res []interface{}) ([]interface{}, error)\n}\n\n// Collection or table\ntype Table interface {\n\tCreate() error\n\tExists() bool\n\tDrop() error\n\tCRUD\n}\n\ntype Graph interface {\n\tCreate() error\n\tRelation(name string) Relation\n}\n\ntype Relation interface {\n  Insert(data interface{}, res interface{}) (interface{}, error)\n\tFind(id string, res interface{}) (interface{}, error)\n\tUpdate(id string, data interface{}, res interface{}) (interface{}, error)\n\tDelete(id string, res interface{}) (interface{}, error)\n}\n\ntype CRUD interface {\n\tInsert(data interface{}, res interface{}) (interface{}, error)\n\tFind(id string, res interface{}) (interface{}, error)\n\tUpdate(id string, data interface{}, res interface{}) (interface{}, error)\n\tDelete(id string, res interface{}) (interface{}, error)\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarghader%2Fmultidb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomarghader%2Fmultidb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarghader%2Fmultidb/lists"}