{"id":14987927,"url":"https://github.com/apache/iotdb-client-go","last_synced_at":"2025-04-14T08:55:38.565Z","repository":{"id":37293106,"uuid":"318786861","full_name":"apache/iotdb-client-go","owner":"apache","description":"Apache IoTDB Client for Go","archived":false,"fork":false,"pushed_at":"2025-04-04T23:54:12.000Z","size":375,"stargazers_count":62,"open_issues_count":4,"forks_count":35,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-04-07T02:09:13.820Z","etag":null,"topics":["client","database","go","timeseries"],"latest_commit_sha":null,"homepage":"https://iotdb.apache.org/","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/apache.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":"2020-12-05T12:47:33.000Z","updated_at":"2025-04-04T23:54:16.000Z","dependencies_parsed_at":"2024-12-06T14:03:16.574Z","dependency_job_id":"2367fdfc-9499-4c85-9d55-cf72fb6138b0","html_url":"https://github.com/apache/iotdb-client-go","commit_stats":{"total_commits":76,"total_committers":22,"mean_commits":"3.4545454545454546","dds":0.7236842105263157,"last_synced_commit":"bb812b80b9ad6af6ce34d5f23a68a5fee9237468"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fiotdb-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fiotdb-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fiotdb-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fiotdb-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/iotdb-client-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248520249,"owners_count":21117905,"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":["client","database","go","timeseries"],"created_at":"2024-09-24T14:15:43.427Z","updated_at":"2025-04-14T08:55:38.532Z","avatar_url":"https://github.com/apache.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n\n--\u003e\n[English](./README.md) | [中文](./README_ZH.md)\n\n# Apache IoTDB\n\nApache IoTDB (Database for Internet of Things) is an IoT native database with high performance for\ndata management and analysis, deployable on the edge and the cloud. Due to its light-weight\narchitecture, high performance and rich feature set together with its deep integration with\nApache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage,\nhigh-speed data ingestion and complex data analysis in the IoT industrial fields.\n\n# Apache IoTDB Client for Go\n\n[![E2E Tests](https://github.com/apache/iotdb-client-go/actions/workflows/e2e.yml/badge.svg)](https://github.com/apache/iotdb-client-go/actions/workflows/e2e.yml)\n[![GitHub release](https://img.shields.io/github/release/apache/iotdb-client-go.svg)](https://github.com/apache/iotdb-client-go/releases)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n![](https://github-size-badge.herokuapp.com/apache/iotdb-client-go.svg)\n![](https://img.shields.io/badge/platform-win%20%7C%20macos%20%7C%20linux-yellow.svg)\n[![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/)\n\n## Overview\n\nThis is the GoLang client of Apache IoTDB.\n\nApache IoTDB website: \u003chttps://iotdb.apache.org\u003e\nApache IoTDB GitHub: \u003chttps://github.com/apache/iotdb\u003e\n\n## Prerequisites\n\n    golang \u003e= 1.13\n\n## How to Use the Client (Quick Start)\n\nWith go mod\n\n```sh\nexport GO111MODULE=on\nexport GOPROXY=https://goproxy.io\n\nmkdir session_example \u0026\u0026 cd session_example\n\ncurl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go\n\ngo mod init session_example\ngo run session_example.go\n```\n\nWithout go mod\n\n```sh\n# get thrift 0.15.0\ngo get github.com/apache/thrift\ncd $GOPATH/src/github.com/apache/thrift\ngit checkout 0.15.0\n\nmkdir -p $GOPATH/src/iotdb-client-go-example/session_example\ncd $GOPATH/src/iotdb-client-go-example/session_example\n\ncurl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go\ngo run session_example.go\n```\n\n## How to Use the SessionPool\n\nSessionPool is a wrapper of a Session Set. Using SessionPool, the user do not need to consider how to reuse a session connection.\nIf there is no available connections and the pool reaches its max size, the all methods will hang until there is a available connection.\nThe PutBack method must be called after use\n\n### New sessionPool\n\nstandalone\n\n```golang\n\nconfig := \u0026client.PoolConfig{\n    Host:     host,\n    Port:     port,\n    UserName: user,\n    Password: password,\n}\nsessionPool = client.NewSessionPool(config, 3, 60000, 60000, false)\n\n```\n\ncluster or doubleLive\n\n```golang\n\nconfig := \u0026client.PoolConfig{\n  UserName: user,\n  Password: password,\n  NodeUrls: strings.Split(\"127.0.0.1:6667,127.0.0.1:6668\", \",\"),\n }\nsessionPool = client.NewSessionPool(config, 3, 60000, 60000, false)\n\n```\n\n### Get session through sessionPool, putback after use\n\nset storage group\n\n```golang\n\nsession, err := sessionPool.GetSession()\ndefer sessionPool.PutBack(session)\nif err == nil {\n    session.SetStorageGroup(sg)\n}\n\n```\n\nquery statement\n\n```golang\n\nvar timeout int64 = 1000\nsession, err := sessionPool.GetSession()\ndefer sessionPool.PutBack(session)\nif err != nil {\n    log.Print(err)\n    return\n}\nsessionDataSet, err := session.ExecuteQueryStatement(sql, \u0026timeout)\nif err == nil {\n    defer sessionDataSet.Close()\n    printDataSet1(sessionDataSet)\n} else {\n    log.Println(err)\n}\n\n```\n\n## Developer environment requirements for iotdb-client-go\n\n### OS\n\n* Linux, Macos or other unix-like OS\n* Windows+bash(WSL, cygwin, Git Bash)\n\n### Command Line Tools\n\n* golang \u003e= 1.13\n* make \u003e= 3.0\n* curl \u003e= 7.1.1\n* thrift 0.15.0\n\n## Troubleshooting\n\n### Thrift version compatibility issues\n\nIn the branch `rel/0.13` and earlier versions, the version of apache/thrift is `v0.14.1`.\nIn the latest version, apache/thrift has been upgraded to `v0.15.0`.\n\nThe two versions are not compatible on some interfaces. Using mismatched version will cause compilation errors.\n\nThe interfaces changed in the two versions are as follows:\n\n1. `NewTSocketConf`. This function returns two values in the version `v0.14.1` and only one value in the version `v0.15.0`.\n2. `NewTFramedTransport` has been deprecated, use `NewTFramedTransportConf` instead.\n\nFor more details, please take a look at this PR: [update thrift to 0.15.0 to fit IoTDB 0.13.0](https://github.com/apache/iotdb-client-go/pull/41)\n\n### Parameter name mismatch with actual usage in function 'Open'\n\nThe implementation of the function ```client/session.go/Open()``` is mismatched with the description.\nThe parameter `connectionTimeoutInMs` represents connection timeout in milliseconds.\nHowever, in the older version, this function did not implement correctly, regarding it as nanosecond instead.\nThe bug is now fixed.\nPositive value of this parameter means connection timeout in milliseconds.\nSet 0 for no timeout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fiotdb-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fiotdb-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fiotdb-client-go/lists"}