Query

public struct Query : Codable

Query influx using the Flux language

  • Declaration

    Swift

    public enum ModelType : String, Codable, CaseIterable
  • Query script to execute.

    Declaration

    Swift

    public var query: String
  • The type of query. Must be "flux".

    Declaration

    Swift

    public var type: ModelType?
  • Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both)

    Declaration

    Swift

    public var params: [String : String]?
  • Declaration

    Swift

    public var dialect: Dialect?
  • now

    Specifies the time that should be reported as "now" in the query. Default is the server’s now time.

    Declaration

    Swift

    public var now: Date?
  • Declaration

    Swift

    public init(query: String, type: ModelType? = nil, params: [String : String]? = nil, dialect: Dialect? = nil, now: Date? = nil)