25 docType: (NSString*)docType
26 error: (NSError**)error;
40 - (void) addEvent: (CBLJSONDict*)event;
44 - (void) addEvent: (CBLJSONDict*)event atTime: (CFAbsoluteTime)time;
49 - (void) flushAsync: (
void(^)(BOOL))onFlushed;
70 purgeWhenPushed: (BOOL)purgeWhenPushed;
82 - (NSEnumerator<CBLJSONDict*>*) eventsFromDate: (
nullable NSDate*)startDate
84 error: (NSError**)outError;
96 + (BOOL) enumerateEventsInDocument: (CBLJSONDict*)doc
void stop()
Stops the CBLTimeSeries, immediately flushing all pending events.
#define NS_ASSUME_NONNULL_BEGIN
Definition: CBLBase.h:20
A CouchbaseLite database.
Definition: CBLDatabase.h:38
Efficiently stores small time-stamped JSON values into a database, and can replicate them to a server...
Definition: CBLTimeSeries.h:17
#define nullable
Definition: CBLBase.h:22
NSString * docType
The "type" property that will be added to documents.
Definition: CBLTimeSeries.h:29
void(^ CBLTimeSeriesEnumerationBlock)(CBLJSONDict *event, CFAbsoluteTime time, BOOL *stop)
Callback for single-document enumeration.
Definition: CBLTimeSeries.h:90
#define NS_ASSUME_NONNULL_END
Definition: CBLBase.h:21
NSString * docIDPrefix
A prefix for the IDs of documents created by this object.
Definition: CBLTimeSeries.h:33
A 'push' or 'pull' replication between a local and a remote database.
Definition: CBLReplication.h:35
NSError * lastError
The latest error encountered.
Definition: CBLTimeSeries.h:37
BOOL flush()
Writes all pending events to documents before returning.