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