{"id":19381769,"url":"https://github.com/taosdata/driver-go","last_synced_at":"2025-04-05T12:06:55.604Z","repository":{"id":37675010,"uuid":"230219297","full_name":"taosdata/driver-go","owner":"taosdata","description":"taos go driver","archived":false,"fork":false,"pushed_at":"2024-05-23T05:04:07.000Z","size":809,"stargazers_count":83,"open_issues_count":43,"forks_count":32,"subscribers_count":25,"default_branch":"main","last_synced_at":"2024-05-23T05:41:20.995Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taosdata.png","metadata":{"files":{"readme":"README-CN.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":"2019-12-26T07:43:48.000Z","updated_at":"2024-05-31T10:38:07.441Z","dependencies_parsed_at":"2023-09-23T04:05:33.896Z","dependency_job_id":"da156774-6de4-40ed-98ad-2d0d6cc6d6dd","html_url":"https://github.com/taosdata/driver-go","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Fdriver-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Fdriver-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Fdriver-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taosdata%2Fdriver-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taosdata","download_url":"https://codeload.github.com/taosdata/driver-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332606,"owners_count":20921853,"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":"2024-11-10T09:18:19.682Z","updated_at":"2025-04-05T12:06:55.581Z","avatar_url":"https://github.com/taosdata.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- omit in toc --\u003e\n# TDengine Go Connector\n\n\u003c!-- omit in toc --\u003e\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/taosdata/driver-go/build.yml)](https://github.com/taosdata/driver-go/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/taosdata/driver-go/graph/badge.svg?token=70E8APPMKR)](https://codecov.io/gh/taosdata/driver-go)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/taosdata/driver-go)\n![GitHub License](https://img.shields.io/github/license/taosdata/driver-go)\n![GitHub Tag](https://img.shields.io/github/v/tag/taosdata/driver-go?label=latest)\n\u003cbr /\u003e\n[![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine\u0026style=social)](https://twitter.com/tdenginedb)\n[![YouTube Channel](https://img.shields.io/badge/Subscribe_@tdengine--white?logo=youtube\u0026style=social)](https://www.youtube.com/@tdengine)\n[![Discord Community](https://img.shields.io/badge/Join_Discord--white?logo=discord\u0026style=social)](https://discord.com/invite/VZdSuUg4pS)\n[![LinkedIn](https://img.shields.io/badge/Follow_LinkedIn--white?logo=linkedin\u0026style=social)](https://www.linkedin.com/company/tdengine)\n[![StackOverflow](https://img.shields.io/badge/Ask_StackOverflow--white?logo=stackoverflow\u0026style=social\u0026logoColor=orange)](https://stackoverflow.com/questions/tagged/tdengine)\n\n[English](README.md) | 简体中文\n\n\u003c!-- omit in toc --\u003e\n## 目录\n\n\u003c!-- omit in toc --\u003e\n- [1.简介](#1简介)\n- [2. 文档](#2-文档)\n- [3. 前置条件](#3-前置条件)\n- [4. 构建](#4-构建)\n- [5. 测试](#5-测试)\n  - [5.1 运行测试](#51-运行测试)\n  - [5.2 添加用例](#52-添加用例)\n  - [5.3 性能测试](#53-性能测试)\n- [6. CI/CD](#6-cicd)\n- [7. 提交 Issue](#7-提交-issue)\n- [8. 提交 PR](#8-提交-pr)\n- [9. 引用](#9-引用)\n- [10. 许可证](#10-许可证)\n\n## 1.简介\n\n`driver-go` 是 TDengine 的官方 Go 语言连接器，实现了 Go 语言 `database/sql` 包的接口。Go 开发人员可以通过它开发存取\nTDengine 集群数据的应用软件。\n\n## 2. 文档\n\n- 使用 GO Connector, 请参考 [开发指南](https://docs.taosdata.com/develop/)，包含了应用如何引入 `driver-go`\n  和数据写入、查询、无模式写入、参数绑定和数据订阅等示例。\n- 其他参考信息请见 [参考手册](https://docs.taosdata.com/reference/connector/go/)，包含了版本历史、数据类型、示例程序汇总、API\n  说明和常见问题等。\n- 本 README 主要是为想自己贡献、编译、测试 Go Connector的开发者写的。如果要学习\n  TDengine，可以浏览 [官方文档](https://docs.taosdata.com/)。\n\n## 3. 前置条件\n\n- 已安装 Go 1.14 或以上版本,并允许 CGO `export CGO_ENABLED=1`。\n- 本地已经部署 TDengine，具体步骤请参考 [部署服务端](https://docs.taosdata.com/get-started/package/)，且已经启动 taosd 与\n  taosAdapter。\n\n## 4. 构建\n\n不需要构建。\n\n## 5. 测试\n\n### 5.1 运行测试\n\n1. 执行测试前确保已经安装 TDengine 服务端，并且已经启动 taosd 与 taosAdapter，数据库干净无数据。\n2. 项目目录下执行 `go test ./...` 运行测试，测试会连接到本地的 TDengine 服务器与 taosAdapter 进行测试。\n3. 输出结果 `PASS` 为测试通过，`FAIL` 为测试失败，查看详细信息需要执行 `go test -v ./...`。\n\n### 5.2 添加用例\n\n在 `*_test.go` 文件中添加测试用例，确保测试用例覆盖到新增的代码。\n\n### 5.3 性能测试\n\n性能测试还在开发中。\n\n## 6. CI/CD\n\n- [Build Workflow](https://github.com/taosdata/driver-go/actions/workflows/build.yml)\n- [Code Coverage](https://app.codecov.io/gh/taosdata/driver-go)\n\n## 7. 提交 Issue\n\n我们欢迎提交 [GitHub Issue](https://github.com/taosdata/driver-go/issues/new?template=Blank+issue)。 提交时请说明下面信息：\n\n- 问题描述，是否必现。\n- 驱动版本。\n- 连接参数（不需要服务器地址、用户名和密码）。\n- TDengine 版本。\n\n## 8. 提交 PR\n\n我们欢迎开发者一起开发本项目，提交 PR 时请参考下面步骤：\n\n1. Fork 本项目，请参考 ([how to fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo))。\n2. 从 main 分支创建一个新分支，请使用有意义的分支名称 (`git checkout -b my_branch`)。\n3. 修改代码，保证所有单元测试通过，并增加新的单元测试验证修改。\n4. 提交修改到远端分支 (`git push origin my_branch`)。\n5. 在 GitHub 上创建一个 Pull\n   Request ([how to create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request))。\n6. 提交 PR 后，可以通过 [Pull Request](https://github.com/taosdata/driver-go/pulls) 找到自己的 PR，点击对应链接进去可以看到自己\n   PR CI 是否通过，如果通过会显示 “All checks have passed”。无论 CI 是否通过，都可以点击 “Show all checks” -\u003e “Details”\n   来查看详细用例日志。\n7. 提交 PR 后，如果 CI 通过，可以在 [codecov](https://app.codecov.io/gh/taosdata/driver-go/pulls) 页面找到自己 PR 查看覆盖率。\n\n## 9. 引用\n\n- [TDengine 官网](https://www.taosdata.com/)\n- [TDengine GitHub](https://github.com/taosdata/TDengine)\n\n## 10. 许可证\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaosdata%2Fdriver-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaosdata%2Fdriver-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaosdata%2Fdriver-go/lists"}