Closed bednar closed 1 year ago
The https://github.com/influxdata/influxdb-client-swift/pull/49 introduces possibility to use async/await for queries and writes instead of callbacks:
async/await
let query = """ from(bucket: "\(self.bucket)") |> range(start: -10m) |> filter(fn: (r) => r["_measurement"] == "cpu") |> filter(fn: (r) => r["cpu"] == "cpu-total") |> filter(fn: (r) => r["_field"] == "usage_user" or r["_field"] == "usage_system") |> last() """ print("\nQuery to execute:\n\(query)\n") let records = try await client.queryAPI.query(query: query)
We have to update the InfluxDB's docs and UI:
http://localhost:8086 > Load Data > Sources > Client Libraries > Swift
The https://github.com/influxdata/influxdb-client-swift/pull/49 introduces possibility to use
async/await
for queries and writes instead of callbacks:We have to update the InfluxDB's docs and UI: