couchbase 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=10.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","debug":"^4.3.2","nan":"^2.15.0","parse-duration":"^1.0.0","prebuild-install":"^6.1.4"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^2.0.4","@tsconfig/node10":"^1.0.8","@types/bindings":"^1.5.1","@types/debug":"^4.1.7","@types/node":"^16.7.2","@typescript-eslint/eslint-plugin":"^4.29.3","@typescript-eslint/parser":"^4.29.3","chai":"^4.3.4","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jsdoc":"^36.0.8","eslint-plugin-mocha":"^9.0.0","eslint-plugin-node":"^11.1.0","expose-gc":"^1.0.0","mocha":"^8.4.0","npm-check-updates":"^11.8.3","nyc":"^15.1.0","prebuild":"^10.0.1","prettier":"^2.3.2","semver":"^7.3.5","ts-mocha":"^8.0.0","ts-node":"^10.2.1","typedoc":"^0.21.6","typescript":"^4.3.5","uuid":"^8.3.2"},"repository":{"type":"git","url":"http://github.com/couchbase/couchnode.git"},"version":"3.2.
|
1
|
+
{"bugs":{"url":"http://www.couchbase.com/issues/browse/JSCBC"},"description":"The official Couchbase Node.js Client Library.","engines":{"node":">=10.0.0"},"homepage":"http://www.couchbase.com/communities/nodejs","keywords":["couchbase","libcouchbase","memcached","nosql","json","document"],"main":"dist/couchbase.js","types":"dist/couchbase.d.ts","license":"Apache-2.0","name":"couchbase","dependencies":{"bindings":"^1.5.0","debug":"^4.3.2","nan":"^2.15.0","parse-duration":"^1.0.0","prebuild-install":"^6.1.4"},"devDependencies":{"@trivago/prettier-plugin-sort-imports":"^2.0.4","@tsconfig/node10":"^1.0.8","@types/bindings":"^1.5.1","@types/debug":"^4.1.7","@types/node":"^16.7.2","@typescript-eslint/eslint-plugin":"^4.29.3","@typescript-eslint/parser":"^4.29.3","chai":"^4.3.4","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jsdoc":"^36.0.8","eslint-plugin-mocha":"^9.0.0","eslint-plugin-node":"^11.1.0","expose-gc":"^1.0.0","mocha":"^8.4.0","npm-check-updates":"^11.8.3","nyc":"^15.1.0","prebuild":"^10.0.1","prettier":"^2.3.2","segfault-handler":"^1.3.0","semver":"^7.3.5","ts-mocha":"^8.0.0","ts-node":"^10.2.1","typedoc":"^0.21.6","typescript":"^4.3.5","uuid":"^8.3.2"},"repository":{"type":"git","url":"http://github.com/couchbase/couchnode.git"},"version":"3.2.4","config":{"native":false},"scripts":{"install":"prebuild-install || node-gyp rebuild","build":"node-gyp build && tsc","rebuild":"node-gyp rebuild && tsc","prebuild":"prebuild --verbose --strip","prepare":"tsc","build-docs":"typedoc","test":"ts-mocha test/*.test.*","test-fast":"ts-mocha test/*.test.* -ig '(slow)'","cover":"nyc ts-mocha test/*.test.*","cover-fast":"nyc ts-mocha test/*.test.* -ig '(slow)'","lint":"eslint ./lib/ ./test/","check-deps":"ncu"}}
|
package/src/connection.cpp
CHANGED
package/src/constants.cpp
CHANGED
@@ -67,6 +67,8 @@ NAN_MODULE_INIT(Init)
|
|
67
67
|
X(LCB_ERR_SCOPE_NOT_FOUND)
|
68
68
|
X(LCB_ERR_INDEX_NOT_FOUND)
|
69
69
|
X(LCB_ERR_INDEX_EXISTS)
|
70
|
+
X(LCB_ERR_RATE_LIMITED)
|
71
|
+
X(LCB_ERR_QUOTA_LIMITED)
|
70
72
|
X(LCB_ERR_DOCUMENT_NOT_FOUND)
|
71
73
|
X(LCB_ERR_DOCUMENT_UNRETRIEVABLE)
|
72
74
|
X(LCB_ERR_DOCUMENT_LOCKED)
|
package/src/instance.cpp
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#include "instance.h"
|
2
|
+
#include "connection.h"
|
2
3
|
|
3
4
|
#include "error.h"
|
4
5
|
#include "logger.h"
|
@@ -8,7 +9,8 @@ namespace couchnode
|
|
8
9
|
|
9
10
|
Instance::Instance(lcb_INSTANCE *instance, Logger *logger,
|
10
11
|
RequestTracer *tracer, Meter *meter)
|
11
|
-
:
|
12
|
+
: _connection(nullptr)
|
13
|
+
, _instance(instance)
|
12
14
|
, _logger(logger)
|
13
15
|
, _tracer(tracer)
|
14
16
|
, _meter(meter)
|
@@ -73,6 +75,11 @@ Instance::Instance(lcb_INSTANCE *instance, Logger *logger,
|
|
73
75
|
|
74
76
|
Instance::~Instance()
|
75
77
|
{
|
78
|
+
if (_connection) {
|
79
|
+
_connection->_instance = nullptr;
|
80
|
+
_connection = nullptr;
|
81
|
+
}
|
82
|
+
|
76
83
|
if (_parent) {
|
77
84
|
_parent->remove_instance(this);
|
78
85
|
_parent = nullptr;
|