Namespace: BuiltQuery
valuesBuilder. BuiltQuery
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 functions
string[] 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 start
number the one-based position within the result set of the first tuple. length
number the number of tuples in the slice. transform
transform <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 query
queryBuilder.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 forestNames
string <optional>
<repeatable>
the names of forests providing documents for the result set values
string <optional>
<repeatable>
options modifying the default behaviour of the query Returns:
a built query