Diffusion Apple API
6.10.0
Unified Client Library for iOS, tvOS and OS X / macOS
|
Builder for queries that select a range of events from a time series.
Instance Methods | |
(instancetype) | - forValues |
(instancetype) | - forEdits |
(nullable instancetype) | - editRange |
(nullable instancetype) | - allEdits |
(nullable instancetype) | - latestEdits |
(instancetype) | - fromSequence: |
(instancetype) | - fromStart |
(instancetype) | - fromDate: |
(instancetype) | - fromLastWithCount: |
(instancetype) | - fromLastWithTimeInterval: |
(instancetype) | - toSequence: |
(instancetype) | - toStart |
(instancetype) | - toDate: |
(instancetype) | - nextWithCount: |
(instancetype) | - nextWithTimeInterval: |
(instancetype) | - previousWithCount: |
(instancetype) | - previousWithTimeInterval: |
(instancetype) | - untilLastWithCount: |
(instancetype) | - untilLastWithTimeInterval: |
(instancetype) | - limitWithCount: |
(BOOL) | - isEqualToTimeSeriesRangeQuery: |
- (nullable instancetype) allEdits |
Return a copy of the receiver configured to perform an edit range query with the edit range that selects all edits in the entire time series.
This operator can only be applied to edit range queries. Newly initialised range query instances are value range queries. The forEdits operator can be used to create an edit range query from a value range query.
Operator type: edit range.
nil
if this is not an edit range query.- (nullable instancetype) editRange |
Return a copy of the receiver configured to perform a value range query with the edit range set to the entire time series.
This operator can only be applied to value range queries. Newly initialised range query instances are value range queries. The forValues operator can be used to create a value range query from an edit range query.
Operator type: edit range.
nil
if this is not a value range query.- (instancetype) forEdits |
Return a copy of the receiver configured to perform an edit range query with the view range set to the entire time series.
Operator type: value range.
- (instancetype) forValues |
Return a copy of the receiver configured to perform a value range query with the view range set to the entire time series.
Operator type: value range.
- (instancetype) fromDate: | (NSDate *) | date |
Return a copy of the receiver with the anchor of the current range configured to be an absolute time.
Operator type: anchor.
date | absolute time specifying the anchor of range. |
- (instancetype) fromLastWithCount: | (UInt64) | count |
Return a copy of the receiver with the anchor of the current range configured to be a relative offset before the end of the time series.
Operator type: anchor.
count | specifies the anchor as a number of events before the end of the time series. For value range queries, count is the number of original events. For edit range queries, count is the number of events of any type. |
NSInvalidArgumentException | if count is greater than INT64_MAX . |
- (instancetype) fromLastWithTimeInterval: | (NSTimeInterval) | timeInterval |
Return a copy of the receiver with the anchor of the current range configured to be a relative time from the timestamp of the last event in the time series.
Operator type: anchor.
timeInterval | specifies anchor relative to the timestamp of the latest event in the time series. |
NSInvalidArgumentException | if timeInterval is negative. |
- (instancetype) fromSequence: | (UInt64) | sequence |
Return a copy of the receiver with the anchor of the current range configured to be an absolute sequence number.
Operator type: anchor.
sequence | absolute sequence number specifying the anchor of the returned range. |
NSInvalidArgumentException | if sequence is greater than INT64_MAX . |
- (instancetype) fromStart |
Return a copy of the receiver with the anchor of the current range configured to be the start of the time series.
There is a difference between fromStart
and fromSequence:0
if the range also ends before the first event of the time series. For example, [[query fromStart] toStart]
is always empty, but [[query fromSequence:0] toStart]
includes the event with sequence number 0
.
Operator type: anchor.
- (BOOL) isEqualToTimeSeriesRangeQuery: | (nullable PTDiffusionTimeSeriesRangeQuery *) | timeSeriesRangeQuery |
Compares the receiver to the given time series range query.
timeSeriesRangeQuery | The time series range query object with which to compare the receiver. |
YES
if it is identical to the receiver, otherwise NO
.- (nullable instancetype) latestEdits |
Return a copy of the receiver configured to perform an edit range query with the edit range that selects latest edits in the entire time series.
This operator can only be applied to edit range queries. Newly initialised range query instances are value range queries. The forEdits operator can be used to create an edit range query from a value range query.
Operator type: edit range.
nil
if this is not an edit range query.- (instancetype) limitWithCount: | (UInt64) | count |
Return a copy of the receiver that returns at most count events.
If the query would otherwise select more than count events, only the latest count values (those with the highest sequence numbers) are returned.
This is most useful when a temporal span has been configured with nextWithTimeInterval: or previousWithTimeInterval: where the potential number of returned events is unknown.
PTDiffusionTimeSeriesQueryResult::complete can be used to determine whether a query has returned an incomplete result.
Operator type: limit.
count | the maximum number of events to return. |
NSInvalidArgumentException | if count is greater than INT64_MAX . |
- (instancetype) nextWithCount: | (UInt64) | count |
Return a copy of the receiver with the span of the current range configured to select a range of events following the anchor.
Operator type: span.
count | specifies the end of the range of events to select following the anchor. For value range queries, count is the number of original events. For edit range queries, count is the number of events of any type. |
NSInvalidArgumentException | if count is greater than INT64_MAX . |
- (instancetype) nextWithTimeInterval: | (NSTimeInterval) | timeInterval |
Return a copy of the receiver with the span of the current range configured to select a temporal range of events following the anchor.
Operator type: span.
timeInterval | the time span of events following the anchor to select. |
NSInvalidArgumentException | if timeInterval is negative. |
- (instancetype) previousWithCount: | (UInt64) | count |
Return a copy of the receiver with the span of the current range configured to select a range of events preceding the anchor.
Operator type: span.
count | specifies the end of the range of events to select preceding the anchor. For value range queries, count is the number of original events. For edit range queries, count is the number of events of any type. |
NSInvalidArgumentException | if count is greater than INT64_MAX . |
- (instancetype) previousWithTimeInterval: | (NSTimeInterval) | timeInterval |
Return a copy of the receiver with the span of the current range configured to select a temporal range of events preceding the anchor.
Operator type: span.
timeInterval | the time span of events preceding the anchor to select. |
NSInvalidArgumentException | if timeInterval is negative. |
- (instancetype) toDate: | (NSDate *) | date |
Return a copy of the receiver with the span of the current range configured to end at an absolute time.
Operator type: span.
date | absolute time specifying the end of the range. |
- (instancetype) toSequence: | (UInt64) | sequence |
Return a copy of the receiver with the span of the current range configured to end at an absolute sequence number.
Operator type: span.
sequence | absolute sequence number specifying the end of the returned range. |
NSInvalidArgumentException | if sequence is greater than INT64_MAX . |
- (instancetype) toStart |
Return a copy of the receiver with the span of the current range configured to end at the start of the time series.
There is a difference between toStart
and toSequence:0
if the range also starts before the first event of the time series. For example, [[query fromStart] toStart]
is always empty, but [[query fromStart] toSequence:0]
includes the event with sequence number 0
.
Operator type: span.
- (instancetype) untilLastWithCount: | (UInt64) | count |
Return a copy of the receiver with the span of the current range configured to end a number of events before the end of the time series.
Operator type: span.
count | specifies the end of the range of events to select as a number of events before the end of the time series. For value range queries, count is the number of original events. For edit range queries, count is the number of events of any type. |
NSInvalidArgumentException | if count is greater than INT64_MAX . |
- (instancetype) untilLastWithTimeInterval: | (NSTimeInterval) | timeInterval |
Return a copy of the receiver with the span of the current range configured to end at a relative time from the timestamp of the last event in the time series.
Operator type: span.
timeInterval | specifies the end of the range of events to select relative to the timestamp of the latest event in the time series. |
NSInvalidArgumentException | if timeInterval is negative. |