Interface QueryOptions

Interface used for providing options to a new Query class instance.

interface QueryOptions {
    filters?: SindexFilterPredicate[];
    maxRecords?: number;
    nobins?: boolean;
    paginate?: boolean;
    select?: string[];
    ttl?: number;
    udf?: UDF;
}

Properties

Filters to apply to the query.

Note: Currently, a single index filter is supported. To do more advanced filtering, you need to use a user-defined function (UDF) to process the result set on the server.

maxRecords?: number

Approximate number of records to return to client.

When paginate is true, then maxRecords will be the page size if there are enough records remaining in the query to fill the page size.

When paginate is false, this number is divided by the number of nodes involved in the scan, and actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

nobins?: boolean

If set to true, the query will return only meta data, and exclude bins.

paginate?: boolean

If set to true, paginated queries are enabled. In order to receive paginated results, the maxRecords property must assign a nonzero integer value.

select?: string[]

List of bin names to be selected by the query. If a query specifies bins to be selected, then only those bins will be returned. If no bins are selected, then all bins will be returned (unless Query#nobins is set to true).

ttl?: number

The time-to-live (expiration) of the record in seconds.

There are also special values that can be set in the record TTL For details

Note that the TTL value will be employed ONLY on background query writes.

udf?: UDF

User-defined function parameters to be applied to the query executed using Query#foreach.

MMNEPVFCICPMFPCPTTAAATR