| Modifier and Type | Method and Description | 
|---|---|
ListenerToken | 
addChangeListener(Executor executor,
                 QueryChangeListener listener)
Adds a query change listener with the dispatch queue on which changes
 will be posted. 
 | 
ListenerToken | 
addChangeListener(QueryChangeListener listener)
Adds a query change listener. 
 | 
ResultSet | 
execute()
Executes the query. 
 | 
String | 
explain()
Returns a string describing the implementation of the compiled query. 
 | 
Parameters | 
getParameters()
Returns a copies of the current parameters. 
 | 
Having | 
having(Expression expression)
Creates and chain a Having object for filtering the aggregated values
 from the the GROUP BY clause. 
 | 
Limit | 
limit(Expression limit)
Creates and chains a Limit object to limit the number query results. 
 | 
Limit | 
limit(Expression limit,
     Expression offset)
Creates and chains a Limit object to skip the returned results for the given offset
 position and to limit the number of results to not more than the given limit value. 
 | 
OrderBy | 
orderBy(Ordering... orderings)
Create and chain an ORDER BY component for specifying the ORDER BY clause of the query. 
 | 
void | 
removeChangeListener(ListenerToken token)
Removes a change listener wih the given listener token. 
 | 
void | 
setParameters(Parameters parameters)
Set parameters should copy the given parameters. 
 | 
String | 
toString()  | 
@NonNull public Having having(@NonNull Expression expression)
expression - The expression@NonNull public OrderBy orderBy(@NonNull Ordering... orderings)
orderings - an array of the ORDER BY expressions.@NonNull public Limit limit(@NonNull Expression limit)
limit - The limit expression.@NonNull public Limit limit(@NonNull Expression limit, @Nullable Expression offset)
limit - The limit expression.offset - The offset expression.public Parameters getParameters()
getParameters in interface Querypublic void setParameters(Parameters parameters)
setParameters in interface Query@NonNull public ResultSet execute() throws CouchbaseLiteException
The results come from a snapshot of the database taken at the moment the run() method is called, so they will not reflect any changes made to the database afterwards.
execute in interface QueryCouchbaseLiteException - if there is an error when running the query.@NonNull public String explain() throws CouchbaseLiteException
explain in interface QueryCouchbaseLiteException - if an error occurs@NonNull public ListenerToken addChangeListener(@NonNull QueryChangeListener listener)
addChangeListener in interface Querylistener - The listener to post changes.@NonNull public ListenerToken addChangeListener(Executor executor, @NonNull QueryChangeListener listener)
addChangeListener in interface Queryexecutor - The executor object that calls listener. If null, use default executor.listener - The listener to post changes.public void removeChangeListener(@NonNull
                                 ListenerToken token)
removeChangeListener in interface Querytoken - The listener token.