Point
public class Point
extension InfluxDBClient.Point: CustomStringConvertible
Point defines the values that will be written to the database.
See also
http://bit.ly/influxdata-point-
Create a new Point with specified a measurement name and precision.
Declaration
Swift
public init(_ measurement: String)Parameters
measurementthe measurement name
precisionthe data point precision
-
Adds or replaces a tag value for this point.
Declaration
Swift
@discardableResult public func addTag(key: String?, value: String?) -> PointParameters
keythe tag name
valuethe tag value
Return Value
self
-
Adds or replaces a field value for this point.
Declaration
Swift
@discardableResult public func addField(key: String?, value: FieldValue?) -> PointParameters
keythe field name
valuethe field value
Return Value
self
-
Updates the timestamp for the point.
Declaration
Swift
@discardableResult public func time(time: TimestampValue) -> PointParameters
timethe timestamp. It can be
IntorDate.Return Value
self
-
Creates Line Protocol from Data Point.
Declaration
Swift
public func toLineProtocol(precision: TimestampPrecision = defaultTimestampPrecision, defaultTags: [String: String?]? = nil) throws -> String?Parameters
precisionthe precision to use for the generated line protocol
defaultTagsdefault tags for Point.
Return Value
Line Protocol
-
Possible value types of Field
See moreDeclaration
Swift
public enum FieldValue -
Possible value types of Field
See moreDeclaration
Swift
public enum TimestampValue : CustomStringConvertible -
Tuple definition for construct
Point.Declaration
Swift
public typealias Tuple = (measurement: String, tags: [String?: String?]?, fields: [String?: InfluxDBClient.Point.FieldValue?], time: InfluxDBClient.Point.TimestampValue?) -
Create a new Point from Tuple.
Declaration
Swift
public class func fromTuple(_ tuple: Tuple) -> InfluxDBClient.PointParameters
tuplethe tuple with keys:
measurement,tags,fieldsandtimeprecisionthe data point precision
Return Value
created Point
-
Line Protocol from Data Point.
Declaration
Swift
public var description: String { get }
View on GitHub
Point Class Reference