{"id":40182466,"url":"https://github.com/enorith/database","last_synced_at":"2026-01-19T18:42:22.531Z","repository":{"id":57541850,"uuid":"292155211","full_name":"enorith/database","owner":"enorith","description":"Database component for Enorith","archived":false,"fork":false,"pushed_at":"2021-03-11T09:37:59.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-19T05:46:18.638Z","etag":null,"topics":["database","orm","query-builder"],"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/enorith.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":"2020-09-02T02:12:13.000Z","updated_at":"2021-03-11T09:38:01.000Z","dependencies_parsed_at":"2022-09-09T02:50:40.903Z","dependency_job_id":null,"html_url":"https://github.com/enorith/database","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/enorith/database","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enorith%2Fdatabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enorith%2Fdatabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enorith%2Fdatabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enorith%2Fdatabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enorith","download_url":"https://codeload.github.com/enorith/database/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enorith%2Fdatabase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28580377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T18:29:59.827Z","status":"ssl_error","status_checked_at":"2026-01-19T18:29:40.878Z","response_time":67,"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":["database","orm","query-builder"],"created_at":"2026-01-19T18:42:21.835Z","updated_at":"2026-01-19T18:42:22.523Z","avatar_url":"https://github.com/enorith.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database component for [Enorith](https://github.com/enorith/framework)\n\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t_ \"github.com/go-sql-driver/mysql\"\n\t\"github.com/enorith/database\"\n\t\"fmt\"\n\t\"github.com/enorith/database/rithythm\"\n)\n\n\ntype User struct {\n\trithythm.Model\n}\n\nfunc (u *User) GetTable() string {\n\treturn \"users\"\n}\n\nfunc (u *User) Clone() rithythm.DataModel {\n\treturn \u0026User{}\n}\n\nfunc main()  {\n    builder := rithythm.Hold(\u0026User{}).Query().GroupBy(\"area_id\").\n        JoinWith(\"inner\", \"areas\", func(clause *database.JoinClause) {\n        clause.AndOn(\"area_id\", \"=\", \"areas.id\")\n        clause.AndWhereNotNull(\"area_id\")\n    }).AndWhereNest(func(builder *database.QueryBuilder) {\n        builder.AndWhere(\"users.id\", \"\u003e\", 12)\n    }).\n        Select(database.Raw(\"count(users.id) as users_count\"), \"area_id\", \"areas.name\").\n        SortDesc(\"area_id\")\n    collection,_ := builder.Get()\n    \n    var (\n        count int\n        areaId int\n        name string\n    )\n    \n    defer collection.Close()\n    \n    for collection.NextAndScan(\u0026count, \u0026areaId, \u0026name) {\n        fmt.Println(count, areaId, name)\n    }\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenorith%2Fdatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenorith%2Fdatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenorith%2Fdatabase/lists"}