Methods
# async static connect(connStr, optionsopt, callbackopt)
Connect establishes a connection to the cluster and is the entry point for all SDK operations.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
connStr |
string | ||
options |
* |
<optional> |
|
username |
string |
<optional> |
|
password |
string |
<optional> |
|
clientCertificate |
string |
<optional> |
|
certificateChain |
string |
<optional> |
|
transcoder |
Transcoder |
<optional> |
|
logFunc |
LoggingCallback |
<optional> |
|
callback |
* |
<optional> |
CouchbaseError
Promise
# analyticsIndexes() → {AnalyticsIndexManager}
Gets an analytics index manager for this cluster
Never
# async analyticsQuery(query, optionsopt, callbackopt) → {Promise.<AnalyticsResult>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string | The query string to execute. |
|
options |
* |
<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 |
integer |
<optional> |
timeout specifies the number of ms to wait for completion before cancelling the operation and returning control to the application. |
callback |
AnalyticsQueryCallback |
<optional> |
CouchbaseError
# bucket(bucketName) → {Bucket}
Gets a reference to a bucket.
Parameters:
Name | Type | Description |
---|---|---|
bucketName |
string |
Never
# async close()
Closes all connections associated with this cluster. Any running operations will be cancelled. Further operations will cause new connections to be established.
Never
# async diagnostics(optionsopt, callback) → {Promise.<DiagnosticsResult>}
Diagnostics returns stateful data about the current SDK connections.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
* |
<optional> |
|
reportId |
string |
<optional> |
|
callback |
DiagnosticsCallback |
CouchbaseError
# async query(query, optionsopt, callbackopt) → {Promise.<QueryResult>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
string | The query string to execute. |
|
options |
* |
<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. |
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 |
integer |
<optional> |
timeout specifies the number of ms to wait for completion before cancelling the operation and returning control to the application. |
callback |
QueryCallback |
<optional> |
CouchbaseError
# async searchQuery(query, options, callback) → {Promise.<SearchQueryResult>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
SearchQuery | The search query object describing the requested search. |
|
options |
* | ||
skip |
number |
<optional> |
|
limit |
number |
<optional> |
|
explain |
boolean |
<optional> |
|
highlight |
Array.<string> |
<optional> |
|
fields |
Array.<string> |
<optional> |
|
facets |
Array.<SearchFacet> |
<optional> |
|
sort |
SearchSort |
<optional> |
|
consistency |
SearchConsistency |
<optional> |
|
consistentWith |
MutationState |
<optional> |
|
timeout |
number |
<optional> |
|
callback |
SearchQueryCallback |