<private> new DefaultViewQuery()
Class for dynamically constructing normal view queries (non-spatial). You must use ViewQuery.from to construct this object.
- Since:
-
- 2.0.0 (stability: committed)
Extends
Methods
-
custom(opts) → {ViewQuery}
-
Allows you to specify custom view options that may not be available though the fluent interface defined by this class.
Parameters:
Name Type Description optsObject - Since:
-
- 2.0.0 (stability: committed)
- Inherited From:
Returns:
- Type
- ViewQuery
-
from(ddoc, name) → {ViewQuery}
-
Specifies the design document and view name to use for this query.
Parameters:
Name Type Description ddocstring The design document to use.
namestring The view to use.
- Since:
-
- 2.0.0 (stability: committed)
- Inherited From:
Returns:
- Type
- ViewQuery
-
group(group_level) → {DefaultViewQuery}
-
Specifies at what level to perform result grouping. These levels map to indexes within the emitted key arrays. A value of -1 indicates to not perform any grouping.
Parameters:
Name Type Description group_levelnumber - Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
id_range(start, end) → {DefaultViewQuery}
-
Specifies a range of document id's to retrieve from the index.
Parameters:
Name Type Description startstring | undefined endstring | undefined - Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
key(key) → {DefaultViewQuery}
-
Specifies a specified key to retrieve from the index.
Parameters:
Name Type Description keystring - Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
keys(keys) → {DefaultViewQuery}
-
Specifies a list of keys you wish to retrieve from the index.
Parameters:
Name Type Description keysArray.<string> - Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
limit(limit) → {ViewQuery}
-
Specifies the maximum number of results to return.
Parameters:
Name Type Description limitnumber - Since:
-
- 2.0.0 (stability: committed)
- Inherited From:
Returns:
- Type
- ViewQuery
-
order(order) → {DefaultViewQuery}
-
Specifies the desired ordering for the results.
Parameters:
Name Type Description orderViewQuery.Order - Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
range(start, end, inclusive_end) → {DefaultViewQuery}
-
Specifies a range of keys to retrieve from the index. You may specify both a start and an end point and additionally specify whether or not the end value is inclusive or exclusive.
Parameters:
Name Type Argument Description startstring | undefined endstring | undefined inclusive_endboolean <optional>
- Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
reduce(reduce) → {DefaultViewQuery}
-
Specifies whether to execute the map-reduce reduce step.
Parameters:
Name Type Description reduceboolean - Since:
-
- 2.0.0 (stability: committed)
Returns:
- Type
- DefaultViewQuery
-
skip(skip) → {ViewQuery}
-
Specifies how many results to skip from the beginning of the result set.
Parameters:
Name Type Description skipnumber - Since:
-
- 2.0.0 (stability: committed)
- Inherited From:
Returns:
- Type
- ViewQuery
-
stale(stale) → {ViewQuery}
-
Specifies how this query will affect view indexing, both before and after the query is executed.
Parameters:
Name Type Description staleViewQuery.Update How to update the index.
- Since:
-
- 2.0.0 (stability: committed)
- Inherited From:
- Default Value:
-
- ViewQuery.Update.NONE
Returns:
- Type
- ViewQuery