LiveQuery Class |
Namespace: Couchbase.Lite
public sealed class LiveQuery : Query
The LiveQuery type exposes the following members.
Name | Description | |
---|---|---|
AllDocsMode | Changes the behavior of a query created by -queryAllDocuments. (Inherited from Query.) | |
Database | (Inherited from Query.) | |
Descending |
Gets or sets whether the rows be returned in descending key order.
Default value is false.
(Inherited from Query.) | |
EndKey |
Gets or sets the key of the last value to return.
A null value has no effect.
(Inherited from Query.) | |
EndKeyDocId |
Gets or sets the Document id of the last value to return.
A null value has no effect. This is useful if the view contains
multiple identical keys, making endKey ambiguous.
(Inherited from Query.) | |
GroupLevel |
Gets or sets whether results will be grouped in Views that have reduce functions.
(Inherited from Query.) | |
IncludeDeleted | Obsolete.
Gets or sets whether Queries created via the Database createAllDocumentsQuery method
will include deleted Documents.
This property has no effect in other types of Queries.
(Inherited from Query.) | |
InclusiveEnd |
If true the EndKey (or EndKeyDocID) comparison uses "<=". Else it uses "<".
Default value is true.
(Inherited from Query.) | |
InclusiveStart |
If true the StartKey (or StartKeyDocID) comparison uses ">=". Else it uses ">"
(Inherited from Query.) | |
IndexUpdateMode |
Gets or sets when a View index is updated when running a Query.
(Inherited from Query.) | |
Keys |
Gets or sets the keys of the values to return.
A null value has no effect.
(Inherited from Query.) | |
LastError |
Returns the last error, if any, that occured while executing
the Query, otherwise null.
| |
Limit |
Gets or sets the maximum number of rows to return.
The default value is int.MaxValue, meaning 'unlimited'.
(Inherited from Query.) | |
MapOnly |
Gets or sets whether to only use the map function without using the reduce function.
(Inherited from Query.) | |
PostFilter |
Gets or sets an optional predicate that filters the resulting query rows.
If present, it's called on every row returned from the query, and if it returnsfalseNO
the row is skipped.
(Inherited from Query.) | |
Prefetch |
Gets or sets whether to include the entire Document content with the results.
The Documents can be accessed via the QueryRow's
documentProperties property.
(Inherited from Query.) | |
PrefixMatchLevel |
If nonzero, enables prefix matching of string or array keys.
* A value of 1 treats the endKey itself as a prefix: if it's a string, keys in the index that
come after the endKey, but begin with the same prefix, will be matched. (For example, if the
endKey is "foo" then the key "foolish" in the index will be matched, but not "fong".) Or if
the endKey is an array, any array beginning with those elements will be matched. (For
example, if the endKey is [1], then [1, "x"] will match, but not [2].) If the key is any
other type, there is no effect.
* A value of 2 assumes the endKey is an array and treats its final item as a prefix, using the
rules above. (For example, an endKey of [1, "x"] will match [1, "xtc"] but not [1, "y"].)
* A value of 3 assumes the key is an array of arrays, etc.
Note that if the .descending property is also set, the search order is reversed and the above
discussion applies to the startKey, _not_ the endKey.
(Inherited from Query.) | |
Rows | ||
Skip |
Gets or sets the number of initial rows to skip. Default value is 0.
(Inherited from Query.) | |
StartKey |
Gets or sets the key of the first value to return.
A null value has no effect.
(Inherited from Query.) | |
StartKeyDocId |
Gets or sets the Document id of the first value to return.
A null value has no effect. This is useful if the view contains
multiple identical keys, making startKey ambiguous.
(Inherited from Query.) | |
UpdateInterval |
The shortest interval at which the query will update, regardless of how often the
database changes. Defaults to 200ms. Increase this if the query is expensive and
the database updates frequently, to limit CPU consumption.
|
Name | Description | |
---|---|---|
Dispose |
Releases all resource used by the Query object.
(Inherited from Query.) | |
QueryOptionsChanged |
Used to indicate that the options of the live query have changed since its first
run.
| |
Run | Sends the query to the server and returns an enumerator over the result rows (Synchronous).
(Overrides QueryRun.) | |
RunAsync |
Runs the Query asynchronously and
will notified Completed event handlers on completion.
(Inherited from Query.) | |
RunAsync(FuncQueryEnumerator, CancellationToken) | (Inherited from Query.) | |
Start | Starts observing database changes. | |
Stop |
Stops the LiveQuery and stops observing Database changes.
| |
ToLiveQuery |
Returns a new LiveQuery with identical properties to the the Query.
(Inherited from Query.) | |
ToString | (Overrides QueryToString.) | |
WaitForRows |
Blocks until the intial Query completes.
|
Name | Description | |
---|---|---|
Changed |
Adds or removed a LiveQuery change delegate that will be called
whenever the Database changes in a way that would affect the results of the
Query.
| |
Completed |
Event raised when a query has finished running.
(Inherited from Query.) |