C8yManagedObjectQuery

public struct C8yManagedObjectQuery

Collection of queries to be used with C8yManagedObjectsService#get(forQuery:pageNum:)

Refer to the c8y API documentation for more information

  • Represents the operator to be applied to the value of the query i.e. equals, not equals etc.

    Refer to the c8y API documentation for more information

    See more

    Declaration

    Swift

    public enum Operator : String
  • Represents an individual query to be applied, consisting of a key (left hand), an operator and a value (right hand). If the operator is blank, then the key is assumed to be a function e.g.

     val q = Query("bygroupid", null, "12345")
     Log.i("example", "${q.toString()}")
    

    would output example - bygroupd(12345)

    See more

    Declaration

    Swift

    public struct Query
  • Undocumented

    Declaration

    Swift

    public init()
  • Adds a new query to the existing set

    Declaration

    Swift

    public mutating func add(_ query: Query) -> C8yManagedObjectQuery
  • Adds a new query to the existing set based on the individual values e.g .add(“type”, .eq “sandwich”) or .add(“has”, nil, “c8y_IsDevice”)

    @param key left hand operator @param operator the operator to be applied e.g. ‘eq’ ‘ne’ etc. or blank if key is a function @param value right hand operator or value of function if operator is null

    Declaration

    Swift

    public mutating func add(key: String, op: Operator?, value: String)
  • Undocumented

    Declaration

    Swift

    public func build() -> String