Package com.couchbase.client.java.view
Class ViewOptions
public class ViewOptions extends CommonOptions<ViewOptions>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ViewOptions.Built
Nested classes/interfaces inherited from class com.couchbase.client.java.CommonOptions
CommonOptions.BuiltCommonOptions
-
Method Summary
Modifier and Type Method 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(long key)
ViewOptions
endKey(JsonArray key)
ViewOptions
endKey(JsonObject 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(long key)
ViewOptions
key(JsonArray key)
ViewOptions
key(JsonObject 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(long key)
ViewOptions
startKey(JsonArray key)
ViewOptions
startKey(JsonObject 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()
Methods inherited from class com.couchbase.client.java.CommonOptions
clientContext, parentSpan, retryStrategy, self, timeout
-
Method Details
-
viewOptions
-
namespace
-
serializer
-
reduce
Explicitly enable/disable the reduce function on the query.- Parameters:
reduce
- if reduce should be enabled or not.- Returns:
- the
ViewOptions
object for proper chaining.
-
limit
Limit the number of the returned documents to the specified number.- Parameters:
limit
- the number of documents to return.- Returns:
- the
ViewOptions
object for proper chaining.
-
group
Group the results using the reduce function to a group or single row.Important: this setter and
groupLevel(int)
should not be used together in the sameViewOptions
. 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.- Returns:
- the
ViewOptions
object for proper chaining.
-
groupLevel
Specify the group level to be used.Important:
group(boolean)
and this setter should not be used together in the sameViewOptions
. It is sufficient to only use this setter and usegroup(boolean)
in cases where you always want the highest group level implicitly.- Parameters:
grouplevel
- How deep the grouping level should be.- Returns:
- the
ViewOptions
object for proper chaining.
-
inclusiveEnd
Specifies whether the specified end key should be included in the result.- Returns:
- the
ViewOptions
object for proper chaining.
-
skip
Skip this number of records before starting to return the results.- Parameters:
skip
- The number of records to skip.- Returns:
- the
ViewOptions
object for proper chaining.
-
scanConsistency
Sets the scan consistency (staleness) of a view query.- Parameters:
scanConsistency
- Which consistency mode should be used.- Returns:
- the
ViewOptions
object for proper chaining.
-
onError
Sets the response in the event of an error.See the "OnError" enum for more details on the available options.
- Parameters:
viewErrorMode
- The appropriate error handling type.- Returns:
- the
ViewOptions
object for proper chaining.
-
debug
Enable debugging on view queries.- Returns:
- the
ViewOptions
object for proper chaining.
-
order
Return the documents in descending key order.- Returns:
- the
ViewOptions
object for proper chaining.
-
key
-
key
-
key
-
key
-
key
-
key
-
key
-
keys
-
startKeyDocId
-
endKeyDocId
-
endKey
-
endKey
-
endKey
-
endKey
-
endKey
-
endKey
-
endKey
-
startKey
-
startKey
-
startKey
-
startKey
-
startKey
-
startKey
-
startKey
-
raw
-
toString
A string representation of this ViewQuery, suitable for logging and other human consumption. If thekeys(JsonArray)
parameter is too large, it is truncated in this dump.see the
export()
()} for the parameter representation of the ViewQuery execution URL. -
build
-