AbstractQuery

public protocol AbstractQuery : AnyObject

A base abtract type which holds the bare essentials shared by all query types in the SDK which enable querying against content types, entries and assets.

  • A compiler-forced, required, and designated initializer. Creates affordance that the default implementation of AbstractQuery guarantees an object is constructed before doing additional mutations in convenience initializers.

    Declaration

    Swift

    init()
  • The parameters dictionary that are converted to URLComponents on the HTTP URL. Useful for debugging.

    Declaration

    Swift

    var parameters: [String : String] { get set }

KeyPath/Value operations.

  • where(sys:_:) Extension method

    Static method for creating a Query with a Query.Operation. This variation for initialization guarantees correct query construction when performing operations on “sys” members. See the concrete types Query, FilterQuery, AssetQuery, and QueryOn for more information and example usage.

    Declaration

    Swift

    static func `where`(sys key: Sys.CodingKeys, _ operation: Query.Operation) -> Self

    Parameters

    key

    The Sys.CodingKeys of the system property you are performing the Query.Operation against. For instance, .id.

    operation

    The query operation used in the query.

    Return Value

    A newly initialized query.

  • where(metadata:_:) Extension method

    Static method for creating a Query with a Query.Operation. This variation for initialization guarantees correct query construction when performing operations on “metadata” members. See the concrete types Query, FilterQuery, AssetQuery, and QueryOn for more information and example usage.

    Declaration

    Swift

    static func `where`(metadata key: Metadata.CodingKeys, _ operation: Query.Operation) -> Self

    Parameters

    key

    The Metadata.CodingKeys of the system property you are performing the Query.Operation against. For instance, .tags.

    operation

    The query operation used in the query.

    Return Value

    A newly initialized query.

  • where(metadataTagsIds:) Extension method

    Static method for creating a Query with a Query.Operation. This variation for initialization guarantees correct query construction when performing operations on “metadata” members. See the concrete types Query, FilterQuery, AssetQuery, and QueryOn for more information and example usage.

    Declaration

    Swift

    static func `where`(metadataTagsIds operation: Query.Operation) -> Self

    Parameters

    metadataTagsIds

    The query operation used in the query against metadata tags ids.

    Return Value

    A newly initialized query.

  • where(valueAtKeyPath:_:) Extension method

    Static method for creating a Query with a Query.Operation. See concrete types Query, FilterQuery, AssetQuery, and QueryOn for more information and example usage.

    Declaration

    Swift

    static func `where`(valueAtKeyPath keyPath: String, _ operation: Query.Operation) -> Self

    Parameters

    keyPath

    The key path of the property you are performing the Query.Operation against. For instance, "sys.id" or "fields.yourFieldName".

    operation

    The query operation used in the query.

    Return Value

    A newly initialized query.