{"id":15187421,"url":"https://github.com/chenquan/zero-sqlx","last_synced_at":"2025-10-11T17:36:46.890Z","repository":{"id":168221741,"uuid":"643697272","full_name":"chenquan/zero-sqlx","owner":"chenquan","description":"zero-sqlx is a database orm framework based on go-zero implementation that supports read/write separation between leader and follower databases.","archived":false,"fork":false,"pushed_at":"2025-03-18T02:58:10.000Z","size":152,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T05:43:39.145Z","etag":null,"topics":["go-zero","leader-follower","mysql","orm","pgsql","postgresql","read-write-separation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chenquan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-22T00:50:50.000Z","updated_at":"2025-03-15T01:10:35.000Z","dependencies_parsed_at":"2023-06-08T09:45:33.870Z","dependency_job_id":"433433d1-9c13-4871-89ff-bb9db7655939","html_url":"https://github.com/chenquan/zero-sqlx","commit_stats":{"total_commits":39,"total_committers":2,"mean_commits":19.5,"dds":"0.28205128205128205","last_synced_commit":"50d8d0b2b619c29d630e3c9636bddb8cb840d6fa"},"previous_names":["chenquan/zero-sqlx"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/chenquan/zero-sqlx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Fzero-sqlx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Fzero-sqlx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Fzero-sqlx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Fzero-sqlx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenquan","download_url":"https://codeload.github.com/chenquan/zero-sqlx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenquan%2Fzero-sqlx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008118,"owners_count":26084396,"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-10-11T02:00:06.511Z","response_time":55,"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":["go-zero","leader-follower","mysql","orm","pgsql","postgresql","read-write-separation"],"created_at":"2024-09-27T18:21:34.757Z","updated_at":"2025-10-11T17:36:46.875Z","avatar_url":"https://github.com/chenquan.png","language":"Go","readme":"# zero-sqlx\n\nzero-sqlx supports leader-follower read-write separation.\n\n## installation\n\n```shell\ngo get github.com/chenquan/zero-sqlx\n```\n\n## features\n\n- Full tracing\n- Read and write separation\n- Allows specified leader db execution\n- Adaptive circuit breaker\n- P2c algorithm\n\n## how to use it\n\n```yaml\nDB:\n  Leader: leader\n  Followers:\n    - follower1\n    - follower2\n```\n\n```go\ntype Config struct{\n  DB DBConf\n}\n```\n\n```go\n\nvar c config.Config\nconf.MustLoad(*configFile, \u0026c, conf.UseEnv())\n\n\nmysql := NewMultipleSqlConn(\"mysql\", c.DB)\nvar name string\nmysql.QueryRow(\u0026name, \"SELECT name FROM user WHERE id = 1\")\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenquan%2Fzero-sqlx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenquan%2Fzero-sqlx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenquan%2Fzero-sqlx/lists"}