Package com.couchbase.client.java.view
Class SpatialViewQuery
java.lang.Object
com.couchbase.client.java.view.SpatialViewQuery
- All Implemented Interfaces:
Serializable
public class SpatialViewQuery extends Object implements Serializable
Fluent DSL for a Spatial View Query.
- Since:
- 2.1.0
- Author:
- Michael Nitschinger
- See Also:
- Serialized Form
-
Method Summary
Modifier and Type Method Description SpatialViewQuerydebug()Enabled debugging on view queries.SpatialViewQuerydebug(boolean debug)SpatialViewQuerydevelopment()SpatialViewQuerydevelopment(boolean development)protected Stringencode(String source)Helper method to properly encode a string.SpatialViewQueryendRange(JsonArray endRange)booleanequals(Object o)static SpatialViewQueryfrom(String design, String view)Creates an newSpatialViewQuery.StringgetDesign()StringgetView()inthashCode()SpatialViewQueryincludeDocs()Proactively load the full document for the row returned.SpatialViewQueryincludeDocs(boolean includeDocs)Proactively load the full document for the row returned.SpatialViewQueryincludeDocs(boolean includeDocs, Class<? extends Document<?>> target)Proactively load the full document for the row returned.SpatialViewQueryincludeDocs(Class<? extends Document<?>> target)Proactively load the full document for the row returned.Class<? extends Document<?>>includeDocsTarget()booleanisDevelopment()booleanisIncludeDocs()SpatialViewQuerylimit(int limit)Limit the number of the returned documents to the specified number.SpatialViewQueryonError(OnError onError)Sets the response in the event of an error.SpatialViewQueryrange(JsonArray startRange, JsonArray endRange)SpatialViewQueryskip(int skip)Skip this number of records before starting to return the results.SpatialViewQuerystale(Stale stale)Allow the results from a stale view to be used.SpatialViewQuerystartRange(JsonArray startRange)StringtoString()
-
Method Details
-
from
Creates an newSpatialViewQuery.- Parameters:
design- the name of the design document.view- the name of the view.- Returns:
- a
SpatialViewQueryDSL.
-
development
-
development
-
includeDocs
Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.- Returns:
- the
SpatialViewQueryDSL.
-
includeDocs
Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.- Parameters:
target- the custom document type target.- Returns:
- the
SpatialViewQueryDSL.
-
includeDocs
Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.- Parameters:
includeDocs- if it should be enabled or not.- Returns:
- the
SpatialViewQueryDSL.
-
includeDocs
Proactively load the full document for the row returned. This only works if reduce is false, since with reduce the original document ID is not included anymore.- Parameters:
includeDocs- if it should be enabled or not.target- the custom document type target.- Returns:
- the
SpatialViewQueryDSL.
-
limit
Limit the number of the returned documents to the specified number.- Parameters:
limit- the number of documents to return.- Returns:
- the
SpatialViewQueryobject 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
SpatialViewQueryobject for proper chaining.
-
stale
Allow the results from a stale view to be used. See the "Stale" enum for more information on the possible options. The default setting is "update_after"!- Parameters:
stale- Which stale mode should be used.- Returns:
- the
SpatialViewQueryobject for proper chaining.
-
debug
Enabled debugging on view queries.- Returns:
- the
SpatialViewQueryobject for proper chaining.
-
debug
-
startRange
-
endRange
-
range
-
onError
Sets the response in the event of an error. See the "OnError" enum for more details on the available options.- Parameters:
onError- The appropriate error handling type.- Returns:
- the
SpatialViewQueryobject for proper chaining.
-
encode
Helper method to properly encode a string. This method can be overridden if a different encoding logic needs to be used.- Parameters:
source- source string.- Returns:
- encoded target string.
-
toString
-
getDesign
-
getView
-
isDevelopment
public boolean isDevelopment() -
isIncludeDocs
public boolean isIncludeDocs() -
includeDocsTarget
-
equals
-
hashCode
public int hashCode()
-