couchbase 4.4.2 → 4.4.4
Sign up to get free protection for your applications and to get access to all the features.
- package/BUILDING.md +182 -0
- package/CMakeLists.txt +13 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +4 -2
- package/deps/couchbase-cxx-cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/BUILDING.md +206 -0
- package/deps/couchbase-cxx-client/CMakeLists.txt +18 -13
- package/deps/couchbase-cxx-client/README.md +2 -2
- package/deps/couchbase-cxx-client/cmake/APKBUILD.in +54 -0
- package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +0 -5
- package/deps/couchbase-cxx-client/cmake/Packaging.cmake +177 -10
- package/deps/couchbase-cxx-client/cmake/RPath.cmake +10 -0
- package/deps/couchbase-cxx-client/cmake/Testing.cmake +1 -1
- package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +28 -2
- package/deps/couchbase-cxx-client/cmake/build_version.hxx.in +1 -0
- package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +45 -6
- package/deps/couchbase-cxx-client/cmake/couchbase_cxx_client.pc.in +2 -2
- package/deps/couchbase-cxx-client/cmake/debian/changelog.in +5 -0
- package/deps/couchbase-cxx-client/cmake/debian/compat +1 -0
- package/deps/couchbase-cxx-client/cmake/debian/control +40 -0
- package/deps/couchbase-cxx-client/cmake/debian/rules +41 -0
- package/deps/couchbase-cxx-client/cmake/debian/source/format +1 -0
- package/deps/couchbase-cxx-client/core/agent_group.cxx +8 -0
- package/deps/couchbase-cxx-client/core/agent_group.hxx +4 -0
- package/deps/couchbase-cxx-client/core/bucket.cxx +16 -20
- package/deps/couchbase-cxx-client/core/bucket.hxx +12 -12
- package/deps/couchbase-cxx-client/core/cluster.cxx +44 -52
- package/deps/couchbase-cxx-client/core/cluster_agent.cxx +8 -0
- package/deps/couchbase-cxx-client/core/cluster_agent.hxx +4 -0
- package/deps/couchbase-cxx-client/core/collections_component.cxx +2 -2
- package/deps/couchbase-cxx-client/core/columnar/agent.cxx +2 -2
- package/deps/couchbase-cxx-client/core/columnar/agent.hxx +1 -1
- package/deps/couchbase-cxx-client/core/columnar/management_component.cxx +3 -3
- package/deps/couchbase-cxx-client/core/columnar/query_component.cxx +103 -45
- package/deps/couchbase-cxx-client/core/columnar/query_component.hxx +1 -0
- package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +8 -0
- package/deps/couchbase-cxx-client/core/http_component.cxx +55 -24
- package/deps/couchbase-cxx-client/core/http_component.hxx +4 -0
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +15 -15
- package/deps/couchbase-cxx-client/core/impl/bootstrap_error.hxx +10 -2
- package/deps/couchbase-cxx-client/core/impl/bucket.cxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +6 -6
- package/deps/couchbase-cxx-client/core/impl/cluster.cxx +36 -40
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +29 -5
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +5 -5
- package/deps/couchbase-cxx-client/core/impl/error.cxx +24 -3
- package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +13 -5
- package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -3
- package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/query.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
- package/deps/couchbase-cxx-client/core/impl/scan_result.cxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/search.cxx +2 -0
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +12 -12
- package/deps/couchbase-cxx-client/core/io/http_command.hxx +31 -20
- package/deps/couchbase-cxx-client/core/io/http_session.cxx +5 -0
- package/deps/couchbase-cxx-client/core/io/http_session.hxx +17 -4
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +97 -49
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +15 -14
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +48 -33
- package/deps/couchbase-cxx-client/core/io/streams.cxx +256 -0
- package/deps/couchbase-cxx-client/core/io/streams.hxx +31 -155
- package/deps/couchbase-cxx-client/core/logger/configuration.hxx +5 -0
- package/deps/couchbase-cxx-client/core/logger/custom_rotating_file_sink.cxx +2 -3
- package/deps/couchbase-cxx-client/core/logger/logger.cxx +39 -7
- package/deps/couchbase-cxx-client/core/logger/logger.hxx +7 -0
- package/deps/couchbase-cxx-client/core/meta/features.hxx +11 -0
- package/deps/couchbase-cxx-client/core/meta/version.cxx +47 -6
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.cxx +188 -0
- package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.hxx +73 -0
- package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +23 -17
- package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_append.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_search.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +23 -15
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +4 -3
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_update.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +5 -2
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +4 -2
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_upsert.cxx +3 -3
- package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +3 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +3 -0
- package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +5 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +5 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +4 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +3 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +5 -2
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.cxx +3 -3
- package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +1 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +37 -17
- package/deps/couchbase-cxx-client/core/platform/base64.cc +1 -1
- package/deps/couchbase-cxx-client/core/platform/random.cc +2 -0
- package/deps/couchbase-cxx-client/core/platform/uuid.h +6 -6
- package/deps/couchbase-cxx-client/core/row_streamer.cxx +1 -1
- package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.cc +1 -1
- package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.h +4 -4
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +2 -0
- package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +8 -0
- package/deps/couchbase-cxx-client/core/tracing/constants.hxx +3 -0
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.cxx +87 -0
- package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.hxx +57 -0
- package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.hxx +9 -21
- package/deps/couchbase-cxx-client/core/transactions/attempt_context.hxx +6 -33
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +57 -56
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +17 -18
- package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +0 -20
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +2 -2
- package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +128 -52
- package/deps/couchbase-cxx-client/couchbase/analytics_options.hxx +4 -3
- package/deps/couchbase-cxx-client/couchbase/codec/tao_json_serializer.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/common_options.hxx +16 -1
- package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +16 -20
- package/deps/couchbase-cxx-client/couchbase/mutate_in_specs.hxx +2 -2
- package/deps/couchbase-cxx-client/couchbase/query_options.hxx +4 -3
- package/deps/couchbase-cxx-client/couchbase/search_options.hxx +1 -1
- package/dist/analyticsindexmanager.d.ts +98 -14
- package/dist/analyticsindexmanager.js +452 -411
- package/dist/binding.d.ts +53 -4
- package/dist/bindingutilities.d.ts +26 -1
- package/dist/bindingutilities.js +108 -1
- package/dist/couchbase.d.ts +3 -1
- package/dist/couchbase.js +2 -0
- package/dist/rangeScan.d.ts +1 -1
- package/dist/rangeScan.js +1 -1
- package/dist/transactions.d.ts +34 -3
- package/dist/transactions.js +25 -18
- package/dist/transcoders.d.ts +68 -0
- package/dist/transcoders.js +194 -1
- package/dist/usermanager.d.ts +14 -14
- package/dist/usermanager.js +178 -228
- package/dist/utilities.js +4 -6
- package/dist/utilities_internal.js +1 -2
- package/package.json +9 -8
- package/src/binding.cpp +13 -13
- package/src/connection.cpp +22 -0
- package/src/connection.hpp +12 -0
- package/src/connection_autogen.cpp +100 -0
- package/src/jstocbpp_autogen.hpp +315 -8
- package/src/jstocbpp_transactions.hpp +1 -2
- package/tools/gen-bindings-js.js +38 -3
- package/tools/gen-bindings-json.py +575 -328
package/src/binding.cpp
CHANGED
@@ -9,7 +9,6 @@
|
|
9
9
|
#include <core/logger/configuration.hxx>
|
10
10
|
#include <core/meta/version.hxx>
|
11
11
|
#include <napi.h>
|
12
|
-
#include <spdlog/spdlog.h>
|
13
12
|
|
14
13
|
namespace couchnode
|
15
14
|
{
|
@@ -39,40 +38,41 @@ Napi::Value shutdown_logger(const Napi::CallbackInfo &info)
|
|
39
38
|
|
40
39
|
Napi::Object Init(Napi::Env env, Napi::Object exports)
|
41
40
|
{
|
42
|
-
spdlog::set_pattern("[%Y-%m-%d %T.%e] [%P,%t] [%^%l%$] %oms, %v");
|
43
|
-
|
44
|
-
auto spdLogLevel = spdlog::level::off;
|
45
41
|
auto cbppLogLevel = couchbase::core::logger::level::off;
|
46
42
|
{
|
47
43
|
const char *logLevelCstr = getenv("CBPPLOGLEVEL");
|
48
44
|
if (logLevelCstr) {
|
49
45
|
std::string logLevelStr = logLevelCstr;
|
50
46
|
if (logLevelStr == "trace") {
|
51
|
-
spdLogLevel = spdlog::level::trace;
|
52
47
|
cbppLogLevel = couchbase::core::logger::level::trace;
|
53
48
|
} else if (logLevelStr == "debug") {
|
54
|
-
spdLogLevel = spdlog::level::debug;
|
55
49
|
cbppLogLevel = couchbase::core::logger::level::debug;
|
56
50
|
} else if (logLevelStr == "info") {
|
57
|
-
spdLogLevel = spdlog::level::info;
|
58
51
|
cbppLogLevel = couchbase::core::logger::level::info;
|
59
52
|
} else if (logLevelStr == "warn") {
|
60
|
-
spdLogLevel = spdlog::level::warn;
|
61
53
|
cbppLogLevel = couchbase::core::logger::level::warn;
|
62
54
|
} else if (logLevelStr == "err") {
|
63
|
-
spdLogLevel = spdlog::level::err;
|
64
55
|
cbppLogLevel = couchbase::core::logger::level::err;
|
65
56
|
} else if (logLevelStr == "critical") {
|
66
|
-
spdLogLevel = spdlog::level::critical;
|
67
57
|
cbppLogLevel = couchbase::core::logger::level::critical;
|
68
58
|
}
|
69
59
|
}
|
70
60
|
}
|
61
|
+
|
71
62
|
if (cbppLogLevel != couchbase::core::logger::level::off) {
|
72
|
-
|
63
|
+
const char *logFileCstr = getenv("CBPPLOGFILE");
|
64
|
+
if (logFileCstr) {
|
65
|
+
std::string logFileStr = logFileCstr;
|
66
|
+
couchbase::core::logger::configuration configuration{};
|
67
|
+
configuration.filename = logFileStr;
|
68
|
+
configuration.log_level = cbppLogLevel;
|
69
|
+
couchbase::core::logger::create_file_logger(configuration);
|
70
|
+
|
71
|
+
} else {
|
72
|
+
couchbase::core::logger::create_console_logger();
|
73
|
+
couchbase::core::logger::set_log_levels(cbppLogLevel);
|
74
|
+
}
|
73
75
|
}
|
74
|
-
spdlog::set_level(spdLogLevel);
|
75
|
-
couchbase::core::logger::set_log_levels(cbppLogLevel);
|
76
76
|
|
77
77
|
AddonData::Init(env, exports);
|
78
78
|
Constants::Init(env, exports);
|
package/src/connection.cpp
CHANGED
@@ -171,6 +171,17 @@ void Connection::Init(Napi::Env env, Napi::Object exports)
|
|
171
171
|
"managementEventingGetFunction"),
|
172
172
|
InstanceMethod<&Connection::jsManagementViewIndexDrop>(
|
173
173
|
"managementViewIndexDrop"),
|
174
|
+
InstanceMethod<
|
175
|
+
&Connection::
|
176
|
+
jsManagementAnalyticsLinkReplaceAzureBlobExternalLink>(
|
177
|
+
"managementAnalyticsLinkReplaceAzureBlobExternalLink"),
|
178
|
+
InstanceMethod<
|
179
|
+
&Connection::
|
180
|
+
jsManagementAnalyticsLinkReplaceCouchbaseRemoteLink>(
|
181
|
+
"managementAnalyticsLinkReplaceCouchbaseRemoteLink"),
|
182
|
+
InstanceMethod<
|
183
|
+
&Connection::jsManagementAnalyticsLinkReplaceS3ExternalLink>(
|
184
|
+
"managementAnalyticsLinkReplaceS3ExternalLink"),
|
174
185
|
InstanceMethod<&Connection::jsManagementAnalyticsLinkDisconnect>(
|
175
186
|
"managementAnalyticsLinkDisconnect"),
|
176
187
|
InstanceMethod<&Connection::jsManagementUserUpsert>(
|
@@ -202,6 +213,17 @@ void Connection::Init(Napi::Env env, Napi::Object exports)
|
|
202
213
|
"managementRoleGetAll"),
|
203
214
|
InstanceMethod<&Connection::jsManagementGroupGetAll>(
|
204
215
|
"managementGroupGetAll"),
|
216
|
+
InstanceMethod<
|
217
|
+
&Connection::
|
218
|
+
jsManagementAnalyticsLinkCreateAzureBlobExternalLink>(
|
219
|
+
"managementAnalyticsLinkCreateAzureBlobExternalLink"),
|
220
|
+
InstanceMethod<
|
221
|
+
&Connection::
|
222
|
+
jsManagementAnalyticsLinkCreateCouchbaseRemoteLink>(
|
223
|
+
"managementAnalyticsLinkCreateCouchbaseRemoteLink"),
|
224
|
+
InstanceMethod<
|
225
|
+
&Connection::jsManagementAnalyticsLinkCreateS3ExternalLink>(
|
226
|
+
"managementAnalyticsLinkCreateS3ExternalLink"),
|
205
227
|
InstanceMethod<&Connection::jsManagementEventingDropFunction>(
|
206
228
|
"managementEventingDropFunction"),
|
207
229
|
InstanceMethod<&Connection::jsManagementCollectionDrop>(
|
package/src/connection.hpp
CHANGED
@@ -161,6 +161,12 @@ public:
|
|
161
161
|
Napi::Value jsManagementScopeCreate(const Napi::CallbackInfo &info);
|
162
162
|
Napi::Value jsManagementEventingGetFunction(const Napi::CallbackInfo &info);
|
163
163
|
Napi::Value jsManagementViewIndexDrop(const Napi::CallbackInfo &info);
|
164
|
+
Napi::Value jsManagementAnalyticsLinkReplaceAzureBlobExternalLink(
|
165
|
+
const Napi::CallbackInfo &info);
|
166
|
+
Napi::Value jsManagementAnalyticsLinkReplaceCouchbaseRemoteLink(
|
167
|
+
const Napi::CallbackInfo &info);
|
168
|
+
Napi::Value jsManagementAnalyticsLinkReplaceS3ExternalLink(
|
169
|
+
const Napi::CallbackInfo &info);
|
164
170
|
Napi::Value
|
165
171
|
jsManagementAnalyticsLinkDisconnect(const Napi::CallbackInfo &info);
|
166
172
|
Napi::Value jsManagementUserUpsert(const Napi::CallbackInfo &info);
|
@@ -182,6 +188,12 @@ public:
|
|
182
188
|
jsManagementSearchIndexControlQuery(const Napi::CallbackInfo &info);
|
183
189
|
Napi::Value jsManagementRoleGetAll(const Napi::CallbackInfo &info);
|
184
190
|
Napi::Value jsManagementGroupGetAll(const Napi::CallbackInfo &info);
|
191
|
+
Napi::Value jsManagementAnalyticsLinkCreateAzureBlobExternalLink(
|
192
|
+
const Napi::CallbackInfo &info);
|
193
|
+
Napi::Value jsManagementAnalyticsLinkCreateCouchbaseRemoteLink(
|
194
|
+
const Napi::CallbackInfo &info);
|
195
|
+
Napi::Value jsManagementAnalyticsLinkCreateS3ExternalLink(
|
196
|
+
const Napi::CallbackInfo &info);
|
185
197
|
Napi::Value
|
186
198
|
jsManagementEventingDropFunction(const Napi::CallbackInfo &info);
|
187
199
|
Napi::Value jsManagementCollectionDrop(const Napi::CallbackInfo &info);
|
@@ -1046,6 +1046,56 @@ Connection::jsManagementViewIndexDrop(const Napi::CallbackInfo &info)
|
|
1046
1046
|
return info.Env().Null();
|
1047
1047
|
}
|
1048
1048
|
|
1049
|
+
Napi::Value Connection::jsManagementAnalyticsLinkReplaceAzureBlobExternalLink(
|
1050
|
+
const Napi::CallbackInfo &info)
|
1051
|
+
{
|
1052
|
+
auto optsJsObj = info[0].As<Napi::Object>();
|
1053
|
+
auto callbackJsFn = info[1].As<Napi::Function>();
|
1054
|
+
|
1055
|
+
executeOp("managementAnalyticsLinkReplaceAzureBlobExternalLink",
|
1056
|
+
jsToCbpp<couchbase::core::operations::management::
|
1057
|
+
analytics_link_replace_request<
|
1058
|
+
couchbase::core::management::analytics::
|
1059
|
+
azure_blob_external_link>>(optsJsObj),
|
1060
|
+
callbackJsFn);
|
1061
|
+
|
1062
|
+
return info.Env().Null();
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
Napi::Value Connection::jsManagementAnalyticsLinkReplaceCouchbaseRemoteLink(
|
1066
|
+
const Napi::CallbackInfo &info)
|
1067
|
+
{
|
1068
|
+
auto optsJsObj = info[0].As<Napi::Object>();
|
1069
|
+
auto callbackJsFn = info[1].As<Napi::Function>();
|
1070
|
+
|
1071
|
+
executeOp("managementAnalyticsLinkReplaceCouchbaseRemoteLink",
|
1072
|
+
jsToCbpp<couchbase::core::operations::management::
|
1073
|
+
analytics_link_replace_request<
|
1074
|
+
couchbase::core::management::analytics::
|
1075
|
+
couchbase_remote_link>>(optsJsObj),
|
1076
|
+
callbackJsFn);
|
1077
|
+
|
1078
|
+
return info.Env().Null();
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
Napi::Value Connection::jsManagementAnalyticsLinkReplaceS3ExternalLink(
|
1082
|
+
const Napi::CallbackInfo &info)
|
1083
|
+
{
|
1084
|
+
auto optsJsObj = info[0].As<Napi::Object>();
|
1085
|
+
auto callbackJsFn = info[1].As<Napi::Function>();
|
1086
|
+
|
1087
|
+
executeOp(
|
1088
|
+
"managementAnalyticsLinkReplaceS3ExternalLink",
|
1089
|
+
jsToCbpp<
|
1090
|
+
couchbase::core::operations::management::
|
1091
|
+
analytics_link_replace_request<
|
1092
|
+
couchbase::core::management::analytics::s3_external_link>>(
|
1093
|
+
optsJsObj),
|
1094
|
+
callbackJsFn);
|
1095
|
+
|
1096
|
+
return info.Env().Null();
|
1097
|
+
}
|
1098
|
+
|
1049
1099
|
Napi::Value
|
1050
1100
|
Connection::jsManagementAnalyticsLinkDisconnect(const Napi::CallbackInfo &info)
|
1051
1101
|
{
|
@@ -1262,6 +1312,56 @@ Napi::Value Connection::jsManagementGroupGetAll(const Napi::CallbackInfo &info)
|
|
1262
1312
|
return info.Env().Null();
|
1263
1313
|
}
|
1264
1314
|
|
1315
|
+
Napi::Value Connection::jsManagementAnalyticsLinkCreateAzureBlobExternalLink(
|
1316
|
+
const Napi::CallbackInfo &info)
|
1317
|
+
{
|
1318
|
+
auto optsJsObj = info[0].As<Napi::Object>();
|
1319
|
+
auto callbackJsFn = info[1].As<Napi::Function>();
|
1320
|
+
|
1321
|
+
executeOp("managementAnalyticsLinkCreateAzureBlobExternalLink",
|
1322
|
+
jsToCbpp<couchbase::core::operations::management::
|
1323
|
+
analytics_link_create_request<
|
1324
|
+
couchbase::core::management::analytics::
|
1325
|
+
azure_blob_external_link>>(optsJsObj),
|
1326
|
+
callbackJsFn);
|
1327
|
+
|
1328
|
+
return info.Env().Null();
|
1329
|
+
}
|
1330
|
+
|
1331
|
+
Napi::Value Connection::jsManagementAnalyticsLinkCreateCouchbaseRemoteLink(
|
1332
|
+
const Napi::CallbackInfo &info)
|
1333
|
+
{
|
1334
|
+
auto optsJsObj = info[0].As<Napi::Object>();
|
1335
|
+
auto callbackJsFn = info[1].As<Napi::Function>();
|
1336
|
+
|
1337
|
+
executeOp("managementAnalyticsLinkCreateCouchbaseRemoteLink",
|
1338
|
+
jsToCbpp<couchbase::core::operations::management::
|
1339
|
+
analytics_link_create_request<
|
1340
|
+
couchbase::core::management::analytics::
|
1341
|
+
couchbase_remote_link>>(optsJsObj),
|
1342
|
+
callbackJsFn);
|
1343
|
+
|
1344
|
+
return info.Env().Null();
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
Napi::Value Connection::jsManagementAnalyticsLinkCreateS3ExternalLink(
|
1348
|
+
const Napi::CallbackInfo &info)
|
1349
|
+
{
|
1350
|
+
auto optsJsObj = info[0].As<Napi::Object>();
|
1351
|
+
auto callbackJsFn = info[1].As<Napi::Function>();
|
1352
|
+
|
1353
|
+
executeOp(
|
1354
|
+
"managementAnalyticsLinkCreateS3ExternalLink",
|
1355
|
+
jsToCbpp<
|
1356
|
+
couchbase::core::operations::management::
|
1357
|
+
analytics_link_create_request<
|
1358
|
+
couchbase::core::management::analytics::s3_external_link>>(
|
1359
|
+
optsJsObj),
|
1360
|
+
callbackJsFn);
|
1361
|
+
|
1362
|
+
return info.Env().Null();
|
1363
|
+
}
|
1364
|
+
|
1265
1365
|
Napi::Value
|
1266
1366
|
Connection::jsManagementEventingDropFunction(const Napi::CallbackInfo &info)
|
1267
1367
|
{
|
package/src/jstocbpp_autogen.hpp
CHANGED
@@ -1105,6 +1105,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_description> {
|
|
1105
1105
|
couchbase::core::management::rbac::role_and_description cppObj;
|
1106
1106
|
js_to_cbpp<std::string>(cppObj.display_name, jsObj.Get("display_name"));
|
1107
1107
|
js_to_cbpp<std::string>(cppObj.description, jsObj.Get("description"));
|
1108
|
+
js_to_cbpp<std::string>(cppObj.name, jsObj.Get("name"));
|
1109
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.bucket,
|
1110
|
+
jsObj.Get("bucket"));
|
1111
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.scope,
|
1112
|
+
jsObj.Get("scope"));
|
1113
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.collection,
|
1114
|
+
jsObj.Get("collection"));
|
1108
1115
|
return cppObj;
|
1109
1116
|
}
|
1110
1117
|
static inline Napi::Value
|
@@ -1116,6 +1123,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_description> {
|
|
1116
1123
|
cbpp_to_js<std::string>(env, cppObj.display_name));
|
1117
1124
|
resObj.Set("description",
|
1118
1125
|
cbpp_to_js<std::string>(env, cppObj.description));
|
1126
|
+
resObj.Set("name", cbpp_to_js<std::string>(env, cppObj.name));
|
1127
|
+
resObj.Set("bucket",
|
1128
|
+
cbpp_to_js<std::optional<std::string>>(env, cppObj.bucket));
|
1129
|
+
resObj.Set("scope",
|
1130
|
+
cbpp_to_js<std::optional<std::string>>(env, cppObj.scope));
|
1131
|
+
resObj.Set("collection", cbpp_to_js<std::optional<std::string>>(
|
1132
|
+
env, cppObj.collection));
|
1119
1133
|
return resObj;
|
1120
1134
|
}
|
1121
1135
|
};
|
@@ -1152,6 +1166,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_origins> {
|
|
1152
1166
|
couchbase::core::management::rbac::role_and_origins cppObj;
|
1153
1167
|
js_to_cbpp<std::vector<couchbase::core::management::rbac::origin>>(
|
1154
1168
|
cppObj.origins, jsObj.Get("origins"));
|
1169
|
+
js_to_cbpp<std::string>(cppObj.name, jsObj.Get("name"));
|
1170
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.bucket,
|
1171
|
+
jsObj.Get("bucket"));
|
1172
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.scope,
|
1173
|
+
jsObj.Get("scope"));
|
1174
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.collection,
|
1175
|
+
jsObj.Get("collection"));
|
1155
1176
|
return cppObj;
|
1156
1177
|
}
|
1157
1178
|
static inline Napi::Value
|
@@ -1163,6 +1184,13 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::role_and_origins> {
|
|
1163
1184
|
"origins",
|
1164
1185
|
cbpp_to_js<std::vector<couchbase::core::management::rbac::origin>>(
|
1165
1186
|
env, cppObj.origins));
|
1187
|
+
resObj.Set("name", cbpp_to_js<std::string>(env, cppObj.name));
|
1188
|
+
resObj.Set("bucket",
|
1189
|
+
cbpp_to_js<std::optional<std::string>>(env, cppObj.bucket));
|
1190
|
+
resObj.Set("scope",
|
1191
|
+
cbpp_to_js<std::optional<std::string>>(env, cppObj.scope));
|
1192
|
+
resObj.Set("collection", cbpp_to_js<std::optional<std::string>>(
|
1193
|
+
env, cppObj.collection));
|
1166
1194
|
return resObj;
|
1167
1195
|
}
|
1168
1196
|
};
|
@@ -1219,6 +1247,14 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::user_and_metadata> {
|
|
1219
1247
|
jsObj.Get("password_changed"));
|
1220
1248
|
js_to_cbpp<std::set<std::string>>(cppObj.external_groups,
|
1221
1249
|
jsObj.Get("external_groups"));
|
1250
|
+
js_to_cbpp<std::string>(cppObj.username, jsObj.Get("username"));
|
1251
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.display_name,
|
1252
|
+
jsObj.Get("display_name"));
|
1253
|
+
js_to_cbpp<std::set<std::string>>(cppObj.groups, jsObj.Get("groups"));
|
1254
|
+
js_to_cbpp<std::vector<couchbase::core::management::rbac::role>>(
|
1255
|
+
cppObj.roles, jsObj.Get("roles"));
|
1256
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.password,
|
1257
|
+
jsObj.Get("password"));
|
1222
1258
|
return cppObj;
|
1223
1259
|
}
|
1224
1260
|
static inline Napi::Value
|
@@ -1237,6 +1273,17 @@ struct js_to_cbpp_t<couchbase::core::management::rbac::user_and_metadata> {
|
|
1237
1273
|
env, cppObj.password_changed));
|
1238
1274
|
resObj.Set("external_groups", cbpp_to_js<std::set<std::string>>(
|
1239
1275
|
env, cppObj.external_groups));
|
1276
|
+
resObj.Set("username", cbpp_to_js<std::string>(env, cppObj.username));
|
1277
|
+
resObj.Set("display_name", cbpp_to_js<std::optional<std::string>>(
|
1278
|
+
env, cppObj.display_name));
|
1279
|
+
resObj.Set("groups",
|
1280
|
+
cbpp_to_js<std::set<std::string>>(env, cppObj.groups));
|
1281
|
+
resObj.Set(
|
1282
|
+
"roles",
|
1283
|
+
cbpp_to_js<std::vector<couchbase::core::management::rbac::role>>(
|
1284
|
+
env, cppObj.roles));
|
1285
|
+
resObj.Set("password", cbpp_to_js<std::optional<std::string>>(
|
1286
|
+
env, cppObj.password));
|
1240
1287
|
return resObj;
|
1241
1288
|
}
|
1242
1289
|
};
|
@@ -8329,6 +8376,134 @@ struct js_to_cbpp_t<couchbase::core::operations::management::
|
|
8329
8376
|
}
|
8330
8377
|
};
|
8331
8378
|
|
8379
|
+
template <>
|
8380
|
+
struct js_to_cbpp_t<
|
8381
|
+
couchbase::core::operations::management::analytics_link_replace_request<
|
8382
|
+
couchbase::core::management::analytics::azure_blob_external_link>> {
|
8383
|
+
static inline couchbase::core::operations::management::
|
8384
|
+
analytics_link_replace_request<
|
8385
|
+
couchbase::core::management::analytics::azure_blob_external_link>
|
8386
|
+
from_js(Napi::Value jsVal)
|
8387
|
+
{
|
8388
|
+
auto jsObj = jsVal.ToObject();
|
8389
|
+
couchbase::core::operations::management::analytics_link_replace_request<
|
8390
|
+
couchbase::core::management::analytics::azure_blob_external_link>
|
8391
|
+
cppObj;
|
8392
|
+
js_to_cbpp<
|
8393
|
+
couchbase::core::management::analytics::azure_blob_external_link>(
|
8394
|
+
cppObj.link, jsObj.Get("link"));
|
8395
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
8396
|
+
jsObj.Get("client_context_id"));
|
8397
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
8398
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
8399
|
+
return cppObj;
|
8400
|
+
}
|
8401
|
+
static inline Napi::Value
|
8402
|
+
to_js(Napi::Env env, const couchbase::core::operations::management::
|
8403
|
+
analytics_link_replace_request<
|
8404
|
+
couchbase::core::management::analytics::
|
8405
|
+
azure_blob_external_link> &cppObj)
|
8406
|
+
{
|
8407
|
+
auto resObj = Napi::Object::New(env);
|
8408
|
+
resObj.Set("link",
|
8409
|
+
cbpp_to_js<couchbase::core::management::analytics::
|
8410
|
+
azure_blob_external_link>(env, cppObj.link));
|
8411
|
+
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
8412
|
+
env, cppObj.client_context_id));
|
8413
|
+
resObj.Set("timeout",
|
8414
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
8415
|
+
env, cppObj.timeout));
|
8416
|
+
return resObj;
|
8417
|
+
}
|
8418
|
+
};
|
8419
|
+
|
8420
|
+
template <>
|
8421
|
+
struct js_to_cbpp_t<
|
8422
|
+
couchbase::core::operations::management::analytics_link_replace_request<
|
8423
|
+
couchbase::core::management::analytics::couchbase_remote_link>> {
|
8424
|
+
static inline couchbase::core::operations::management::
|
8425
|
+
analytics_link_replace_request<
|
8426
|
+
couchbase::core::management::analytics::couchbase_remote_link>
|
8427
|
+
from_js(Napi::Value jsVal)
|
8428
|
+
{
|
8429
|
+
auto jsObj = jsVal.ToObject();
|
8430
|
+
couchbase::core::operations::management::analytics_link_replace_request<
|
8431
|
+
couchbase::core::management::analytics::couchbase_remote_link>
|
8432
|
+
cppObj;
|
8433
|
+
js_to_cbpp<
|
8434
|
+
couchbase::core::management::analytics::couchbase_remote_link>(
|
8435
|
+
cppObj.link, jsObj.Get("link"));
|
8436
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
8437
|
+
jsObj.Get("client_context_id"));
|
8438
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
8439
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
8440
|
+
return cppObj;
|
8441
|
+
}
|
8442
|
+
static inline Napi::Value
|
8443
|
+
to_js(Napi::Env env,
|
8444
|
+
const couchbase::core::operations::management::
|
8445
|
+
analytics_link_replace_request<
|
8446
|
+
couchbase::core::management::analytics::couchbase_remote_link>
|
8447
|
+
&cppObj)
|
8448
|
+
{
|
8449
|
+
auto resObj = Napi::Object::New(env);
|
8450
|
+
resObj.Set(
|
8451
|
+
"link",
|
8452
|
+
cbpp_to_js<
|
8453
|
+
couchbase::core::management::analytics::couchbase_remote_link>(
|
8454
|
+
env, cppObj.link));
|
8455
|
+
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
8456
|
+
env, cppObj.client_context_id));
|
8457
|
+
resObj.Set("timeout",
|
8458
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
8459
|
+
env, cppObj.timeout));
|
8460
|
+
return resObj;
|
8461
|
+
}
|
8462
|
+
};
|
8463
|
+
|
8464
|
+
template <>
|
8465
|
+
struct js_to_cbpp_t<
|
8466
|
+
couchbase::core::operations::management::analytics_link_replace_request<
|
8467
|
+
couchbase::core::management::analytics::s3_external_link>> {
|
8468
|
+
static inline couchbase::core::operations::management::
|
8469
|
+
analytics_link_replace_request<
|
8470
|
+
couchbase::core::management::analytics::s3_external_link>
|
8471
|
+
from_js(Napi::Value jsVal)
|
8472
|
+
{
|
8473
|
+
auto jsObj = jsVal.ToObject();
|
8474
|
+
couchbase::core::operations::management::analytics_link_replace_request<
|
8475
|
+
couchbase::core::management::analytics::s3_external_link>
|
8476
|
+
cppObj;
|
8477
|
+
js_to_cbpp<couchbase::core::management::analytics::s3_external_link>(
|
8478
|
+
cppObj.link, jsObj.Get("link"));
|
8479
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
8480
|
+
jsObj.Get("client_context_id"));
|
8481
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
8482
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
8483
|
+
return cppObj;
|
8484
|
+
}
|
8485
|
+
static inline Napi::Value
|
8486
|
+
to_js(Napi::Env env,
|
8487
|
+
const couchbase::core::operations::management::
|
8488
|
+
analytics_link_replace_request<
|
8489
|
+
couchbase::core::management::analytics::s3_external_link>
|
8490
|
+
&cppObj)
|
8491
|
+
{
|
8492
|
+
auto resObj = Napi::Object::New(env);
|
8493
|
+
resObj.Set(
|
8494
|
+
"link",
|
8495
|
+
cbpp_to_js<
|
8496
|
+
couchbase::core::management::analytics::s3_external_link>(
|
8497
|
+
env, cppObj.link));
|
8498
|
+
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
8499
|
+
env, cppObj.client_context_id));
|
8500
|
+
resObj.Set("timeout",
|
8501
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
8502
|
+
env, cppObj.timeout));
|
8503
|
+
return resObj;
|
8504
|
+
}
|
8505
|
+
};
|
8506
|
+
|
8332
8507
|
template <>
|
8333
8508
|
struct js_to_cbpp_t<couchbase::core::operations::management::
|
8334
8509
|
analytics_link_disconnect_response> {
|
@@ -9415,6 +9590,134 @@ struct js_to_cbpp_t<couchbase::core::operations::management::
|
|
9415
9590
|
}
|
9416
9591
|
};
|
9417
9592
|
|
9593
|
+
template <>
|
9594
|
+
struct js_to_cbpp_t<
|
9595
|
+
couchbase::core::operations::management::analytics_link_create_request<
|
9596
|
+
couchbase::core::management::analytics::azure_blob_external_link>> {
|
9597
|
+
static inline couchbase::core::operations::management::
|
9598
|
+
analytics_link_create_request<
|
9599
|
+
couchbase::core::management::analytics::azure_blob_external_link>
|
9600
|
+
from_js(Napi::Value jsVal)
|
9601
|
+
{
|
9602
|
+
auto jsObj = jsVal.ToObject();
|
9603
|
+
couchbase::core::operations::management::analytics_link_create_request<
|
9604
|
+
couchbase::core::management::analytics::azure_blob_external_link>
|
9605
|
+
cppObj;
|
9606
|
+
js_to_cbpp<
|
9607
|
+
couchbase::core::management::analytics::azure_blob_external_link>(
|
9608
|
+
cppObj.link, jsObj.Get("link"));
|
9609
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
9610
|
+
jsObj.Get("client_context_id"));
|
9611
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
9612
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
9613
|
+
return cppObj;
|
9614
|
+
}
|
9615
|
+
static inline Napi::Value
|
9616
|
+
to_js(Napi::Env env, const couchbase::core::operations::management::
|
9617
|
+
analytics_link_create_request<
|
9618
|
+
couchbase::core::management::analytics::
|
9619
|
+
azure_blob_external_link> &cppObj)
|
9620
|
+
{
|
9621
|
+
auto resObj = Napi::Object::New(env);
|
9622
|
+
resObj.Set("link",
|
9623
|
+
cbpp_to_js<couchbase::core::management::analytics::
|
9624
|
+
azure_blob_external_link>(env, cppObj.link));
|
9625
|
+
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
9626
|
+
env, cppObj.client_context_id));
|
9627
|
+
resObj.Set("timeout",
|
9628
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
9629
|
+
env, cppObj.timeout));
|
9630
|
+
return resObj;
|
9631
|
+
}
|
9632
|
+
};
|
9633
|
+
|
9634
|
+
template <>
|
9635
|
+
struct js_to_cbpp_t<
|
9636
|
+
couchbase::core::operations::management::analytics_link_create_request<
|
9637
|
+
couchbase::core::management::analytics::couchbase_remote_link>> {
|
9638
|
+
static inline couchbase::core::operations::management::
|
9639
|
+
analytics_link_create_request<
|
9640
|
+
couchbase::core::management::analytics::couchbase_remote_link>
|
9641
|
+
from_js(Napi::Value jsVal)
|
9642
|
+
{
|
9643
|
+
auto jsObj = jsVal.ToObject();
|
9644
|
+
couchbase::core::operations::management::analytics_link_create_request<
|
9645
|
+
couchbase::core::management::analytics::couchbase_remote_link>
|
9646
|
+
cppObj;
|
9647
|
+
js_to_cbpp<
|
9648
|
+
couchbase::core::management::analytics::couchbase_remote_link>(
|
9649
|
+
cppObj.link, jsObj.Get("link"));
|
9650
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
9651
|
+
jsObj.Get("client_context_id"));
|
9652
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
9653
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
9654
|
+
return cppObj;
|
9655
|
+
}
|
9656
|
+
static inline Napi::Value
|
9657
|
+
to_js(Napi::Env env,
|
9658
|
+
const couchbase::core::operations::management::
|
9659
|
+
analytics_link_create_request<
|
9660
|
+
couchbase::core::management::analytics::couchbase_remote_link>
|
9661
|
+
&cppObj)
|
9662
|
+
{
|
9663
|
+
auto resObj = Napi::Object::New(env);
|
9664
|
+
resObj.Set(
|
9665
|
+
"link",
|
9666
|
+
cbpp_to_js<
|
9667
|
+
couchbase::core::management::analytics::couchbase_remote_link>(
|
9668
|
+
env, cppObj.link));
|
9669
|
+
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
9670
|
+
env, cppObj.client_context_id));
|
9671
|
+
resObj.Set("timeout",
|
9672
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
9673
|
+
env, cppObj.timeout));
|
9674
|
+
return resObj;
|
9675
|
+
}
|
9676
|
+
};
|
9677
|
+
|
9678
|
+
template <>
|
9679
|
+
struct js_to_cbpp_t<
|
9680
|
+
couchbase::core::operations::management::analytics_link_create_request<
|
9681
|
+
couchbase::core::management::analytics::s3_external_link>> {
|
9682
|
+
static inline couchbase::core::operations::management::
|
9683
|
+
analytics_link_create_request<
|
9684
|
+
couchbase::core::management::analytics::s3_external_link>
|
9685
|
+
from_js(Napi::Value jsVal)
|
9686
|
+
{
|
9687
|
+
auto jsObj = jsVal.ToObject();
|
9688
|
+
couchbase::core::operations::management::analytics_link_create_request<
|
9689
|
+
couchbase::core::management::analytics::s3_external_link>
|
9690
|
+
cppObj;
|
9691
|
+
js_to_cbpp<couchbase::core::management::analytics::s3_external_link>(
|
9692
|
+
cppObj.link, jsObj.Get("link"));
|
9693
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
9694
|
+
jsObj.Get("client_context_id"));
|
9695
|
+
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
9696
|
+
cppObj.timeout, jsObj.Get("timeout"));
|
9697
|
+
return cppObj;
|
9698
|
+
}
|
9699
|
+
static inline Napi::Value
|
9700
|
+
to_js(Napi::Env env,
|
9701
|
+
const couchbase::core::operations::management::
|
9702
|
+
analytics_link_create_request<
|
9703
|
+
couchbase::core::management::analytics::s3_external_link>
|
9704
|
+
&cppObj)
|
9705
|
+
{
|
9706
|
+
auto resObj = Napi::Object::New(env);
|
9707
|
+
resObj.Set(
|
9708
|
+
"link",
|
9709
|
+
cbpp_to_js<
|
9710
|
+
couchbase::core::management::analytics::s3_external_link>(
|
9711
|
+
env, cppObj.link));
|
9712
|
+
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
9713
|
+
env, cppObj.client_context_id));
|
9714
|
+
resObj.Set("timeout",
|
9715
|
+
cbpp_to_js<std::optional<std::chrono::milliseconds>>(
|
9716
|
+
env, cppObj.timeout));
|
9717
|
+
return resObj;
|
9718
|
+
}
|
9719
|
+
};
|
9720
|
+
|
9418
9721
|
template <>
|
9419
9722
|
struct js_to_cbpp_t<
|
9420
9723
|
couchbase::core::operations::management::eventing_drop_function_response> {
|
@@ -10524,10 +10827,12 @@ struct js_to_cbpp_t<
|
|
10524
10827
|
auto jsObj = jsVal.ToObject();
|
10525
10828
|
couchbase::core::operations::management::analytics_link_get_all_request
|
10526
10829
|
cppObj;
|
10527
|
-
js_to_cbpp<std::string
|
10528
|
-
|
10529
|
-
js_to_cbpp<std::string
|
10530
|
-
|
10830
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.link_type,
|
10831
|
+
jsObj.Get("link_type"));
|
10832
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.link_name,
|
10833
|
+
jsObj.Get("link_name"));
|
10834
|
+
js_to_cbpp<std::optional<std::string>>(cppObj.dataverse_name,
|
10835
|
+
jsObj.Get("dataverse_name"));
|
10531
10836
|
js_to_cbpp<std::optional<std::string>>(cppObj.client_context_id,
|
10532
10837
|
jsObj.Get("client_context_id"));
|
10533
10838
|
js_to_cbpp<std::optional<std::chrono::milliseconds>>(
|
@@ -10539,10 +10844,12 @@ struct js_to_cbpp_t<
|
|
10539
10844
|
analytics_link_get_all_request &cppObj)
|
10540
10845
|
{
|
10541
10846
|
auto resObj = Napi::Object::New(env);
|
10542
|
-
resObj.Set("link_type", cbpp_to_js<std::string
|
10543
|
-
|
10544
|
-
resObj.Set("
|
10545
|
-
|
10847
|
+
resObj.Set("link_type", cbpp_to_js<std::optional<std::string>>(
|
10848
|
+
env, cppObj.link_type));
|
10849
|
+
resObj.Set("link_name", cbpp_to_js<std::optional<std::string>>(
|
10850
|
+
env, cppObj.link_name));
|
10851
|
+
resObj.Set("dataverse_name", cbpp_to_js<std::optional<std::string>>(
|
10852
|
+
env, cppObj.dataverse_name));
|
10546
10853
|
resObj.Set("client_context_id", cbpp_to_js<std::optional<std::string>>(
|
10547
10854
|
env, cppObj.client_context_id));
|
10548
10855
|
resObj.Set("timeout",
|
@@ -255,8 +255,7 @@ struct js_to_cbpp_t<cbcoretxns::transaction_get_result> {
|
|
255
255
|
{
|
256
256
|
auto resObj = Napi::Object::New(env);
|
257
257
|
resObj.Set("id", cbpp_to_js(env, res.id()));
|
258
|
-
resObj.Set("content",
|
259
|
-
cbpp_to_js<std::vector<std::byte>>(env, res.content().data));
|
258
|
+
resObj.Set("content", cbpp_to_js(env, res.content()));
|
260
259
|
resObj.Set("cas", cbpp_to_js(env, couchbase::cas{res.cas()}));
|
261
260
|
resObj.Set("links", cbpp_to_js(env, res.links()));
|
262
261
|
resObj.Set("metadata", cbpp_to_js(env, res.metadata()));
|