couchbase 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deps/lcb/CMakeLists.txt +1 -1
- package/deps/lcb/CONTRIBUTING.md +1 -1
- package/deps/lcb/README.markdown +2 -2
- package/deps/lcb/RELEASE_NOTES.markdown +72 -17
- package/deps/lcb/cmake/Modules/GetVersionInfo.cmake +1 -1
- package/deps/lcb/contrib/cbsasl/src/scram-sha/scram_utils.cc +22 -26
- package/deps/lcb/contrib/lcb-jsoncpp/lcb-jsoncpp.cpp +20 -6
- package/deps/lcb/doc/Doxyfile +1 -1
- package/deps/lcb/example/minimal/query.c +9 -7
- package/deps/lcb/gyp_config/common/libcouchbase/configuration.h +3 -3
- package/deps/lcb/include/libcouchbase/couchbase.h +3 -1
- package/deps/lcb/include/libcouchbase/error.h +2 -0
- package/deps/lcb/include/libcouchbase/ixmgmt.h +15 -10
- package/deps/lcb/include/libcouchbase/tracing.h +2 -2
- package/deps/lcb/include/memcached/protocol_binary.h +21 -0
- package/deps/lcb/libcouchbase.gyp +347 -349
- package/deps/lcb/packaging/deb/control +1 -1
- package/deps/lcb/src/analytics/analytics_handle.cc +7 -5
- package/deps/lcb/src/analytics/analytics_handle.hh +28 -0
- package/deps/lcb/src/capi/cmd_counter.hh +6 -0
- package/deps/lcb/src/capi/cmd_exists.hh +6 -0
- package/deps/lcb/src/capi/cmd_get.hh +5 -0
- package/deps/lcb/src/capi/cmd_get_replica.hh +6 -0
- package/deps/lcb/src/capi/cmd_remove.hh +6 -0
- package/deps/lcb/src/capi/cmd_search.hh +6 -0
- package/deps/lcb/src/capi/cmd_store.hh +16 -21
- package/deps/lcb/src/capi/cmd_subdoc.hh +18 -0
- package/deps/lcb/src/capi/cmd_touch.hh +6 -0
- package/deps/lcb/src/capi/cmd_unlock.hh +6 -0
- package/deps/lcb/src/capi/cmd_view.hh +6 -0
- package/deps/lcb/src/capi/collection_qualifier.hh +2 -2
- package/deps/lcb/src/cntl.cc +42 -8
- package/deps/lcb/src/dns-srv.cc +5 -3
- package/deps/lcb/src/errmap.cc +5 -9
- package/deps/lcb/src/errmap.h +7 -3
- package/deps/lcb/src/handler.cc +24 -18
- package/deps/lcb/src/lcbio/ctx.cc +4 -2
- package/deps/lcb/src/mcserver/mcserver.cc +8 -5
- package/deps/lcb/src/mcserver/negotiate.cc +39 -17
- package/deps/lcb/src/n1ql/ixmgmt.cc +1 -2
- package/deps/lcb/src/n1ql/query_handle.cc +27 -16
- package/deps/lcb/src/n1ql/query_handle.hh +27 -1
- package/deps/lcb/src/operations/counter.cc +1 -1
- package/deps/lcb/src/operations/exists.cc +2 -2
- package/deps/lcb/src/operations/get.cc +2 -2
- package/deps/lcb/src/operations/observe.cc +1 -1
- package/deps/lcb/src/operations/remove.cc +1 -1
- package/deps/lcb/src/operations/store.cc +1 -1
- package/deps/lcb/src/operations/subdoc.cc +1 -2
- package/deps/lcb/src/operations/touch.cc +2 -2
- package/deps/lcb/src/operations/unlock.cc +2 -2
- package/deps/lcb/src/search/search_handle.cc +27 -8
- package/deps/lcb/src/search/search_handle.hh +29 -0
- package/deps/lcb/src/ssl/ssl_common.c +6 -7
- package/deps/lcb/src/tracing/span.cc +43 -10
- package/deps/lcb/src/tracing/tracing-internal.h +105 -93
- package/deps/lcb/src/views/view_handle.cc +13 -5
- package/deps/lcb/src/views/view_handle.hh +29 -0
- package/deps/lcb/tests/CMakeLists.txt +21 -0
- package/deps/lcb/tests/basic/t_ctlcodes.cc +24 -3
- package/deps/lcb/tests/basic/t_jsparse.cc +8 -0
- package/deps/lcb/tests/iotests/mock-environment.cc +15 -0
- package/deps/lcb/tests/iotests/mock-environment.h +47 -0
- package/deps/lcb/tests/iotests/mock-unit-test.cc +96 -5
- package/deps/lcb/tests/iotests/mock-unit-test.h +32 -0
- package/deps/lcb/tests/iotests/t_collections.cc +1 -1
- package/deps/lcb/tests/iotests/t_confmon.cc +4 -2
- package/deps/lcb/tests/iotests/t_get.cc +14 -4
- package/deps/lcb/tests/iotests/t_n1ql.cc +17 -1
- package/deps/lcb/tests/iotests/t_views.cc +1 -0
- package/deps/lcb/tests/iotests/testutil.cc +168 -0
- package/deps/lcb/tests/iotests/testutil.h +111 -0
- package/deps/lcb/tests/mocksupport/procutil.c +32 -28
- package/deps/lcb/tests/mocksupport/server.c +0 -1
- package/deps/lcb/tools/cbc.cc +7 -0
- package/dist/analyticsindexmanager.js +3 -3
- package/dist/binding.d.ts +2 -0
- package/dist/bindingutilities.js +4 -0
- package/dist/bucketmanager.d.ts +31 -1
- package/dist/bucketmanager.js +28 -2
- package/dist/collection.js +2 -2
- package/dist/collectionmanager.js +2 -2
- package/dist/connection.js +3 -0
- package/dist/errors.d.ts +18 -0
- package/dist/errors.js +26 -2
- package/dist/eventingfunctionmanager.js +6 -6
- package/dist/queryindexmanager.js +3 -3
- package/dist/searchexecutor.js +3 -0
- package/dist/searchindexmanager.js +1 -1
- package/dist/searchquery.d.ts +17 -0
- package/dist/searchquery.js +22 -1
- package/dist/searchtypes.d.ts +7 -2
- package/dist/searchtypes.js +2 -2
- package/dist/usermanager.js +1 -1
- package/dist/viewindexmanager.js +1 -1
- package/package.json +1 -1
- package/src/connection.cpp +2 -0
- package/src/constants.cpp +2 -0
- package/src/instance.cpp +8 -1
- package/src/instance.h +1 -0
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
#include <stdio.h>
|
|
21
21
|
|
|
22
22
|
#ifndef _WIN32
|
|
23
|
-
#define _XOPEN_SOURCE
|
|
24
|
-
#include <stdlib.h>
|
|
25
23
|
#include <string.h>
|
|
26
24
|
#include <wordexp.h>
|
|
27
25
|
#include <fcntl.h> /* O_* */
|
|
@@ -51,6 +49,7 @@ static char **clisplit(const char *s)
|
|
|
51
49
|
ret[ii] = strdup(p.we_wordv[ii]);
|
|
52
50
|
}
|
|
53
51
|
ret[ii] = NULL;
|
|
52
|
+
wordfree(&p);
|
|
54
53
|
return ret;
|
|
55
54
|
}
|
|
56
55
|
|
|
@@ -59,39 +58,44 @@ static int spawn_process_impl(child_process_t *proc)
|
|
|
59
58
|
int rv;
|
|
60
59
|
char **argv;
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
if (
|
|
61
|
+
argv = clisplit(proc->name);
|
|
62
|
+
if (argv == NULL) {
|
|
63
|
+
fprintf(stderr, "Couldn't split arguments: %s\n", proc->name);
|
|
64
64
|
return -1;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
fprintf(stderr, "Couldn't split arguments\n");
|
|
74
|
-
exit(EXIT_FAILURE);
|
|
66
|
+
proc->pid = vfork();
|
|
67
|
+
if (proc->pid < 0) {
|
|
68
|
+
for (int i = 0; argv[i] != NULL; ++i) {
|
|
69
|
+
free(argv[i]);
|
|
70
|
+
}
|
|
71
|
+
free(argv);
|
|
72
|
+
return -1;
|
|
75
73
|
}
|
|
76
|
-
if (proc->
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
if (proc->pid == 0) {
|
|
75
|
+
/** In Child */
|
|
76
|
+
if (proc->redirect) {
|
|
77
|
+
int fd = open(proc->redirect, O_RDWR | O_CREAT | O_APPEND, 0644);
|
|
78
|
+
if (fd < 0) {
|
|
79
|
+
perror(proc->redirect);
|
|
80
|
+
exit(EXIT_FAILURE);
|
|
81
|
+
}
|
|
82
|
+
if (dup2(fd, fileno(stderr)) < 0 || dup2(fd, fileno(stdout)) < 0) {
|
|
83
|
+
perror("dup2");
|
|
84
|
+
exit(EXIT_FAILURE);
|
|
85
|
+
}
|
|
86
|
+
setvbuf(stderr, NULL, _IOLBF, 0);
|
|
81
87
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
rv = execvp(argv[0], argv);
|
|
89
|
+
if (rv < 0) {
|
|
90
|
+
perror(argv[0]);
|
|
91
|
+
return -1;
|
|
85
92
|
}
|
|
86
|
-
setvbuf(stderr, NULL, _IOLBF, 0);
|
|
87
93
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
perror(argv[0]);
|
|
91
|
-
exit(EXIT_FAILURE);
|
|
94
|
+
for (int i = 0; argv[i] != NULL; ++i) {
|
|
95
|
+
free(argv[i]);
|
|
92
96
|
}
|
|
93
|
-
|
|
94
|
-
return 0;
|
|
97
|
+
free(argv);
|
|
98
|
+
return 0;
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
void kill_process(child_process_t *process, int force)
|
package/deps/lcb/tools/cbc.cc
CHANGED
|
@@ -1273,6 +1273,13 @@ void VersionHandler::run()
|
|
|
1273
1273
|
#endif
|
|
1274
1274
|
printf(" SSL Headers: %s\n", OPENSSL_VERSION_TEXT);
|
|
1275
1275
|
#endif
|
|
1276
|
+
printf(" HAVE_PKCS5_PBKDF2_HMAC: "
|
|
1277
|
+
#ifdef HAVE_PKCS5_PBKDF2_HMAC
|
|
1278
|
+
"yes"
|
|
1279
|
+
#else
|
|
1280
|
+
"no"
|
|
1281
|
+
#endif
|
|
1282
|
+
"\n");
|
|
1276
1283
|
} else {
|
|
1277
1284
|
printf(" SSL: NOT SUPPORTED\n");
|
|
1278
1285
|
}
|
|
@@ -786,7 +786,7 @@ class AnalyticsIndexManager {
|
|
|
786
786
|
*/
|
|
787
787
|
async createLink(link, options, callback) {
|
|
788
788
|
if (options instanceof Function) {
|
|
789
|
-
callback = arguments[
|
|
789
|
+
callback = arguments[1];
|
|
790
790
|
options = undefined;
|
|
791
791
|
}
|
|
792
792
|
if (!options) {
|
|
@@ -830,7 +830,7 @@ class AnalyticsIndexManager {
|
|
|
830
830
|
*/
|
|
831
831
|
async replaceLink(link, options, callback) {
|
|
832
832
|
if (options instanceof Function) {
|
|
833
|
-
callback = arguments[
|
|
833
|
+
callback = arguments[1];
|
|
834
834
|
options = undefined;
|
|
835
835
|
}
|
|
836
836
|
if (!options) {
|
|
@@ -875,7 +875,7 @@ class AnalyticsIndexManager {
|
|
|
875
875
|
*/
|
|
876
876
|
async dropLink(linkName, dataverseName, options, callback) {
|
|
877
877
|
if (options instanceof Function) {
|
|
878
|
-
callback = arguments[
|
|
878
|
+
callback = arguments[2];
|
|
879
879
|
options = undefined;
|
|
880
880
|
}
|
|
881
881
|
if (!options) {
|
package/dist/binding.d.ts
CHANGED
|
@@ -184,6 +184,8 @@ export interface CppBinding {
|
|
|
184
184
|
LCB_ERR_SCOPE_NOT_FOUND: CppErrType;
|
|
185
185
|
LCB_ERR_INDEX_NOT_FOUND: CppErrType;
|
|
186
186
|
LCB_ERR_INDEX_EXISTS: CppErrType;
|
|
187
|
+
LCB_ERR_RATE_LIMITED: CppErrType;
|
|
188
|
+
LCB_ERR_QUOTA_LIMITED: CppErrType;
|
|
187
189
|
LCB_ERR_DOCUMENT_NOT_FOUND: CppErrType;
|
|
188
190
|
LCB_ERR_DOCUMENT_UNRETRIEVABLE: CppErrType;
|
|
189
191
|
LCB_ERR_DOCUMENT_LOCKED: CppErrType;
|
package/dist/bindingutilities.js
CHANGED
|
@@ -214,6 +214,10 @@ function translateCppError(err) {
|
|
|
214
214
|
return new errs.IndexNotFoundError(codeErr, context);
|
|
215
215
|
case binding_1.default.LCB_ERR_INDEX_EXISTS:
|
|
216
216
|
return new errs.IndexExistsError(codeErr, context);
|
|
217
|
+
case binding_1.default.LCB_ERR_RATE_LIMITED:
|
|
218
|
+
return new errs.RateLimitedError(codeErr, context);
|
|
219
|
+
case binding_1.default.LCB_ERR_QUOTA_LIMITED:
|
|
220
|
+
return new errs.QuotaLimitedError(codeErr, context);
|
|
217
221
|
/* KeyValue Error Definitions */
|
|
218
222
|
case binding_1.default.LCB_ERR_DOCUMENT_NOT_FOUND:
|
|
219
223
|
return new errs.DocumentNotFoundError(codeErr, context);
|
package/dist/bucketmanager.d.ts
CHANGED
|
@@ -18,7 +18,14 @@ export declare enum ConflictResolutionType {
|
|
|
18
18
|
/**
|
|
19
19
|
* Indicates that the seqno of the document should be used for conflict resolution.
|
|
20
20
|
*/
|
|
21
|
-
SequenceNumber = "seqno"
|
|
21
|
+
SequenceNumber = "seqno",
|
|
22
|
+
/**
|
|
23
|
+
* Indicates that custom conflict resolution should be used.
|
|
24
|
+
*
|
|
25
|
+
* @experimental This mode is only available in Couchbase Server 7.1 with the
|
|
26
|
+
* "developer-preview" mode enabled.
|
|
27
|
+
*/
|
|
28
|
+
Custom = "custom"
|
|
22
29
|
}
|
|
23
30
|
/**
|
|
24
31
|
* Represents the type of a bucket.
|
|
@@ -39,6 +46,21 @@ export declare enum BucketType {
|
|
|
39
46
|
*/
|
|
40
47
|
Ephemeral = "ephemeral"
|
|
41
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Represents the storage backend to use for a bucket.
|
|
51
|
+
*
|
|
52
|
+
* @category Management
|
|
53
|
+
*/
|
|
54
|
+
export declare enum StorageBackend {
|
|
55
|
+
/**
|
|
56
|
+
* Indicates the bucket should use the Couchstore storage engine.
|
|
57
|
+
*/
|
|
58
|
+
Couchstore = "couchstore",
|
|
59
|
+
/**
|
|
60
|
+
* Indicates the bucket should use the Magma storage engine.
|
|
61
|
+
*/
|
|
62
|
+
Magma = "magma"
|
|
63
|
+
}
|
|
42
64
|
/**
|
|
43
65
|
* Represents the eviction policy that should be used for a bucket.
|
|
44
66
|
*
|
|
@@ -117,6 +139,10 @@ export interface IBucketSettings {
|
|
|
117
139
|
* Specifies the type of bucket that should be used.
|
|
118
140
|
*/
|
|
119
141
|
bucketType: BucketType | string;
|
|
142
|
+
/**
|
|
143
|
+
* Specifies the storage backend to use for the bucket.
|
|
144
|
+
*/
|
|
145
|
+
storageBackend: StorageBackend | string;
|
|
120
146
|
/**
|
|
121
147
|
* Specifies the ejection method that should be used.
|
|
122
148
|
*/
|
|
@@ -189,6 +215,10 @@ export declare class BucketSettings implements IBucketSettings {
|
|
|
189
215
|
* Specifies the type of bucket that should be used.
|
|
190
216
|
*/
|
|
191
217
|
bucketType: BucketType;
|
|
218
|
+
/**
|
|
219
|
+
* Specifies the storage backend to use for the bucket.
|
|
220
|
+
*/
|
|
221
|
+
storageBackend: StorageBackend | string;
|
|
192
222
|
/**
|
|
193
223
|
* Specifies the ejection method that should be used.
|
|
194
224
|
*/
|
package/dist/bucketmanager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BucketManager = exports.BucketSettings = exports.CompressionMode = exports.EvictionPolicy = exports.BucketType = exports.ConflictResolutionType = void 0;
|
|
3
|
+
exports.BucketManager = exports.BucketSettings = exports.CompressionMode = exports.EvictionPolicy = exports.StorageBackend = exports.BucketType = exports.ConflictResolutionType = void 0;
|
|
4
4
|
const errors_1 = require("./errors");
|
|
5
5
|
const httpexecutor_1 = require("./httpexecutor");
|
|
6
6
|
const utilities_1 = require("./utilities");
|
|
@@ -22,6 +22,13 @@ var ConflictResolutionType;
|
|
|
22
22
|
* Indicates that the seqno of the document should be used for conflict resolution.
|
|
23
23
|
*/
|
|
24
24
|
ConflictResolutionType["SequenceNumber"] = "seqno";
|
|
25
|
+
/**
|
|
26
|
+
* Indicates that custom conflict resolution should be used.
|
|
27
|
+
*
|
|
28
|
+
* @experimental This mode is only available in Couchbase Server 7.1 with the
|
|
29
|
+
* "developer-preview" mode enabled.
|
|
30
|
+
*/
|
|
31
|
+
ConflictResolutionType["Custom"] = "custom";
|
|
25
32
|
})(ConflictResolutionType = exports.ConflictResolutionType || (exports.ConflictResolutionType = {}));
|
|
26
33
|
/**
|
|
27
34
|
* Represents the type of a bucket.
|
|
@@ -43,6 +50,22 @@ var BucketType;
|
|
|
43
50
|
*/
|
|
44
51
|
BucketType["Ephemeral"] = "ephemeral";
|
|
45
52
|
})(BucketType = exports.BucketType || (exports.BucketType = {}));
|
|
53
|
+
/**
|
|
54
|
+
* Represents the storage backend to use for a bucket.
|
|
55
|
+
*
|
|
56
|
+
* @category Management
|
|
57
|
+
*/
|
|
58
|
+
var StorageBackend;
|
|
59
|
+
(function (StorageBackend) {
|
|
60
|
+
/**
|
|
61
|
+
* Indicates the bucket should use the Couchstore storage engine.
|
|
62
|
+
*/
|
|
63
|
+
StorageBackend["Couchstore"] = "couchstore";
|
|
64
|
+
/**
|
|
65
|
+
* Indicates the bucket should use the Magma storage engine.
|
|
66
|
+
*/
|
|
67
|
+
StorageBackend["Magma"] = "magma";
|
|
68
|
+
})(StorageBackend = exports.StorageBackend || (exports.StorageBackend = {}));
|
|
46
69
|
/**
|
|
47
70
|
* Represents the eviction policy that should be used for a bucket.
|
|
48
71
|
*
|
|
@@ -106,6 +129,7 @@ class BucketSettings {
|
|
|
106
129
|
this.numReplicas = data.numReplicas;
|
|
107
130
|
this.replicaIndexes = data.replicaIndexes;
|
|
108
131
|
this.bucketType = data.bucketType;
|
|
132
|
+
this.storageBackend = data.storageBackend;
|
|
109
133
|
this.evictionPolicy = data.evictionPolicy;
|
|
110
134
|
this.maxExpiry = data.maxExpiry;
|
|
111
135
|
this.compressionMode = data.compressionMode;
|
|
@@ -153,6 +177,7 @@ class BucketSettings {
|
|
|
153
177
|
replicaNumber: data.numReplicas,
|
|
154
178
|
replicaIndexes: data.replicaIndexes,
|
|
155
179
|
bucketType: data.bucketType,
|
|
180
|
+
storageBackend: data.storageBackend,
|
|
156
181
|
evictionPolicy: data.evictionPolicy,
|
|
157
182
|
maxTTL: data.maxTTL || data.maxExpiry,
|
|
158
183
|
compressionMode: data.compressionMode,
|
|
@@ -171,6 +196,7 @@ class BucketSettings {
|
|
|
171
196
|
numReplicas: data.replicaNumber,
|
|
172
197
|
replicaIndexes: data.replicaIndexes,
|
|
173
198
|
bucketType: data.bucketType,
|
|
199
|
+
storageBackend: data.storageBackend,
|
|
174
200
|
evictionPolicy: data.evictionPolicy,
|
|
175
201
|
maxExpiry: data.maxTTL,
|
|
176
202
|
compressionMode: data.compressionMode,
|
|
@@ -378,7 +404,7 @@ class BucketManager {
|
|
|
378
404
|
*/
|
|
379
405
|
async getAllBuckets(options, callback) {
|
|
380
406
|
if (options instanceof Function) {
|
|
381
|
-
callback = arguments[
|
|
407
|
+
callback = arguments[0];
|
|
382
408
|
options = undefined;
|
|
383
409
|
}
|
|
384
410
|
if (!options) {
|
package/dist/collection.js
CHANGED
|
@@ -336,7 +336,7 @@ class Collection {
|
|
|
336
336
|
*/
|
|
337
337
|
touch(key, expiry, options, callback) {
|
|
338
338
|
if (options instanceof Function) {
|
|
339
|
-
callback = arguments[
|
|
339
|
+
callback = arguments[2];
|
|
340
340
|
options = undefined;
|
|
341
341
|
}
|
|
342
342
|
if (!options) {
|
|
@@ -586,7 +586,7 @@ class Collection {
|
|
|
586
586
|
}
|
|
587
587
|
_getReplica(mode, key, options, callback) {
|
|
588
588
|
if (options instanceof Function) {
|
|
589
|
-
callback = arguments[
|
|
589
|
+
callback = arguments[2];
|
|
590
590
|
options = undefined;
|
|
591
591
|
}
|
|
592
592
|
if (!options) {
|
|
@@ -142,7 +142,7 @@ class CollectionManager {
|
|
|
142
142
|
callback = arguments[3];
|
|
143
143
|
}
|
|
144
144
|
if (options instanceof Function) {
|
|
145
|
-
callback = arguments[
|
|
145
|
+
callback = arguments[1];
|
|
146
146
|
options = undefined;
|
|
147
147
|
}
|
|
148
148
|
if (!options) {
|
|
@@ -277,7 +277,7 @@ class CollectionManager {
|
|
|
277
277
|
*/
|
|
278
278
|
async dropScope(scopeName, options, callback) {
|
|
279
279
|
if (options instanceof Function) {
|
|
280
|
-
callback = arguments[
|
|
280
|
+
callback = arguments[1];
|
|
281
281
|
options = undefined;
|
|
282
282
|
}
|
|
283
283
|
if (!options) {
|
package/dist/connection.js
CHANGED
|
@@ -50,6 +50,9 @@ class Connection {
|
|
|
50
50
|
if (options.kvConnectTimeout) {
|
|
51
51
|
lcbDsnObj.options.config_total_timeout = fmtTmt(options.kvConnectTimeout);
|
|
52
52
|
}
|
|
53
|
+
else {
|
|
54
|
+
lcbDsnObj.options.config_total_timeout = '30s';
|
|
55
|
+
}
|
|
53
56
|
if (options.kvTimeout) {
|
|
54
57
|
lcbDsnObj.options.timeout = fmtTmt(options.kvTimeout);
|
|
55
58
|
}
|
package/dist/errors.d.ts
CHANGED
|
@@ -217,6 +217,24 @@ export declare class ScopeNotFoundError extends CouchbaseError {
|
|
|
217
217
|
export declare class IndexNotFoundError extends CouchbaseError {
|
|
218
218
|
constructor(cause?: Error, context?: ErrorContext);
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Indicates that a rate limit was exceeded while attempting to
|
|
222
|
+
* execute the operation.
|
|
223
|
+
*
|
|
224
|
+
* @category Error Handling
|
|
225
|
+
*/
|
|
226
|
+
export declare class RateLimitedError extends CouchbaseError {
|
|
227
|
+
constructor(cause?: Error, context?: ErrorContext);
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Indicates that a quota limit was exceeded while attempting to
|
|
231
|
+
* execute the operation.
|
|
232
|
+
*
|
|
233
|
+
* @category Error Handling
|
|
234
|
+
*/
|
|
235
|
+
export declare class QuotaLimitedError extends CouchbaseError {
|
|
236
|
+
constructor(cause?: Error, context?: ErrorContext);
|
|
237
|
+
}
|
|
220
238
|
/**
|
|
221
239
|
* Indicates that the referenced index already existed, but was expected
|
|
222
240
|
* to not yet exist for the operation.
|
package/dist/errors.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.EventingFunctionDeployedError = exports.EventingFunctionNotBootstrappedError = exports.EventingFunctionIdenticalKeyspaceError = exports.EventingFunctionCompilationFailureError = exports.EventingFunctionNotDeployedError = exports.EventingFunctionNotFoundError = exports.BucketNotFlushableError = exports.UserExistsError = exports.BucketExistsError = exports.GroupNotFoundError = exports.UserNotFoundError = exports.ScopeExistsError = exports.CollectionExistsError = exports.DesignDocumentNotFoundError = exports.ViewNotFoundError = exports.LinkExistsError = exports.LinkNotFoundError = exports.DataverseExistsError = exports.DatasetExistsError = exports.DataverseNotFoundError = exports.DatasetNotFoundError = exports.JobQueueFullError = exports.CompilationFailureError = exports.PreparedStatementFailureError = void 0;
|
|
3
|
+
exports.PathExistsError = exports.DeltaInvalidError = exports.NumberTooBigError = exports.DocumentNotJsonError = exports.ValueInvalidError = exports.ValueTooDeepError = exports.PathTooDeepError = exports.PathTooBigError = exports.PathInvalidError = exports.PathMismatchError = exports.PathNotFoundError = exports.MutationLostError = exports.DurableWriteReCommitInProgressError = exports.DurableWriteInProgressError = exports.DurabilityAmbiguousError = exports.DurabilityImpossibleError = exports.DurabilityLevelNotAvailableError = exports.ValueNotJsonError = exports.DocumentExistsError = exports.ValueTooLargeError = exports.DocumentLockedError = exports.DocumentUnretrievableError = exports.DocumentNotFoundError = exports.IndexExistsError = exports.QuotaLimitedError = exports.RateLimitedError = exports.IndexNotFoundError = exports.ScopeNotFoundError = exports.FeatureNotAvailableError = exports.UnambiguousTimeoutError = exports.AmbiguousTimeoutError = exports.UnsupportedOperationError = exports.DecodingFailureError = exports.EncodingFailureError = exports.CollectionNotFoundError = exports.BucketNotFoundError = exports.CasMismatchError = exports.ParsingFailureError = exports.TemporaryFailureError = exports.AuthenticationFailureError = exports.InternalServerFailureError = exports.ServiceNotAvailableError = exports.InvalidArgumentError = exports.RequestCanceledError = exports.TimeoutError = exports.InvalidDurabilityLevel = exports.NeedOpenBucketError = exports.ClusterClosedError = exports.ConnectionClosedError = exports.CouchbaseError = void 0;
|
|
4
|
+
exports.EventingFunctionDeployedError = exports.EventingFunctionNotBootstrappedError = exports.EventingFunctionIdenticalKeyspaceError = exports.EventingFunctionCompilationFailureError = exports.EventingFunctionNotDeployedError = exports.EventingFunctionNotFoundError = exports.BucketNotFlushableError = exports.UserExistsError = exports.BucketExistsError = exports.GroupNotFoundError = exports.UserNotFoundError = exports.ScopeExistsError = exports.CollectionExistsError = exports.DesignDocumentNotFoundError = exports.ViewNotFoundError = exports.LinkExistsError = exports.LinkNotFoundError = exports.DataverseExistsError = exports.DatasetExistsError = exports.DataverseNotFoundError = exports.DatasetNotFoundError = exports.JobQueueFullError = exports.CompilationFailureError = exports.PreparedStatementFailureError = exports.IndexFailureError = exports.PlanningFailureError = void 0;
|
|
5
5
|
require("./errorcontexts");
|
|
6
6
|
/**
|
|
7
7
|
* A generic base error that all errors inherit. Exposes the cause and
|
|
@@ -288,6 +288,30 @@ class IndexNotFoundError extends CouchbaseError {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
exports.IndexNotFoundError = IndexNotFoundError;
|
|
291
|
+
/**
|
|
292
|
+
* Indicates that a rate limit was exceeded while attempting to
|
|
293
|
+
* execute the operation.
|
|
294
|
+
*
|
|
295
|
+
* @category Error Handling
|
|
296
|
+
*/
|
|
297
|
+
class RateLimitedError extends CouchbaseError {
|
|
298
|
+
constructor(cause, context) {
|
|
299
|
+
super('operation was rate limited', cause, context);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
exports.RateLimitedError = RateLimitedError;
|
|
303
|
+
/**
|
|
304
|
+
* Indicates that a quota limit was exceeded while attempting to
|
|
305
|
+
* execute the operation.
|
|
306
|
+
*
|
|
307
|
+
* @category Error Handling
|
|
308
|
+
*/
|
|
309
|
+
class QuotaLimitedError extends CouchbaseError {
|
|
310
|
+
constructor(cause, context) {
|
|
311
|
+
super('operation was quota limited', cause, context);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
exports.QuotaLimitedError = QuotaLimitedError;
|
|
291
315
|
/**
|
|
292
316
|
* Indicates that the referenced index already existed, but was expected
|
|
293
317
|
* to not yet exist for the operation.
|
|
@@ -652,7 +652,7 @@ class EventingFunctionManager {
|
|
|
652
652
|
*/
|
|
653
653
|
async upsertFunction(functionDefinition, options, callback) {
|
|
654
654
|
if (options instanceof Function) {
|
|
655
|
-
callback = arguments[
|
|
655
|
+
callback = arguments[1];
|
|
656
656
|
options = undefined;
|
|
657
657
|
}
|
|
658
658
|
if (!options) {
|
|
@@ -697,7 +697,7 @@ class EventingFunctionManager {
|
|
|
697
697
|
*/
|
|
698
698
|
async dropFunction(name, options, callback) {
|
|
699
699
|
if (options instanceof Function) {
|
|
700
|
-
callback = arguments[
|
|
700
|
+
callback = arguments[1];
|
|
701
701
|
options = undefined;
|
|
702
702
|
}
|
|
703
703
|
if (!options) {
|
|
@@ -810,7 +810,7 @@ class EventingFunctionManager {
|
|
|
810
810
|
*/
|
|
811
811
|
async deployFunction(name, options, callback) {
|
|
812
812
|
if (options instanceof Function) {
|
|
813
|
-
callback = arguments[
|
|
813
|
+
callback = arguments[1];
|
|
814
814
|
options = undefined;
|
|
815
815
|
}
|
|
816
816
|
if (!options) {
|
|
@@ -849,7 +849,7 @@ class EventingFunctionManager {
|
|
|
849
849
|
*/
|
|
850
850
|
async undeployFunction(name, options, callback) {
|
|
851
851
|
if (options instanceof Function) {
|
|
852
|
-
callback = arguments[
|
|
852
|
+
callback = arguments[1];
|
|
853
853
|
options = undefined;
|
|
854
854
|
}
|
|
855
855
|
if (!options) {
|
|
@@ -888,7 +888,7 @@ class EventingFunctionManager {
|
|
|
888
888
|
*/
|
|
889
889
|
async pauseFunction(name, options, callback) {
|
|
890
890
|
if (options instanceof Function) {
|
|
891
|
-
callback = arguments[
|
|
891
|
+
callback = arguments[1];
|
|
892
892
|
options = undefined;
|
|
893
893
|
}
|
|
894
894
|
if (!options) {
|
|
@@ -927,7 +927,7 @@ class EventingFunctionManager {
|
|
|
927
927
|
*/
|
|
928
928
|
async resumeFunction(name, options, callback) {
|
|
929
929
|
if (options instanceof Function) {
|
|
930
|
-
callback = arguments[
|
|
930
|
+
callback = arguments[1];
|
|
931
931
|
options = undefined;
|
|
932
932
|
}
|
|
933
933
|
if (!options) {
|
|
@@ -101,7 +101,7 @@ class QueryIndexManager {
|
|
|
101
101
|
*/
|
|
102
102
|
async createIndex(bucketName, indexName, fields, options, callback) {
|
|
103
103
|
if (options instanceof Function) {
|
|
104
|
-
callback = arguments[
|
|
104
|
+
callback = arguments[3];
|
|
105
105
|
options = undefined;
|
|
106
106
|
}
|
|
107
107
|
if (!options) {
|
|
@@ -126,7 +126,7 @@ class QueryIndexManager {
|
|
|
126
126
|
*/
|
|
127
127
|
async createPrimaryIndex(bucketName, options, callback) {
|
|
128
128
|
if (options instanceof Function) {
|
|
129
|
-
callback = arguments[
|
|
129
|
+
callback = arguments[1];
|
|
130
130
|
options = undefined;
|
|
131
131
|
}
|
|
132
132
|
if (!options) {
|
|
@@ -198,7 +198,7 @@ class QueryIndexManager {
|
|
|
198
198
|
*/
|
|
199
199
|
async dropPrimaryIndex(bucketName, options, callback) {
|
|
200
200
|
if (options instanceof Function) {
|
|
201
|
-
callback = arguments[
|
|
201
|
+
callback = arguments[1];
|
|
202
202
|
options = undefined;
|
|
203
203
|
}
|
|
204
204
|
if (!options) {
|
package/dist/searchexecutor.js
CHANGED
|
@@ -50,6 +50,9 @@ class SearchExecutor {
|
|
|
50
50
|
if (options.disableScoring) {
|
|
51
51
|
queryObj.score = 'none';
|
|
52
52
|
}
|
|
53
|
+
if (options.includeLocations !== undefined) {
|
|
54
|
+
queryObj.includeLocations = options.includeLocations;
|
|
55
|
+
}
|
|
53
56
|
if (options.consistency) {
|
|
54
57
|
queryObjCtl.consistency = {
|
|
55
58
|
level: options.consistency,
|
package/dist/searchquery.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies how the individual match terms should be logically concatenated.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is subject to change without notice.
|
|
5
|
+
* @category Full Text Search
|
|
6
|
+
*/
|
|
7
|
+
export declare enum MatchOperator {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies that individual match terms are concatenated with a logical OR - this is the default if not provided.
|
|
10
|
+
*/
|
|
11
|
+
Or = "or",
|
|
12
|
+
/**
|
|
13
|
+
* Specifies that individual match terms are concatenated with a logical AND.
|
|
14
|
+
*/
|
|
15
|
+
And = "and"
|
|
16
|
+
}
|
|
1
17
|
/**
|
|
2
18
|
* GeoPoint represents a specific coordinate on earth. We support
|
|
3
19
|
* a number of different variants of geopoints being specified.
|
|
@@ -86,6 +102,7 @@ export declare class MatchSearchQuery extends SearchQuery {
|
|
|
86
102
|
* @internal
|
|
87
103
|
*/
|
|
88
104
|
constructor(match: string);
|
|
105
|
+
operator(op: MatchOperator): MatchSearchQuery;
|
|
89
106
|
field(field: string): MatchSearchQuery;
|
|
90
107
|
analyzer(analyzer: string): MatchSearchQuery;
|
|
91
108
|
prefixLength(prefixLength: number): MatchSearchQuery;
|
package/dist/searchquery.js
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint jsdoc/require-jsdoc: off */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.GeoPolygonSearchQuery = exports.GeoBoundingBoxSearchQuery = exports.GeoDistanceSearchQuery = exports.MatchNoneSearchQuery = exports.MatchAllSearchQuery = exports.PrefixSearchQuery = exports.PhraseSearchQuery = exports.TermSearchQuery = exports.BooleanFieldSearchQuery = exports.DocIdSearchQuery = exports.WildcardSearchQuery = exports.BooleanSearchQuery = exports.DisjunctionSearchQuery = exports.ConjunctionSearchQuery = exports.DateRangeSearchQuery = exports.NumericRangeSearchQuery = exports.QueryStringSearchQuery = exports.RegexpSearchQuery = exports.MatchPhraseSearchQuery = exports.MatchSearchQuery = exports.SearchQuery = void 0;
|
|
4
|
+
exports.GeoPolygonSearchQuery = exports.GeoBoundingBoxSearchQuery = exports.GeoDistanceSearchQuery = exports.MatchNoneSearchQuery = exports.MatchAllSearchQuery = exports.PrefixSearchQuery = exports.PhraseSearchQuery = exports.TermSearchQuery = exports.BooleanFieldSearchQuery = exports.DocIdSearchQuery = exports.WildcardSearchQuery = exports.BooleanSearchQuery = exports.DisjunctionSearchQuery = exports.ConjunctionSearchQuery = exports.DateRangeSearchQuery = exports.NumericRangeSearchQuery = exports.QueryStringSearchQuery = exports.RegexpSearchQuery = exports.MatchPhraseSearchQuery = exports.MatchSearchQuery = exports.SearchQuery = exports.MatchOperator = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Specifies how the individual match terms should be logically concatenated.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is subject to change without notice.
|
|
9
|
+
* @category Full Text Search
|
|
10
|
+
*/
|
|
11
|
+
var MatchOperator;
|
|
12
|
+
(function (MatchOperator) {
|
|
13
|
+
/**
|
|
14
|
+
* Specifies that individual match terms are concatenated with a logical OR - this is the default if not provided.
|
|
15
|
+
*/
|
|
16
|
+
MatchOperator["Or"] = "or";
|
|
17
|
+
/**
|
|
18
|
+
* Specifies that individual match terms are concatenated with a logical AND.
|
|
19
|
+
*/
|
|
20
|
+
MatchOperator["And"] = "and";
|
|
21
|
+
})(MatchOperator = exports.MatchOperator || (exports.MatchOperator = {}));
|
|
5
22
|
function _parseGeoPoint(v) {
|
|
6
23
|
if (Array.isArray(v)) {
|
|
7
24
|
return v;
|
|
@@ -145,6 +162,10 @@ class MatchSearchQuery extends SearchQuery {
|
|
|
145
162
|
match: match,
|
|
146
163
|
});
|
|
147
164
|
}
|
|
165
|
+
operator(op) {
|
|
166
|
+
this._data.operator = op;
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
148
169
|
field(field) {
|
|
149
170
|
this._data.field = field;
|
|
150
171
|
return this;
|
package/dist/searchtypes.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare class SearchResult {
|
|
|
44
44
|
*
|
|
45
45
|
* @category Full Text Search
|
|
46
46
|
*/
|
|
47
|
-
declare enum HighlightStyle {
|
|
47
|
+
export declare enum HighlightStyle {
|
|
48
48
|
/**
|
|
49
49
|
* Indicates that matches should be highlighted using HTML tags in the result text.
|
|
50
50
|
*/
|
|
@@ -123,6 +123,12 @@ export interface SearchQueryOptions {
|
|
|
123
123
|
* impossible to sort based on how well a particular result scored.
|
|
124
124
|
*/
|
|
125
125
|
disableScoring?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* If set to true, will include the locations in the search result.
|
|
128
|
+
*
|
|
129
|
+
* @experimental This API is subject to change without notice.
|
|
130
|
+
*/
|
|
131
|
+
includeLocations?: boolean;
|
|
126
132
|
/**
|
|
127
133
|
* Specifies the consistency requirements when executing the query.
|
|
128
134
|
*
|
|
@@ -151,4 +157,3 @@ export interface SearchQueryOptions {
|
|
|
151
157
|
*/
|
|
152
158
|
timeout?: number;
|
|
153
159
|
}
|
|
154
|
-
export {};
|
package/dist/searchtypes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchScanConsistency = exports.SearchResult = exports.SearchRow = exports.SearchMetaData = void 0;
|
|
3
|
+
exports.SearchScanConsistency = exports.HighlightStyle = exports.SearchResult = exports.SearchRow = exports.SearchMetaData = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* SearchMetaData represents the meta-data available from a search query.
|
|
6
6
|
* This class is currently incomplete and must be casted to `any` in
|
|
@@ -51,7 +51,7 @@ var HighlightStyle;
|
|
|
51
51
|
* Indicates that matches should be highlighted using ASCII coding in the result test.
|
|
52
52
|
*/
|
|
53
53
|
HighlightStyle["ANSI"] = "ansi";
|
|
54
|
-
})(HighlightStyle || (HighlightStyle = {}));
|
|
54
|
+
})(HighlightStyle = exports.HighlightStyle || (exports.HighlightStyle = {}));
|
|
55
55
|
/**
|
|
56
56
|
* Represents the various scan consistency options that are available when
|
|
57
57
|
* querying against the query service.
|
package/dist/usermanager.js
CHANGED
package/dist/viewindexmanager.js
CHANGED