couchbase 3.2.0 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -18
- package/binding.gyp +88 -85
- 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 +99 -14
- 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 -7
- package/deps/lcb/doc/Doxyfile +1 -1
- package/deps/lcb/example/CMakeLists.txt +4 -4
- package/deps/lcb/example/libuvdirect/main.c +39 -12
- package/deps/lcb/example/minimal/durability.cc +149 -0
- package/deps/lcb/example/minimal/query.c +11 -9
- package/deps/lcb/gyp_config/common/libcouchbase/configuration.h +3 -3
- package/deps/lcb/gyp_config/linux/arm64/config.h +243 -0
- package/deps/lcb/include/libcouchbase/couchbase.h +80 -5
- 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 +13 -5
- package/deps/lcb/src/analytics/analytics_handle.hh +29 -0
- package/deps/lcb/src/bootstrap.cc +6 -3
- package/deps/lcb/src/capi/cmd_analytics.cc +12 -1
- package/deps/lcb/src/capi/cmd_analytics.hh +30 -0
- package/deps/lcb/src/capi/cmd_counter.hh +23 -0
- package/deps/lcb/src/capi/cmd_exists.hh +24 -1
- package/deps/lcb/src/capi/cmd_get.hh +22 -0
- package/deps/lcb/src/capi/cmd_get_replica.hh +23 -0
- package/deps/lcb/src/capi/cmd_http.hh +7 -0
- package/deps/lcb/src/capi/cmd_query.cc +11 -1
- package/deps/lcb/src/capi/cmd_query.hh +31 -0
- package/deps/lcb/src/capi/cmd_remove.hh +23 -0
- package/deps/lcb/src/capi/cmd_search.cc +6 -0
- package/deps/lcb/src/capi/cmd_search.hh +23 -0
- package/deps/lcb/src/capi/cmd_store.hh +33 -21
- package/deps/lcb/src/capi/cmd_subdoc.hh +35 -0
- package/deps/lcb/src/capi/cmd_touch.hh +23 -0
- package/deps/lcb/src/capi/cmd_unlock.hh +23 -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 +45 -11
- package/deps/lcb/src/crypto.cc +2 -2
- 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/hostlist.h +2 -2
- package/deps/lcb/src/http/http-priv.h +2 -2
- package/deps/lcb/src/http/http.cc +5 -2
- package/deps/lcb/src/instance.cc +20 -11
- package/deps/lcb/src/internal.h +9 -0
- package/deps/lcb/src/lcbio/connect.cc +14 -2
- package/deps/lcb/src/lcbio/connect.h +2 -2
- package/deps/lcb/src/lcbio/ctx.cc +4 -2
- package/deps/lcb/src/lcbio/ioutils.cc +9 -10
- package/deps/lcb/src/lcbio/manager.cc +1 -1
- package/deps/lcb/src/mcserver/mcserver.cc +9 -6
- 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 +41 -19
- package/deps/lcb/src/n1ql/query_handle.hh +28 -1
- package/deps/lcb/src/operations/counter.cc +18 -5
- package/deps/lcb/src/operations/exists.cc +25 -4
- package/deps/lcb/src/operations/get.cc +39 -19
- package/deps/lcb/src/operations/get_replica.cc +28 -8
- package/deps/lcb/src/operations/observe.cc +1 -1
- package/deps/lcb/src/operations/ping.cc +8 -8
- package/deps/lcb/src/operations/pktfwd.cc +2 -1
- package/deps/lcb/src/operations/remove.cc +39 -22
- package/deps/lcb/src/operations/store.cc +18 -5
- package/deps/lcb/src/operations/subdoc.cc +18 -6
- package/deps/lcb/src/operations/touch.cc +34 -16
- package/deps/lcb/src/operations/unlock.cc +24 -5
- package/deps/lcb/src/packetutils.h +3 -2
- package/deps/lcb/src/retryq.cc +24 -5
- package/deps/lcb/src/search/search.cc +1 -0
- package/deps/lcb/src/search/search_handle.cc +30 -8
- package/deps/lcb/src/search/search_handle.hh +29 -0
- package/deps/lcb/src/settings.cc +1 -1
- package/deps/lcb/src/ssl/ssl_common.c +6 -7
- package/deps/lcb/src/tracing/span.cc +47 -14
- package/deps/lcb/src/tracing/tracer.cc +11 -2
- package/deps/lcb/src/tracing/tracing-internal.h +105 -93
- package/deps/lcb/src/utilities.cc +43 -0
- package/deps/lcb/src/utilities.h +53 -0
- package/deps/lcb/src/vbucket/vbucket.c +34 -33
- 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/basic/t_n1qlstrings.cc +73 -0
- package/deps/lcb/tests/iotests/mock-environment.cc +30 -1
- package/deps/lcb/tests/iotests/mock-environment.h +49 -0
- package/deps/lcb/tests/iotests/mock-unit-test.cc +104 -6
- package/deps/lcb/tests/iotests/mock-unit-test.h +34 -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 +109 -7
- package/deps/lcb/tests/iotests/t_http.cc +9 -4
- package/deps/lcb/tests/iotests/t_lock.cc +18 -0
- package/deps/lcb/tests/iotests/t_mutate.cc +157 -63
- package/deps/lcb/tests/iotests/t_n1ql.cc +330 -33
- 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 +116 -0
- package/deps/lcb/tests/mocksupport/procutil.c +32 -28
- package/deps/lcb/tests/mocksupport/server.c +0 -1
- package/deps/lcb/tests/mocksupport/timeout.c +2 -2
- package/deps/lcb/tools/cbc.cc +7 -0
- package/dist/analyticsindexmanager.js +512 -524
- package/dist/binding.d.ts +3 -0
- package/dist/bindingutilities.js +4 -0
- package/dist/bucket.js +1 -1
- package/dist/bucketmanager.d.ts +31 -1
- package/dist/bucketmanager.js +194 -186
- package/dist/cluster.d.ts +7 -0
- package/dist/cluster.js +48 -38
- package/dist/collection.js +11 -17
- package/dist/collectionmanager.js +181 -197
- package/dist/connection.d.ts +3 -1
- package/dist/connection.js +27 -16
- package/dist/couchbase.d.ts +1 -0
- package/dist/couchbase.js +3 -13
- package/dist/datastructures.js +239 -310
- package/dist/diagnosticsexecutor.js +70 -85
- package/dist/errors.d.ts +70 -0
- package/dist/errors.js +96 -2
- package/dist/eventingfunctionmanager.d.ts +804 -0
- package/dist/eventingfunctionmanager.js +993 -0
- package/dist/httpexecutor.d.ts +2 -1
- package/dist/httpexecutor.js +30 -37
- package/dist/queryindexmanager.js +240 -266
- package/dist/scope.js +10 -4
- package/dist/sdspecs.d.ts +1 -1
- package/dist/searchexecutor.js +3 -0
- package/dist/searchindexmanager.js +240 -271
- 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 +251 -264
- package/dist/utilities.d.ts +2 -0
- package/dist/utilities.js +7 -2
- package/dist/viewexecutor.js +1 -1
- package/dist/viewindexmanager.js +131 -150
- package/package.json +1 -1
- package/src/addondata.cpp +58 -0
- package/src/addondata.h +40 -0
- package/src/binding.cpp +3 -1
- package/src/cas.h +2 -2
- package/src/connection.cpp +25 -178
- package/src/connection.h +8 -65
- package/src/connection_ops.cpp +57 -34
- package/src/constants.cpp +3 -0
- package/src/instance.cpp +235 -0
- package/src/instance.h +102 -0
- package/src/{connection_callbacks.cpp → instance_callbacks.cpp} +34 -34
- package/src/logger.cpp +11 -1
- package/src/logger.h +3 -0
- package/src/metrics.cpp +10 -0
- package/src/metrics.h +3 -0
- package/src/mutationtoken.h +2 -2
- package/src/opbuilder.h +13 -15
- package/src/respreader.cpp +1 -0
- package/src/respreader.h +6 -4
- package/src/tracespan.h +11 -11
- package/src/tracing.cpp +11 -0
- package/src/tracing.h +3 -0
- package/src/valueparser.h +5 -0
- package/deps/lcb/example/observe/durability.c +0 -110
@@ -1,13 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
4
|
};
|
@@ -26,51 +17,47 @@ class DiagnoticsExecutor {
|
|
26
17
|
constructor(conns) {
|
27
18
|
this._conns = conns;
|
28
19
|
}
|
29
|
-
singleDiagnostics(conn) {
|
30
|
-
return
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
resolve(parsedReport);
|
38
|
-
});
|
20
|
+
async singleDiagnostics(conn) {
|
21
|
+
return new Promise((resolve, reject) => {
|
22
|
+
conn.diag(undefined, (err, data) => {
|
23
|
+
if (err) {
|
24
|
+
return reject(err);
|
25
|
+
}
|
26
|
+
const parsedReport = JSON.parse(data);
|
27
|
+
resolve(parsedReport);
|
39
28
|
});
|
40
29
|
});
|
41
30
|
}
|
42
|
-
diagnostics(options) {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
status: svcDiagRes.status,
|
68
|
-
});
|
31
|
+
async diagnostics(options) {
|
32
|
+
if (this._conns.length === 0) {
|
33
|
+
throw new Error('found no connections to test');
|
34
|
+
}
|
35
|
+
const diagReses = await Promise.all(this._conns.map((conn) => this.singleDiagnostics(conn)));
|
36
|
+
const baseConfig = diagReses[0];
|
37
|
+
const report = {
|
38
|
+
id: baseConfig.id,
|
39
|
+
version: baseConfig.version,
|
40
|
+
sdk: baseConfig.sdk,
|
41
|
+
services: [],
|
42
|
+
};
|
43
|
+
if (options.reportId) {
|
44
|
+
report.id = options.reportId;
|
45
|
+
}
|
46
|
+
diagReses.forEach((diagRes) => {
|
47
|
+
if (diagRes.config) {
|
48
|
+
diagRes.config.forEach((svcDiagRes) => {
|
49
|
+
report.services.push({
|
50
|
+
id: svcDiagRes.id,
|
51
|
+
type: svcDiagRes.type,
|
52
|
+
local: svcDiagRes.local,
|
53
|
+
remote: svcDiagRes.remote,
|
54
|
+
lastActivity: svcDiagRes.last_activity_us,
|
55
|
+
status: svcDiagRes.status,
|
69
56
|
});
|
70
|
-
}
|
71
|
-
}
|
72
|
-
return report;
|
57
|
+
});
|
58
|
+
}
|
73
59
|
});
|
60
|
+
return report;
|
74
61
|
}
|
75
62
|
}
|
76
63
|
exports.DiagnoticsExecutor = DiagnoticsExecutor;
|
@@ -84,42 +71,40 @@ class PingExecutor {
|
|
84
71
|
constructor(conn) {
|
85
72
|
this._conn = conn;
|
86
73
|
}
|
87
|
-
ping(options) {
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
resolve(parsedReport);
|
122
|
-
});
|
74
|
+
async ping(options) {
|
75
|
+
let serviceFlags = 0;
|
76
|
+
if (Array.isArray(options.serviceTypes)) {
|
77
|
+
options.serviceTypes.forEach((serviceType) => {
|
78
|
+
if (serviceType === generaltypes_1.ServiceType.KeyValue) {
|
79
|
+
serviceFlags |= binding_1.default.LCBX_SERVICETYPE_KEYVALUE;
|
80
|
+
}
|
81
|
+
else if (serviceType === generaltypes_1.ServiceType.Views) {
|
82
|
+
serviceFlags |= binding_1.default.LCBX_SERVICETYPE_VIEWS;
|
83
|
+
}
|
84
|
+
else if (serviceType === generaltypes_1.ServiceType.Query) {
|
85
|
+
serviceFlags |= binding_1.default.LCBX_SERVICETYPE_QUERY;
|
86
|
+
}
|
87
|
+
else if (serviceType === generaltypes_1.ServiceType.Search) {
|
88
|
+
serviceFlags |= binding_1.default.LCBX_SERVICETYPE_SEARCH;
|
89
|
+
}
|
90
|
+
else if (serviceType === generaltypes_1.ServiceType.Analytics) {
|
91
|
+
serviceFlags |= binding_1.default.LCBX_SERVICETYPE_ANALYTICS;
|
92
|
+
}
|
93
|
+
else {
|
94
|
+
throw new Error('invalid service type');
|
95
|
+
}
|
96
|
+
});
|
97
|
+
}
|
98
|
+
const reportId = options.reportId;
|
99
|
+
const parentSpan = options.parentSpan;
|
100
|
+
const timeout = options.timeout;
|
101
|
+
return new Promise((resolve, reject) => {
|
102
|
+
this._conn.ping(reportId, serviceFlags, parentSpan, timeout, (err, data) => {
|
103
|
+
if (err) {
|
104
|
+
return reject(err);
|
105
|
+
}
|
106
|
+
const parsedReport = JSON.parse(data);
|
107
|
+
resolve(parsedReport);
|
123
108
|
});
|
124
109
|
});
|
125
110
|
}
|
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.
|
@@ -591,3 +609,55 @@ export declare class UserExistsError extends CouchbaseError {
|
|
591
609
|
export declare class BucketNotFlushableError extends CouchbaseError {
|
592
610
|
constructor(cause?: Error, context?: ErrorContext);
|
593
611
|
}
|
612
|
+
/**
|
613
|
+
* Indicates that the referenced eventing function does not exist.
|
614
|
+
*
|
615
|
+
* @category Error Handling
|
616
|
+
*/
|
617
|
+
export declare class EventingFunctionNotFoundError extends CouchbaseError {
|
618
|
+
constructor(cause?: Error, context?: ErrorContext);
|
619
|
+
}
|
620
|
+
/**
|
621
|
+
* Indicates that the referenced eventing function was not deployed but was
|
622
|
+
* expected to have been.
|
623
|
+
*
|
624
|
+
* @category Error Handling
|
625
|
+
*/
|
626
|
+
export declare class EventingFunctionNotDeployedError extends CouchbaseError {
|
627
|
+
constructor(cause?: Error, context?: ErrorContext);
|
628
|
+
}
|
629
|
+
/**
|
630
|
+
* Indicates that the eventing function was not able to be compiled.
|
631
|
+
*
|
632
|
+
* @category Error Handling
|
633
|
+
*/
|
634
|
+
export declare class EventingFunctionCompilationFailureError extends CouchbaseError {
|
635
|
+
constructor(cause?: Error, context?: ErrorContext);
|
636
|
+
}
|
637
|
+
/**
|
638
|
+
* Indicates that the source and metadata keyspaces both referenced the same
|
639
|
+
* place for an eventing function.
|
640
|
+
*
|
641
|
+
* @category Error Handling
|
642
|
+
*/
|
643
|
+
export declare class EventingFunctionIdenticalKeyspaceError extends CouchbaseError {
|
644
|
+
constructor(cause?: Error, context?: ErrorContext);
|
645
|
+
}
|
646
|
+
/**
|
647
|
+
* Indicates that an eventing function was deployed but has not yet fully
|
648
|
+
* completed the bootstrapping process.
|
649
|
+
*
|
650
|
+
* @category Error Handling
|
651
|
+
*/
|
652
|
+
export declare class EventingFunctionNotBootstrappedError extends CouchbaseError {
|
653
|
+
constructor(cause?: Error, context?: ErrorContext);
|
654
|
+
}
|
655
|
+
/**
|
656
|
+
* Indicates that an eventing function is deployed but the operation expected
|
657
|
+
* that it was not.
|
658
|
+
*
|
659
|
+
* @category Error Handling
|
660
|
+
*/
|
661
|
+
export declare class EventingFunctionDeployedError extends CouchbaseError {
|
662
|
+
constructor(cause?: Error, context?: ErrorContext);
|
663
|
+
}
|
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.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.
|
@@ -794,3 +818,73 @@ class BucketNotFlushableError extends CouchbaseError {
|
|
794
818
|
}
|
795
819
|
}
|
796
820
|
exports.BucketNotFlushableError = BucketNotFlushableError;
|
821
|
+
/**
|
822
|
+
* Indicates that the referenced eventing function does not exist.
|
823
|
+
*
|
824
|
+
* @category Error Handling
|
825
|
+
*/
|
826
|
+
class EventingFunctionNotFoundError extends CouchbaseError {
|
827
|
+
constructor(cause, context) {
|
828
|
+
super('eventing function not found', cause, context);
|
829
|
+
}
|
830
|
+
}
|
831
|
+
exports.EventingFunctionNotFoundError = EventingFunctionNotFoundError;
|
832
|
+
/**
|
833
|
+
* Indicates that the referenced eventing function was not deployed but was
|
834
|
+
* expected to have been.
|
835
|
+
*
|
836
|
+
* @category Error Handling
|
837
|
+
*/
|
838
|
+
class EventingFunctionNotDeployedError extends CouchbaseError {
|
839
|
+
constructor(cause, context) {
|
840
|
+
super('eventing function not deployed', cause, context);
|
841
|
+
}
|
842
|
+
}
|
843
|
+
exports.EventingFunctionNotDeployedError = EventingFunctionNotDeployedError;
|
844
|
+
/**
|
845
|
+
* Indicates that the eventing function was not able to be compiled.
|
846
|
+
*
|
847
|
+
* @category Error Handling
|
848
|
+
*/
|
849
|
+
class EventingFunctionCompilationFailureError extends CouchbaseError {
|
850
|
+
constructor(cause, context) {
|
851
|
+
super('eventing function compilation failed', cause, context);
|
852
|
+
}
|
853
|
+
}
|
854
|
+
exports.EventingFunctionCompilationFailureError = EventingFunctionCompilationFailureError;
|
855
|
+
/**
|
856
|
+
* Indicates that the source and metadata keyspaces both referenced the same
|
857
|
+
* place for an eventing function.
|
858
|
+
*
|
859
|
+
* @category Error Handling
|
860
|
+
*/
|
861
|
+
class EventingFunctionIdenticalKeyspaceError extends CouchbaseError {
|
862
|
+
constructor(cause, context) {
|
863
|
+
super('eventing function identical keyspace', cause, context);
|
864
|
+
}
|
865
|
+
}
|
866
|
+
exports.EventingFunctionIdenticalKeyspaceError = EventingFunctionIdenticalKeyspaceError;
|
867
|
+
/**
|
868
|
+
* Indicates that an eventing function was deployed but has not yet fully
|
869
|
+
* completed the bootstrapping process.
|
870
|
+
*
|
871
|
+
* @category Error Handling
|
872
|
+
*/
|
873
|
+
class EventingFunctionNotBootstrappedError extends CouchbaseError {
|
874
|
+
constructor(cause, context) {
|
875
|
+
super('eventing function not bootstrapped', cause, context);
|
876
|
+
}
|
877
|
+
}
|
878
|
+
exports.EventingFunctionNotBootstrappedError = EventingFunctionNotBootstrappedError;
|
879
|
+
/**
|
880
|
+
* Indicates that an eventing function is deployed but the operation expected
|
881
|
+
* that it was not.
|
882
|
+
*
|
883
|
+
* @category Error Handling
|
884
|
+
*/
|
885
|
+
class EventingFunctionDeployedError extends CouchbaseError {
|
886
|
+
constructor(cause, context) {
|
887
|
+
super('eventing function deployed', cause, context);
|
888
|
+
}
|
889
|
+
}
|
890
|
+
exports.EventingFunctionDeployedError = EventingFunctionDeployedError;
|