{"id":29571921,"url":"https://github.com/oceanbase/obkv-table-client-go","last_synced_at":"2025-07-19T04:36:37.136Z","repository":{"id":175723121,"uuid":"614262476","full_name":"oceanbase/obkv-table-client-go","owner":"oceanbase","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-06T03:00:31.000Z","size":927,"stargazers_count":18,"open_issues_count":5,"forks_count":13,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-01-06T04:17:41.239Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oceanbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-03-15T08:28:22.000Z","updated_at":"2025-01-06T03:00:35.000Z","dependencies_parsed_at":"2023-10-12T12:43:51.285Z","dependency_job_id":"477e255e-3e33-4c54-8b77-68c29d90b2e5","html_url":"https://github.com/oceanbase/obkv-table-client-go","commit_stats":null,"previous_names":["oceanbase/obkv-table-client-go"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/oceanbase/obkv-table-client-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobkv-table-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobkv-table-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobkv-table-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobkv-table-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oceanbase","download_url":"https://codeload.github.com/oceanbase/obkv-table-client-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobkv-table-client-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265889162,"owners_count":23844539,"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":"2025-07-19T04:36:36.602Z","updated_at":"2025-07-19T04:36:37.127Z","avatar_url":"https://github.com/oceanbase.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# obkv-table-client-go\nOBKV Table Client is go Library that can be used to access table data from OceanBase storage layer. Its access method is different from JDBC, it skips the SQL parsing layer, so it has significant performance advantage.\n\n\n## Quick Start\nCreate table in the OceanBase database:\n\n``` sql\nCREATE TABLE IF NOT EXISTS `test` (\n    `c1` bigint(20) NOT NULL,\n    `c2` bigint(20) NOT NULL,\n    PRIMARY KEY (`c1`)\n) PARTITION BY KEY(`c1`) PARTITIONS 10;\n```\n\nThe code demo:\n``` go\n    const (\n\t\tconfigUrl    = \"ob-configserver-url\"\n\t\tfullUserName = \"user@tenant#cluster\"\n\t\tpassWord     = \"\"\n\t\tsysUserName  = \"root\"\n\t\tsysPassWord  = \"\"\n\t\ttableName    = \"test\"\n\t)\n\n\tcfg := config.NewDefaultClientConfig()\n\tcli, err := client.NewClient(configUrl, fullUserName, passWord, sysUserName, sysPassWord, cfg)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// insert\n\trowKey := []*table.Column{table.NewColumn(\"c1\", int64(1))}\n\tinsertColumns := []*table.Column{table.NewColumn(\"c2\", int64(2))}\n\taffectRows, err := cli.Insert(\n\t\tcontext.TODO(),\n\t\ttableName,\n\t\trowKey,\n\t\tinsertColumns,\n\t)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(affectRows)\n\n\t// get\n\tselectColumns := []string{\"c1\", \"c2\"}\n\tresult, err := cli.Get(\n\t\tcontext.TODO(),\n\t\ttableName,\n\t\trowKey,\n\t\tselectColumns,\n\t)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(result.Value(\"c1\"))\n\tfmt.Println(result.Value(\"c2\"))\n```\n**NOTE:**\n1. configUrl is generated by [ConfigServer](https://ask.oceanbase.com/t/topic/35601923).\n2. fullUserName: the user for accessing obkv, which format is `user_name@tenant_name#cluster_name`\n3. passWord: the password of user in fullUserName.\n4. sysUserName: `root` or `proxy`, which have privileges to access routing system view\n5. sysPassWord: the password of sys user in sysUserName.\n\n## Documentation\n- English [Coming soon]\n- [Simplified Chinese (简体中文)](https://github.com/oceanbase/obkv-table-client-go/wiki/obkv-table-client-go-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E4%B8%8E%E4%BD%BF%E7%94%A8)\n\n\n## Licencing\n\nobkv-table-client-go is under [MulanPSL - 2.0](http://license.coscl.org.cn/MulanPSL2) licence. You can freely copy and use the source code. When you modify or distribute the source code, please obey the MulanPSL - 2.0 licence.\n\n## Contributing\n\nContributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute:\n\n- Raise us an [Issue](https://github.com/oceanbase/obkv-table-client-go/issues)\n- Submit Pull Requests. For details, see [How to contribute](CONTRIBUTING.md).\n\n## Support\n\nIn case you have any problems when using OceanBase Database, welcome reach out for help:\n\n- GitHub Issue [GitHub Issue](https://github.com/oceanbase/obkv-table-client-go/issues)\n- Official forum [Official website](https://open.oceanbase.com)\n- Knowledge base [Coming soon]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanbase%2Fobkv-table-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foceanbase%2Fobkv-table-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanbase%2Fobkv-table-client-go/lists"}