But the user don't uses toLineProtocol function, they are uses WriteAPI. The question is, "When the user specify the precision of their data?"
Correct, the user interacts with the public API, write, via the WriteAPI class. You already have a precision argument in your original writeRecord API, which also handles the nil case.
Originally posted by @stuartcarnie in https://github.com/influxdata/influxdb-client-swift/issues/25#issuecomment-786861429
Correct, the user interacts with the public API,
write
, via theWriteAPI
class. You already have aprecision
argument in your originalwriteRecord
API, which also handles thenil
case.User creates following two points:
and then calls
write(points: [Point], precision: TimeStampPrecision)
API with a desired precision of.s
(seconds):That is already handed by your implementation:
https://github.com/influxdata/influxdb-client-swift/blob/eabb2999f79af7745ab006f253ab2ede5db0585b/Sources/InfluxDBSwift/WriteAPI.swift#L262