16 typedef NS_ENUM(
unsigned, CBLAllDocsMode) {
26 typedef NS_ENUM(
unsigned, CBLIndexUpdateMode) {
27 kCBLUpdateIndexBefore,
139 - (void) runAsync: (
void (^)(
CBLQueryEnumerator*, NSError*))onComplete __attribute__((nonnull));
156 @property (nonatomic) NSTimeInterval updateInterval;
172 - (BOOL) waitForRows;
180 - (void) queryOptionsChanged;
190 @property (readonly) NSUInteger count;
193 @property (readonly) UInt64 sequenceNumber;
196 @property (readonly) BOOL stale;
219 - (void) sortUsingDescriptors: (NSArray*)sortDescriptors;
222 - (void) reset __attribute__((deprecated("call allObjects and iterate that array multiple times")));
232 @property (readonly)
id key;
241 @property (readonly,
nullable) NSString* documentID;
251 @property (readonly,
nullable) NSString* sourceDocumentID;
254 @property (readonly) NSString* documentRevisionID;
268 @property (readonly,
nullable) CBLJSONDict* documentProperties;
273 - (
nullable id) keyAtIndex: (NSUInteger)index;
283 @property (readonly) UInt64 sequenceNumber;
CBLArrayOf(NSSortDescriptor *) *sortDescriptors
An optional array of NSSortDescriptor objects; overrides the default by-key ordering.
instancetype NS_UNAVAILABLE()
#define NS_ASSUME_NONNULL_BEGIN
Definition: CBLBase.h:20
A "view" in a CouchbaseLite database – essentially a persistent index managed by map/reduce...
Definition: CBLView.h:58
BOOL descending
Should the rows be returned in descending key order? Default value is NO.
Definition: CBLQuery.h:50
A CouchbaseLite database.
Definition: CBLDatabase.h:38
NSArray * keys
If non-nil, the query will fetch only the rows with the given keys.
Definition: CBLQuery.h:108
A CBLQuery subclass that automatically refreshes the result rows every time the database changes...
Definition: CBLQuery.h:151
NSUInteger groupLevel
If non-zero, enables grouping of results, in views that have reduce functions.
Definition: CBLQuery.h:115
BOOL inclusiveEnd
If YES (the default) the endKey (or endKeyDocID) comparison uses "<=".
Definition: CBLQuery.h:70
CBLLiveQuery * asLiveQuery()
Returns a live query with the same parameters.
CBLIndexUpdateMode indexUpdateMode
Determines whether or when the view index is updated.
Definition: CBLQuery.h:105
#define nullable
Definition: CBLBase.h:22
id startKey
If non-nil, the key value to start at.
Definition: CBLQuery.h:53
NSUInteger prefixMatchLevel
If nonzero, enables prefix matching of string or array keys.
Definition: CBLQuery.h:84
NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(unsigned, CBLAllDocsMode)
Definition: CBLQuery.h:16
Represents a query of a CouchbaseLite 'view', or of a view-like resource like _all_documents.
Definition: CBLQuery.h:34
NSString * startKeyDocID
If non-nil, the document ID to start at.
Definition: CBLQuery.h:60
A CouchbaseLite document (as opposed to any specific revision of it.)
Definition: CBLDocument.h:16
NSUInteger limit
The maximum number of rows to return.
Definition: CBLQuery.h:43
#define NS_ASSUME_NONNULL_END
Definition: CBLBase.h:21
CBLAllDocsMode allDocsMode
Changes the behavior of a query created by -createAllDocumentsQuery.
Definition: CBLQuery.h:131
A result row from a CouchbaseLite view query.
Definition: CBLQuery.h:229
NSPredicate * postFilter
An optional predicate that filters the resulting query rows.
Definition: CBLQuery.h:98
NSUInteger skip
The number of initial rows to skip.
Definition: CBLQuery.h:47
Enumerator on a CBLQuery's result rows.
Definition: CBLQuery.h:187
BOOL prefetch
If set to YES, the results will include the entire document contents of the associated rows...
Definition: CBLQuery.h:121
An existing revision of a CBLDocument.
Definition: CBLRevision.h:80
CBLView * view
The view being queried; nil if this is an all-documents query.
Definition: CBLQuery.h:37
BOOL inclusiveStart
If YES (the default) the startKey (or startKeyDocID) comparison uses ">=".
Definition: CBLQuery.h:67
NSString * endKeyDocID
If non-nil, the document ID to end at.
Definition: CBLQuery.h:64
id endKey
If non-nil, the key value to end after.
Definition: CBLQuery.h:56
BOOL mapOnly
If set to YES, disables use of the reduce function.
Definition: CBLQuery.h:112
CBLDatabase * database
The database being queried.
Definition: CBLQuery.h:40