對於 InfluxDB 操作,以下是一些範例程式碼:
- 插入資料:
influx
> USE your_database
> INSERT measurement,tag_key=tag_value field_key=field_value
- 更新資料:
influx
> USE your_database
> UPDATE measurement SET field_key = new_value WHERE tag_key = 'tag_value'
- 讀取資料:
influx
> USE your_database
> SELECT * FROM measurement WHERE time > now() - 1d
- 刪除資料:
influx
> USE your_database
> DELETE FROM measurement WHERE time < now() - 7d
請替換 "your_database"、"measurement"、"tag_key"、"tag_value"、"field_key"、"field_value" 和條件如 WHERE 子句中的值,以符合您的實際情況。