Class

Scope

Scope

Methods

# async analyticsQuery(query, optionsopt, callbackopt) → {Promise.<AnalyticsResult>}

Parameters:
Name Type Attributes Description
query string

The query string to execute.

options Object <optional>
parameters Object | Array <optional>

parameters specifies a list of values to substitute within the query statement during execution.

scanConsistency AnalyticsScanConsistency <optional>

scanConsistency specifies the level of consistency that is required for the results of the query.

clientContextId string <optional>

clientContextId specifies a unique identifier for the execution of this query to enable various tools to correlate the query.

priority boolean <optional>

priority specifies that this query should be executed with a higher priority than others, causing it to receive extra resources.

readOnly boolean <optional>

readOnly specifies that query should not be permitted to mutate any data. This option also enables a few minor performance improvements and the ability to automatically retry the query on failure.

raw Object <optional>

raw specifies an object represent raw key value pairs that should be included with the query.

timeout number <optional>

timeout specifies the number of ms to wait for completion before cancelling the operation and returning control to the application.

callback AnalyticsQueryCallback <optional>

View Source scope.js, line 134

Promise.<AnalyticsResult>

# collection(collectionName) → {Collection}

Gets a reference to a specific collection.

Parameters:
Name Type Description
collectionName string

View Source scope.js, line 33

Never

Collection

# async query(query, optionsopt, callbackopt) → {Promise.<QueryResult>}

Parameters:
Name Type Attributes Description
query string

The query string to execute.

options Object <optional>
parameters Object | Array <optional>

parameters specifies a list of values to substitute within the query statement during execution.

scanConsistency QueryScanConsistency <optional>

scanConsistency specifies the level of consistency that is required for the results of the query.

consistentWith MutationState <optional>

consistentWith specifies a MutationState object to use when determining the level of consistency needed for the results of the query.

adhoc boolean <optional>

adhoc specifies that the query is an adhoc query and should not be prepared and cached within the SDK.

flexIndex boolean <optional>

flexIndex specifies to enable the use of FTS indexes when selecting indexes to use for the query.

clientContextId string <optional>

clientContextId specifies a unique identifier for the execution of this query to enable various tools to correlate the query.

maxParallelism number <optional>
pipelineBatch number <optional>
pipelineCap number <optional>
scanWait number <optional>
scanCap number <optional>
readOnly boolean <optional>

readOnly specifies that query should not be permitted to mutate any data. This option also enables a few minor performance improvements and the ability to automatically retry the query on failure.

profile QueryProfileMode <optional>

profile enables the return of profiling data from the server.

metrics boolean <optional>

metrics enables the return of metrics data from the server

raw Object <optional>

raw specifies an object represent raw key value pairs that should be included with the query.

timeout number <optional>

timeout specifies the number of ms to wait for completion before cancelling the operation and returning control to the application.

callback QueryCallback <optional>

View Source scope.js, line 83

Promise.<QueryResult>