LowerThan
public struct LowerThan<I> : Operation where I : Identifier
A codable struct enabling lower than filtering
Usage Example:
To filter with lower than on age, we would write:
struct MyQuery: QueryParams {
let age: LowerThan<Int>
}
let query = MyQuery(age: LowerThan(value: 8))
In a URL it would translate to:
?age=8
Note: The “age=8” format is not an API but an implementation detail that could change in the future.
-
Creates a LowerThan instance from a given Identifier value
Declaration
Swift
public init(value: I)
-
Creates a LowerThan instance from a given String value
Declaration
Swift
public init(string value: String) throws
-
Returns the stored value
Declaration
Swift
public func getValue() -> I
-
Returns the stored value as a String
Declaration
Swift
public func getStringValue() -> String
-
Returns the Operator
Declaration
Swift
public func getOperator() -> Operator