Objective-C API for iOS and Mac OS
|Starts observing database changes. More...|
|Stops observing database changes. More...|
|Blocks until the intial asynchronous query finishes. More...|
|Instance Methods inherited from CBLQuery|
|(CBLQueryEnumerator *)||- run:|
|Sends the query to the server and returns an enumerator over the result rows (Synchronous). More...|
|Starts an asynchronous query. More...|
|(CBLLiveQuery *)||- asLiveQuery|
|Returns a live query with the same parameters. More...|
|The current query results; this updates as the database changes, and can be observed using KVO. More...|
|If non-nil, the error of the last execution of the query. More...|
|Properties inherited from CBLQuery|
|The database that contains this view. More...|
|The maximum number of rows to return. More...|
|The number of initial rows to skip. More...|
|Should the rows be returned in descending key order? Default value is NO. More...|
|If non-nil, the key value to start at. More...|
|If non-nil, the key value to end after. More...|
|If non-nil, the document ID to start at. More...|
|If non-nil, the document ID to end at. More...|
|Determines whether or when the view index is updated. More...|
|If non-nil, the query will fetch only the rows with the given keys. More...|
|If set to YES, disables use of the reduce function. More...|
|If non-zero, enables grouping of results, in views that have reduce functions. More...|
|If set to YES, the results will include the entire document contents of the associated rows. More...|
|Changes the behavior of a query created by -queryAllDocuments. More...|
|Query string for a full-text search; works only if the view's map function has triggered full- text indexing by emitting strings wrapped by CBLTextKey(). More...|
|If set to YES, the query will collect snippets of the text surrounding each match, available via the CBLFullTextQueryRow's -snippetWithWordStart:wordEnd: method. More...|
|If YES (the default) the full-text query result rows will be sorted by (approximate) relevance. More...|
|The geometric bounding box to search. More...|
A CBLQuery subclass that automatically refreshes the result rows every time the database changes.
All you need to do is use KVO to observe changes to the .rows property.
|- (void) start|
Starts observing database changes.
The .rows property will now update automatically. (You usually don't need to call this yourself, since accessing or observing the .rows property will call -start for you.)
|- (void) stop|
Stops observing database changes.
Calling -start or .rows will restart it.
|- (BOOL) waitForRows|
Blocks until the intial asynchronous query finishes.
After this call either .rows or .lastError will be non-nil.
The current query results; this updates as the database changes, and can be observed using KVO.
Its value will be nil until the initial asynchronous query finishes.
If non-nil, the error of the last execution of the query.
If nil, the last execution of the query was successful.