{"id":21525230,"url":"https://github.com/apijson/apijson-influxdb","last_synced_at":"2025-04-09T23:22:07.675Z","repository":{"id":215903020,"uuid":"739996442","full_name":"APIJSON/apijson-influxdb","owner":"APIJSON","description":"腾讯 APIJSON 的 InfluxDB 物联网时序数据库插件。An InfluxDB plugin for Tencent APIJSON.","archived":false,"fork":false,"pushed_at":"2025-01-31T09:07:16.000Z","size":24,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T01:11:58.678Z","etag":null,"topics":["apijson","influx","influx-data","influxdata","influxdb","influxdb-client","influxdb2","iot","time-series","timeseries","timeseries-database"],"latest_commit_sha":null,"homepage":"https://github.com/Tencent/APIJSON","language":"Java","has_issues":false,"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/APIJSON.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":"2024-01-07T07:29:39.000Z","updated_at":"2025-03-07T03:17:53.000Z","dependencies_parsed_at":"2024-01-07T09:24:05.562Z","dependency_job_id":"98aa4a3b-145d-4d04-a4de-84f7fad90684","html_url":"https://github.com/APIJSON/apijson-influxdb","commit_stats":null,"previous_names":["apijson/apijson-influxdb"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-influxdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-influxdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-influxdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/APIJSON%2Fapijson-influxdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/APIJSON","download_url":"https://codeload.github.com/APIJSON/apijson-influxdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248126511,"owners_count":21051946,"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":["apijson","influx","influx-data","influxdata","influxdb","influxdb-client","influxdb2","iot","time-series","timeseries","timeseries-database"],"created_at":"2024-11-24T01:33:48.696Z","updated_at":"2025-04-09T23:22:07.651Z","avatar_url":"https://github.com/APIJSON.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apijson-influxdb  [![](https://jitpack.io/v/APIJSON/apijson-influxdb.svg)](https://jitpack.io/#APIJSON/apijson-influxdb)\n腾讯 [APIJSON](https://github.com/Tencent/APIJSON) 6.1.0+ 的 InfluxDB 数据库插件，可通过 Maven, Gradle 等远程依赖。\u003cbr /\u003e\nAn InfluxDB plugin for Tencent [APIJSON](https://github.com/Tencent/APIJSON) 6.1.0+\n\n![image](https://github.com/APIJSON/apijson-influxdb/assets/5738175/243d7a46-e035-4fe6-be63-51cb54d4a69d)\n![image](https://github.com/APIJSON/apijson-influxdb/assets/5738175/3c2919b6-f90a-4a9e-9fb7-592eb4c1a6bb)\n\n\n## 添加依赖\n## Add Dependency\n\n### Maven\n#### 1. 在 pom.xml 中添加 JitPack 仓库\n#### 1. Add the JitPack repository to pom.xml\n```xml\n\t\u003crepositories\u003e\n\t\t\u003crepository\u003e\n\t\t    \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t\u003c/repository\u003e\n\t\u003c/repositories\u003e\n```\n\n![image](https://user-images.githubusercontent.com/5738175/167261814-d75d8fff-0e64-4534-a840-60ef628a8873.png)\n\n\u003cbr /\u003e\n\n#### 2. 在 pom.xml 中添加 apijson-influxdb 依赖\n#### 2. Add the apijson-influxdb dependency to pom.xml\n```xml\n\t\u003cdependency\u003e\n\t    \u003cgroupId\u003ecom.github.APIJSON\u003c/groupId\u003e\n\t    \u003cartifactId\u003eapijson-influxdb\u003c/artifactId\u003e\n\t    \u003cversion\u003eLATEST\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n\n\u003cbr /\u003e\n\nhttps://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n### Gradle\n#### 1. 在项目根目录 build.gradle 中最后添加 JitPack 仓库\n#### 1. Add the JitPack repository in your root build.gradle at the end of repositories\n```gradle\n\tallprojects {\n\t\trepositories {\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\n\u003cbr /\u003e\n\n#### 2. 在项目某个 module 目录(例如 `app`) build.gradle 中添加 apijson-influxdb 依赖\n#### 2. Add the apijson-influxdb dependency in one of your modules(such as `app`)\n```gradle\n\tdependencies {\n\t        implementation 'com.github.APIJSON:apijson-influxdb:latest'\n\t}\n```\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## 使用\n## Usage\n\n在你项目继承 AbstractSQLExecutor 的子类重写方法 execute \u003cbr/\u003e\nOverride execute in your SQLExecutor extends AbstractSQLExecutor\n\n```java\n        @Override\n        public JSONObject execute(@NotNull SQLConfig\u003cLong\u003e config, boolean unknownType) throws Exception {\n            if (config.isInfluxDB()) {\n                return InfluxdbUtil.execute(config, null, unknownType);\n            }\n   \n            return super.execute(config, unknownType);\n        }\n```\n\n\u003cbr/\u003e\n在你项目继承 AbstractSQLConfig 的子类重写方法 execute \u003cbr/\u003e\nOverride execute in your SQLConfig extends AbstractSQLConfig\n\n```java\n\t@Override\n\tpublic String getSchema() {\n\t\treturn InfluxDBUtil.getSchema(super.getSchema(), DEFAULT_SCHEMA, isInfluxDB());\n\t}\n\n\t@Override\n\tpublic String getSQLSchema() {\n\t\treturn InfluxDBUtil.getSQLSchema(super.getSQLSchema(), isInfluxDB());\n\t}\n```\n\n#### 见 [InfluxDBUtil](/src/main/java/apijson/influxdb/InfluxDBUtil.java) 的注释及 [APIJSONBoot-MultiDataSource](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONBoot-MultiDataSource) 的 [DemoSQLExecutor](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java) \u003cbr /\u003e\n\n#### See document in [InfluxDBUtil](/src/main/java/apijson/influxdb/InfluxDBUtil.java) and [DemoSQLExecutor](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java) in [APIJSONBoot-MultiDataSource](https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONBoot-MultiDataSource)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n有问题可以去 Tencent/APIJSON 提 issue \u003cbr /\u003e\nhttps://github.com/Tencent/APIJSON/issues/36\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n#### 点右上角 ⭐Star 支持一下，谢谢 ^_^\n#### Please ⭐Star this project ^_^\nhttps://github.com/APIJSON/apijson-influxdb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapijson%2Fapijson-influxdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapijson%2Fapijson-influxdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapijson%2Fapijson-influxdb/lists"}