An object representing the result of building a query using
the helper functions of a valuesBuilder. You must call
the valuesBuilder#fromIndexes function to create the initial
BuiltQuery for the values query before calling the functions
to specify the other clauses of the built query.
Methods
-
aggregates(functions) → {valuesBuilder.BuiltQuery}
-
Specifies aggregates to calculate over the tuples (aka rows) projected from the indexes for the documents selected by the where clause. This function must be called on the builtQuery returned by the valuesBuilder#valuesFromIndexes function or another function specifying a values query clause.
Parameters:
Name Type Description functionsstring[] one or more built-in functions such avg, correlation, count, covariance, covariance-population, max, median, min, stddev, stddev-population, sum, variance, or variance-population or the return values from the valuesBuilder#udf function specifying a user-defined aggregate function. Returns:
a built query -
slice(start, length, transform) → {valuesBuilder.BuiltQuery}
-
Sets the slice clause of a built query to select the slice of the result set based on the first tuple and the number of tuples (aka rows). This function must be called on the builtQuery returned by the valuesBuilder#valuesFromIndexes function or another function specifying a values query clause.
Parameters:
Name Type Argument Description startnumber the one-based position within the result set of the first tuple. lengthnumber the number of tuples in the slice. transformtransform <optional>
a transform to apply to the slice on the server as specified by the valuesBuilder#transform function. Returns:
a built query -
where(query) → {valuesBuilder.BuiltQuery}
-
Sets the where clause of a values query, using the helper functions of a valuesBuilder to specify a structured query. This function must be called on the builtQuery returned by the valuesBuilder#valuesFromIndexes function or another function specifying a values query clause.
Parameters:
Name Type Description queryqueryBuilder.Query one or more composable queries returned by the values query builder functions. Returns:
a built query -
withOptions(forestNames, values) → {valuesBuilder.BuiltQuery}
-
Sets the withOptions clause of a built query to configure the query; takes a configuration object with the following named parameters. This function must be called on the builtQuery returned by the valuesBuilder#valuesFromIndexes function or another function specifying a values query clause.
Parameters:
Name Type Argument Description forestNamesstring <optional>
<repeatable>
the names of forests providing documents for the result set valuesstring <optional>
<repeatable>
options modifying the default behaviour of the query Returns:
a built query