ObjectFilter
public class ObjectFilter : Codable
Defines criteria for filtering and ordering a result
set of Coaty objects. Used in combination with Query events
and database operations, as well as the ObjectMatcher functionality.
-
A set of conditions for filtering objects (optional).
Declaration
Swift
public var conditions: ObjectFilterConditions? -
A single condition for filtering objects (optional).
Declaration
Swift
public var condition: ObjectFilterCondition? -
Determines the ordering of result objects by an array of
OrderByPropertyobjects.Declaration
Swift
public var orderByProperties: [OrderByProperty]? -
If a take count is given, no more than that many objects will be returned (but possibly less, if the request itself yields less objects). Typically, this option is only useful if the
orderByPropertiesoption is also specified to ensure consistent ordering of paginated results.Declaration
Swift
public var take: Int? -
If skip count is given that many objects are skipped before beginning to return result objects. Typically, this option is only useful if the
orderByPropertiesoption is also specified to ensure consistent ordering of paginated results.Declaration
Swift
public var skip: Int?
-
Create an instance of ObjectFilter based on a single condition.
Declaration
Swift
public convenience init(condition: ObjectFilterCondition, orderByProperties: [OrderByProperty]? = nil, take: Int? = nil, skip: Int? = nil)Parameters
conditionA single condition for filtering objects.
orderByPropertiesDetermines the ordering of result objects.
taketake at most the given count of hits
skipskip the given count of hits
-
Create an instance of ObjectFilter based on a set of conditions.
Declaration
Swift
public convenience init(conditions: ObjectFilterConditions, orderByProperties: [OrderByProperty]? = nil, take: Int? = nil, skip: Int? = nil)Parameters
conditionA single condition for filtering objects.
orderByPropertiesDetermines the ordering of result objects.
taketake at most the given count of hits
skipskip the given count of hits
-
Declaration
Swift
public func encode(to encoder: Encoder) throws -
Declaration
Swift
public required init(from decoder: Decoder) throws
-
Builds a new
ObjectFilterusing the convenience closure syntax. This method can only be used to build objects that have exactly one condition.Declaration
Swift
public static func buildWithCondition(_ closure: (ObjectFilterBuilder) throws -> ()) throws -> ObjectFilterParameters
closurethe builder closure, preferably used as trailing closure.
Return Value
ObjectFilter configured using the builder.
-
Builds a new
ObjectFilterusing the convenience closure syntax. This method can only be used to build objects that have multiple conditions.Declaration
Swift
public static func buildWithConditions(_ closure: (ObjectFilterBuilder) throws -> ()) throws -> ObjectFilterParameters
closurethe builder closure, preferably used as trailing closure.
Return Value
ObjectFilter configured using the builder.
View on GitHub
ObjectFilter Class Reference