public class ViewOptions extends CommonOptions<ViewOptions>
Modifier and Type | Class and Description |
---|---|
class |
ViewOptions.Built |
CommonOptions.BuiltCommonOptions
Modifier and Type | Method and Description |
---|---|
ViewOptions.Built |
build() |
ViewOptions |
debug(boolean debug)
Enable debugging on view queries.
|
ViewOptions |
endKey(boolean key) |
ViewOptions |
endKey(double key) |
ViewOptions |
endKey(int key) |
ViewOptions |
endKey(JsonArray key) |
ViewOptions |
endKey(JsonObject key) |
ViewOptions |
endKey(long key) |
ViewOptions |
endKey(String key) |
ViewOptions |
endKeyDocId(String id) |
ViewOptions |
group(boolean group)
Group the results using the reduce function to a group or single row.
|
ViewOptions |
groupLevel(int grouplevel)
Specify the group level to be used.
|
ViewOptions |
inclusiveEnd(boolean inclusive)
Specifies whether the specified end key should be included in the result.
|
ViewOptions |
key(boolean key) |
ViewOptions |
key(double key) |
ViewOptions |
key(int key) |
ViewOptions |
key(JsonArray key) |
ViewOptions |
key(JsonObject key) |
ViewOptions |
key(long key) |
ViewOptions |
key(String key) |
ViewOptions |
keys(JsonArray keys) |
ViewOptions |
limit(int limit)
Limit the number of the returned documents to the specified number.
|
ViewOptions |
namespace(DesignDocumentNamespace namespace) |
ViewOptions |
onError(ViewErrorMode viewErrorMode)
Sets the response in the event of an error.
|
ViewOptions |
order(ViewOrdering ordering)
Return the documents in descending key order.
|
ViewOptions |
raw(String key,
String value) |
ViewOptions |
reduce(boolean reduce)
Explicitly enable/disable the reduce function on the query.
|
ViewOptions |
scanConsistency(ViewScanConsistency scanConsistency)
Sets the scan consistency (staleness) of a view query.
|
ViewOptions |
serializer(JsonSerializer serializer) |
ViewOptions |
skip(int skip)
Skip this number of records before starting to return the results.
|
ViewOptions |
startKey(boolean key) |
ViewOptions |
startKey(double key) |
ViewOptions |
startKey(int key) |
ViewOptions |
startKey(JsonArray key) |
ViewOptions |
startKey(JsonObject key) |
ViewOptions |
startKey(long key) |
ViewOptions |
startKey(String key) |
ViewOptions |
startKeyDocId(String id) |
String |
toString()
A string representation of this ViewQuery, suitable for logging and other human consumption.
|
static ViewOptions |
viewOptions() |
clientContext, parentSpan, retryStrategy, self, timeout
public static ViewOptions viewOptions()
public ViewOptions namespace(DesignDocumentNamespace namespace)
public ViewOptions serializer(JsonSerializer serializer)
public ViewOptions reduce(boolean reduce)
reduce
- if reduce should be enabled or not.ViewOptions
object for proper chaining.public ViewOptions limit(int limit)
limit
- the number of documents to return.ViewOptions
object for proper chaining.public ViewOptions group(boolean group)
Important: this setter and groupLevel(int)
should not be used
together in the same ViewOptions
. It is sufficient to only set the
grouping level only and use this setter in cases where you always want the
highest group level implictly.
ViewOptions
object for proper chaining.public ViewOptions groupLevel(int grouplevel)
Important: group(boolean)
and this setter should not be used
together in the same ViewOptions
. It is sufficient to only use this
setter and use group(boolean)
in cases where you always want
the highest group level implicitly.
grouplevel
- How deep the grouping level should be.ViewOptions
object for proper chaining.public ViewOptions inclusiveEnd(boolean inclusive)
ViewOptions
object for proper chaining.public ViewOptions skip(int skip)
skip
- The number of records to skip.ViewOptions
object for proper chaining.public ViewOptions scanConsistency(ViewScanConsistency scanConsistency)
scanConsistency
- Which consistency mode should be used.ViewOptions
object for proper chaining.public ViewOptions onError(ViewErrorMode viewErrorMode)
See the "OnError" enum for more details on the available options.
viewErrorMode
- The appropriate error handling type.ViewOptions
object for proper chaining.public ViewOptions debug(boolean debug)
ViewOptions
object for proper chaining.public ViewOptions order(ViewOrdering ordering)
ViewOptions
object for proper chaining.public ViewOptions key(String key)
public ViewOptions key(int key)
public ViewOptions key(long key)
public ViewOptions key(double key)
public ViewOptions key(boolean key)
public ViewOptions key(JsonObject key)
public ViewOptions key(JsonArray key)
public ViewOptions keys(JsonArray keys)
public ViewOptions startKeyDocId(String id)
public ViewOptions endKeyDocId(String id)
public ViewOptions endKey(String key)
public ViewOptions endKey(int key)
public ViewOptions endKey(long key)
public ViewOptions endKey(double key)
public ViewOptions endKey(boolean key)
public ViewOptions endKey(JsonObject key)
public ViewOptions endKey(JsonArray key)
public ViewOptions startKey(String key)
public ViewOptions startKey(int key)
public ViewOptions startKey(long key)
public ViewOptions startKey(double key)
public ViewOptions startKey(boolean key)
public ViewOptions startKey(JsonObject key)
public ViewOptions startKey(JsonArray key)
public ViewOptions raw(String key, String value)
public String toString()
keys(JsonArray)
parameter is too large, it is truncated in this dump.
see the export()
()} for the parameter representation of the ViewQuery execution URL.
@Stability.Internal public ViewOptions.Built build()
Copyright © 2020 Couchbase, Inc.. All rights reserved.