Modifier and Type | Method and Description |
---|---|
ListenerToken |
addChangeListener(Executor executor,
QueryChangeListener listener)
Adds a change listener for the changes that occur in the query results with an executor
on which the changes will be posted to the listener.
|
ListenerToken |
addChangeListener(QueryChangeListener listener)
Adds a change listener for the changes that occur in the query results.
|
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.
|
void |
removeChangeListener(ListenerToken token)
Removes a change listener wih the given listener token.
|
void |
setParameters(Parameters parameters)
Set parameters should copy the given parameters.
|
@Nullable Parameters getParameters()
void setParameters(Parameters parameters)
@NonNull 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.
CouchbaseLiteException
- if there is an error when running the query.@NonNull String explain() throws CouchbaseLiteException
CouchbaseLiteException
- if an error occurs@NonNull ListenerToken addChangeListener(@NonNull QueryChangeListener listener)
listener
- The listener to post changes.@NonNull ListenerToken addChangeListener(@Nullable Executor executor, @NonNull QueryChangeListener listener)
executor
- The executor object that calls listenerlistener
- The listener to post changes.void removeChangeListener(@NonNull ListenerToken token)
token
- The listener token.