couchbase 4.2.8-dev.1 → 4.2.9
Sign up to get free protection for your applications and to get access to all the features.
- package/CMakeLists.txt +1 -1
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +139 -56
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
- package/deps/couchbase-cxx-client/CMakeLists.txt +397 -424
- package/deps/couchbase-cxx-client/core/agent_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/agent_group.cxx +0 -1
- package/deps/couchbase-cxx-client/core/agent_group.hxx +9 -0
- package/deps/couchbase-cxx-client/core/agent_group_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/bucket.cxx +22 -8
- package/deps/couchbase-cxx-client/core/bucket.hxx +3 -1
- package/deps/couchbase-cxx-client/core/cluster.cxx +1453 -108
- package/deps/couchbase-cxx-client/core/cluster.hxx +183 -473
- package/deps/couchbase-cxx-client/core/cluster_agent_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/cluster_options.cxx +12 -2
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +9 -8
- package/deps/couchbase-cxx-client/core/config_profiles.cxx +2 -2
- package/deps/couchbase-cxx-client/core/config_profiles.hxx +1 -1
- package/deps/couchbase-cxx-client/core/core_sdk_shim.cxx +1 -2
- package/deps/couchbase-cxx-client/core/core_sdk_shim.hxx +3 -2
- package/deps/couchbase-cxx-client/core/diagnostics.hxx +0 -1
- package/deps/couchbase-cxx-client/core/dispatcher.cxx +2 -2
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +38 -76
- package/deps/couchbase-cxx-client/core/impl/analytics.hxx +40 -0
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +820 -0
- package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +403 -0
- package/deps/couchbase-cxx-client/core/impl/bucket.cxx +78 -0
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +433 -0
- package/deps/couchbase-cxx-client/core/impl/cluster.cxx +226 -44
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +1384 -0
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +306 -0
- package/deps/couchbase-cxx-client/core/impl/configuration_profiles_registry.cxx +3 -1
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +2 -0
- package/deps/couchbase-cxx-client/core/{operations/mcbp_noop.cxx → impl/doc_id_query.cxx} +19 -15
- package/deps/couchbase-cxx-client/core/impl/key_value_error_category.cxx +4 -2
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.hxx +0 -10
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.hxx +0 -10
- package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +24 -17
- package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/query.cxx +45 -68
- package/deps/couchbase-cxx-client/core/impl/query.hxx +34 -0
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +628 -0
- package/deps/couchbase-cxx-client/core/impl/scope.cxx +172 -0
- package/deps/couchbase-cxx-client/core/impl/search.cxx +12 -61
- package/deps/couchbase-cxx-client/core/impl/search.hxx +37 -0
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +469 -0
- package/deps/couchbase-cxx-client/core/impl/search_row_location.cxx +12 -0
- package/deps/couchbase-cxx-client/core/impl/search_sort_geo_distance.cxx +87 -0
- package/deps/couchbase-cxx-client/core/impl/with_legacy_durability.hxx +23 -25
- package/deps/couchbase-cxx-client/core/io/dns_config.cxx +28 -0
- package/deps/couchbase-cxx-client/core/io/dns_config.hxx +6 -25
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +9 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +1 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_message.hxx +3 -2
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +51 -21
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +2 -1
- package/deps/couchbase-cxx-client/core/logger/logger.hxx +4 -4
- package/deps/couchbase-cxx-client/core/management/bucket_settings.hxx +1 -1
- package/deps/couchbase-cxx-client/core/mcbp/packet.cxx +1 -1
- package/deps/couchbase-cxx-client/core/mcbp/queue_callback.hxx +1 -1
- package/deps/couchbase-cxx-client/core/meta/features.hxx +28 -0
- package/deps/couchbase-cxx-client/core/operations/document_query.cxx +17 -1
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +6 -5
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +2 -2
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.cxx +4 -4
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +4 -4
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +0 -1
- package/deps/couchbase-cxx-client/core/operations_fwd.hxx +260 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +146 -5
- package/deps/couchbase-cxx-client/core/origin.hxx +30 -140
- package/deps/couchbase-cxx-client/core/protocol/cmd_cluster_map_change_notification.hxx +3 -3
- package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +5 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_observe_seqno.hxx +4 -4
- package/deps/couchbase-cxx-client/core/protocol/hello_feature.hxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/hello_feature_fmt.hxx +3 -0
- package/deps/couchbase-cxx-client/core/protocol/status.cxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
- package/deps/couchbase-cxx-client/core/query_context.hxx +11 -7
- package/deps/couchbase-cxx-client/core/range_scan_orchestrator.cxx +1 -1
- package/deps/couchbase-cxx-client/core/topology/configuration.cxx +23 -0
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +8 -12
- package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +3 -3
- package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +2 -0
- package/deps/couchbase-cxx-client/core/topology/error_map.hxx +2 -2
- package/deps/couchbase-cxx-client/core/topology/error_map_json.hxx +4 -0
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.cxx +58 -0
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.hxx +5 -40
- package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.cxx +30 -0
- package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +18 -18
- package/deps/couchbase-cxx-client/core/transactions/attempt_context.cxx +36 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +39 -41
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/internal/atr_cleanup_entry.hxx +3 -1
- package/deps/couchbase-cxx-client/core/transactions/internal/atr_entry.hxx +2 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.cxx +32 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.hxx +4 -30
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record_fmt.hxx +41 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/logging.hxx +17 -15
- package/deps/couchbase-cxx-client/core/transactions/internal/transaction_context.hxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +4 -4
- package/deps/couchbase-cxx-client/core/transactions/internal/utils.hxx +1 -13
- package/deps/couchbase-cxx-client/core/transactions/result.hxx +0 -26
- package/deps/couchbase-cxx-client/core/transactions/result_fmt.hxx +46 -0
- package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +16 -14
- package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +6 -6
- package/deps/couchbase-cxx-client/core/transactions/transaction_keyspace.cxx +48 -0
- package/deps/couchbase-cxx-client/core/transactions/transaction_links.hxx +1 -0
- package/deps/couchbase-cxx-client/core/transactions/transaction_options.cxx +61 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +9 -8
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +9 -16
- package/deps/couchbase-cxx-client/core/transactions/transactions_config.cxx +7 -6
- package/deps/couchbase-cxx-client/core/transactions.hxx +6 -5
- package/deps/couchbase-cxx-client/core/utils/join_strings.hxx +4 -3
- package/deps/couchbase-cxx-client/core/utils/keyspace.hxx +4 -4
- package/deps/couchbase-cxx-client/couchbase/allow_querying_search_index_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_index_manager.hxx +463 -0
- package/deps/couchbase-cxx-client/couchbase/analyze_document_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/append_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/behavior_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/binary_collection.hxx +19 -115
- package/deps/couchbase-cxx-client/couchbase/bucket.hxx +13 -30
- package/deps/couchbase-cxx-client/couchbase/bucket_manager.hxx +8 -7
- package/deps/couchbase-cxx-client/couchbase/build_query_index_options.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +41 -73
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +1 -27
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +176 -386
- package/deps/couchbase-cxx-client/couchbase/collection_manager.hxx +8 -9
- package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +21 -24
- package/deps/couchbase-cxx-client/couchbase/connect_link_analytics_options.hxx +116 -0
- package/deps/couchbase-cxx-client/couchbase/create_bucket_options.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/create_collection_options.hxx +3 -2
- package/deps/couchbase-cxx-client/couchbase/create_dataset_analytics_options.hxx +120 -0
- package/deps/couchbase-cxx-client/couchbase/create_dataverse_analytics_options.hxx +85 -0
- package/deps/couchbase-cxx-client/couchbase/create_index_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/create_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/decrement_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/disallow_querying_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/disconnect_link_analytics_options.hxx +105 -0
- package/deps/couchbase-cxx-client/couchbase/drop_dataset_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/drop_dataverse_analytics_options.hxx +84 -0
- package/deps/couchbase-cxx-client/couchbase/drop_index_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/drop_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/drop_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +22 -1
- package/deps/couchbase-cxx-client/couchbase/exists_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_error_map_attribute.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/transaction_keyspace.hxx +37 -0
- package/deps/couchbase-cxx-client/couchbase/freeze_plan_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_datasets_analytics_options.hxx +66 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_indexes_analytics_options.hxx +65 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_query_indexes_options.hxx +1 -4
- package/deps/couchbase-cxx-client/couchbase/get_all_replicas_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_all_search_indexes_options.hxx +45 -0
- package/deps/couchbase-cxx-client/couchbase/get_and_lock_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/get_and_touch_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/get_any_replica_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_indexed_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/get_links_analytics_options.hxx +121 -0
- package/deps/couchbase-cxx-client/couchbase/get_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_pending_mutations_analytics_options.hxx +67 -0
- package/deps/couchbase-cxx-client/couchbase/get_search_index_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/increment_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/insert_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/key_value_error_map_attribute.hxx +12 -0
- package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/lookup_in_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/management/analytics_dataset.hxx +48 -0
- package/deps/couchbase-cxx-client/couchbase/management/analytics_index.hxx +48 -0
- package/deps/couchbase-cxx-client/couchbase/management/analytics_link.hxx +239 -0
- package/deps/couchbase-cxx-client/couchbase/management/query_index.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/management/search_index.hxx +40 -0
- package/deps/couchbase-cxx-client/couchbase/manager_error_context.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/mutate_in_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/network_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/pause_ingest_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/phrase_query.hxx +19 -0
- package/deps/couchbase-cxx-client/couchbase/prepend_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +99 -20
- package/deps/couchbase-cxx-client/couchbase/query_options.hxx +0 -21
- package/deps/couchbase-cxx-client/couchbase/remove_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/replace_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/replace_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/resume_ingest_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/scope.hxx +13 -45
- package/deps/couchbase-cxx-client/couchbase/search_facet_result.hxx +1 -7
- package/deps/couchbase-cxx-client/couchbase/search_geo_distance_units.hxx +26 -0
- package/deps/couchbase-cxx-client/couchbase/search_index_manager.hxx +292 -0
- package/deps/couchbase-cxx-client/couchbase/search_row_location.hxx +10 -0
- package/deps/couchbase-cxx-client/couchbase/search_sort_geo_distance.hxx +84 -0
- package/deps/couchbase-cxx-client/couchbase/security_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/touch_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/tracing/request_tracer.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/async_attempt_context.hxx +10 -7
- package/deps/couchbase-cxx-client/couchbase/transactions/attempt_context.hxx +10 -10
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_keyspace.hxx +8 -58
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +28 -70
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_options.hxx +7 -2
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_cleanup_config.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_config.hxx +11 -38
- package/deps/couchbase-cxx-client/couchbase/unfreeze_plan_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/unlock_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/upsert_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/upsert_search_index_options.hxx +41 -0
- package/dist/binding.d.ts +7 -9
- package/dist/bindingutilities.js +2 -0
- package/dist/collection.js +3 -3
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +14 -2
- package/dist/transactions.d.ts +2 -0
- package/dist/transactions.js +2 -3
- package/dist/usermanager.js +1 -1
- package/package.json +7 -7
- package/src/binding.cpp +1 -0
- package/src/connection.cpp +12 -9
- package/src/connection.hpp +3 -3
- package/src/connection_autogen.cpp +7 -5
- package/src/constants.cpp +3 -0
- package/src/instance.cpp +2 -2
- package/src/instance.hpp +1 -1
- package/src/jstocbpp_autogen.hpp +21 -38
- package/src/jstocbpp_basic.hpp +2 -0
- package/src/jstocbpp_errors.hpp +1 -0
- package/src/jstocbpp_transactions.hpp +6 -22
- package/src/mutationtoken.hpp +1 -0
- package/tools/gen-bindings-json.py +39 -16
- package/deps/couchbase-cxx-cache/spdlog/66ab2619a0014319471759c03e2de1af6bda14de/spdlog/example/CMakeLists.txt +0 -23
- package/deps/couchbase-cxx-cache/spdlog/66ab2619a0014319471759c03e2de1af6bda14de/spdlog/example/example.cpp +0 -398
- package/deps/couchbase-cxx-client/core/impl/append.cxx +0 -87
- package/deps/couchbase-cxx-client/core/impl/build_deferred_query_indexes.cxx +0 -157
- package/deps/couchbase-cxx-client/core/impl/create_bucket.cxx +0 -158
- package/deps/couchbase-cxx-client/core/impl/create_collection.cxx +0 -83
- package/deps/couchbase-cxx-client/core/impl/create_query_index.cxx +0 -232
- package/deps/couchbase-cxx-client/core/impl/create_scope.cxx +0 -69
- package/deps/couchbase-cxx-client/core/impl/decrement.cxx +0 -96
- package/deps/couchbase-cxx-client/core/impl/drop_bucket.cxx +0 -66
- package/deps/couchbase-cxx-client/core/impl/drop_collection.cxx +0 -76
- package/deps/couchbase-cxx-client/core/impl/drop_query_index.cxx +0 -187
- package/deps/couchbase-cxx-client/core/impl/drop_scope.cxx +0 -68
- package/deps/couchbase-cxx-client/core/impl/exists.cxx +0 -47
- package/deps/couchbase-cxx-client/core/impl/flush_bucket.cxx +0 -66
- package/deps/couchbase-cxx-client/core/impl/get.cxx +0 -68
- package/deps/couchbase-cxx-client/core/impl/get_all_buckets.cxx +0 -178
- package/deps/couchbase-cxx-client/core/impl/get_all_query_indexes.cxx +0 -106
- package/deps/couchbase-cxx-client/core/impl/get_all_replicas.cxx +0 -145
- package/deps/couchbase-cxx-client/core/impl/get_all_scopes.cxx +0 -94
- package/deps/couchbase-cxx-client/core/impl/get_and_lock.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/get_and_touch.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/get_any_replica.cxx +0 -134
- package/deps/couchbase-cxx-client/core/impl/get_bucket.cxx +0 -168
- package/deps/couchbase-cxx-client/core/impl/increment.cxx +0 -96
- package/deps/couchbase-cxx-client/core/impl/insert.cxx +0 -90
- package/deps/couchbase-cxx-client/core/impl/lookup_in.cxx +0 -69
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.cxx +0 -178
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.cxx +0 -169
- package/deps/couchbase-cxx-client/core/impl/mutate_in.cxx +0 -125
- package/deps/couchbase-cxx-client/core/impl/prepend.cxx +0 -87
- package/deps/couchbase-cxx-client/core/impl/remove.cxx +0 -86
- package/deps/couchbase-cxx-client/core/impl/replace.cxx +0 -102
- package/deps/couchbase-cxx-client/core/impl/touch.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/unlock.cxx +0 -47
- package/deps/couchbase-cxx-client/core/impl/update_bucket.cxx +0 -133
- package/deps/couchbase-cxx-client/core/impl/update_collection.cxx +0 -83
- package/deps/couchbase-cxx-client/core/impl/upsert.cxx +0 -100
- package/deps/couchbase-cxx-client/core/impl/watch_query_indexes.cxx +0 -196
- package/deps/couchbase-cxx-client/core/operations/mcbp_noop.hxx +0 -49
- /package/deps/couchbase-cxx-client/core/impl/{streaming_json_lexter_error_category.cxx → streaming_json_lexer_error_category.cxx} +0 -0
@@ -20,8 +20,6 @@
|
|
20
20
|
#include "core/timeout_defaults.hxx"
|
21
21
|
|
22
22
|
#include <cstdint>
|
23
|
-
#include <filesystem>
|
24
|
-
#include <fstream>
|
25
23
|
#include <string>
|
26
24
|
|
27
25
|
namespace couchbase::core::io::dns
|
@@ -32,31 +30,14 @@ class dns_config
|
|
32
30
|
static constexpr auto default_nameserver = "8.8.8.8";
|
33
31
|
static constexpr std::uint16_t default_port = 53;
|
34
32
|
|
35
|
-
dns_config()
|
36
|
-
|
37
|
-
dns_config(const std::string& nameserver, std::uint16_t port, std::chrono::milliseconds timeout = timeout_defaults::dns_srv_timeout)
|
38
|
-
: nameserver_{ nameserver }
|
39
|
-
, port_{ port }
|
40
|
-
, timeout_{ timeout }
|
41
|
-
{
|
42
|
-
}
|
43
|
-
|
44
|
-
[[nodiscard]] std::uint16_t port() const
|
45
|
-
{
|
46
|
-
return port_;
|
47
|
-
}
|
48
|
-
|
49
|
-
[[nodiscard]] const std::string& nameserver() const
|
50
|
-
{
|
51
|
-
return nameserver_;
|
52
|
-
}
|
33
|
+
static const dns_config& system_config();
|
53
34
|
|
54
|
-
|
55
|
-
|
56
|
-
return timeout_;
|
57
|
-
}
|
35
|
+
dns_config() = default;
|
36
|
+
dns_config(std::string nameserver, std::uint16_t port, std::chrono::milliseconds timeout = timeout_defaults::dns_srv_timeout);
|
58
37
|
|
59
|
-
|
38
|
+
[[nodiscard]] std::uint16_t port() const;
|
39
|
+
[[nodiscard]] const std::string& nameserver() const;
|
40
|
+
[[nodiscard]] std::chrono::milliseconds timeout() const;
|
60
41
|
|
61
42
|
private:
|
62
43
|
std::string nameserver_{ default_nameserver };
|
@@ -29,6 +29,8 @@
|
|
29
29
|
|
30
30
|
#include <gsl/narrow>
|
31
31
|
|
32
|
+
#include <chrono>
|
33
|
+
#include <optional>
|
32
34
|
#include <random>
|
33
35
|
|
34
36
|
namespace couchbase::core::io
|
@@ -104,6 +106,7 @@ class http_session_manager
|
|
104
106
|
|
105
107
|
template<typename Collector>
|
106
108
|
void ping(std::set<service_type> services,
|
109
|
+
std::optional<std::chrono::milliseconds> timeout,
|
107
110
|
std::shared_ptr<Collector> collector,
|
108
111
|
const couchbase::core::cluster_credentials& credentials)
|
109
112
|
{
|
@@ -153,6 +156,7 @@ class http_session_manager
|
|
153
156
|
}
|
154
157
|
operations::http_noop_request request{};
|
155
158
|
request.type = type;
|
159
|
+
request.timeout = timeout;
|
156
160
|
auto cmd = std::make_shared<operations::http_command<operations::http_noop_request>>(
|
157
161
|
ctx_, request, tracer_, meter_, options_.default_timeout_for(request.type));
|
158
162
|
cmd->start([start = std::chrono::steady_clock::now(),
|
@@ -163,7 +167,11 @@ class http_session_manager
|
|
163
167
|
diag::ping_state state = diag::ping_state::ok;
|
164
168
|
std::optional<std::string> error{};
|
165
169
|
if (ec) {
|
166
|
-
|
170
|
+
if (ec == errc::common::unambiguous_timeout || ec == errc::common::ambiguous_timeout) {
|
171
|
+
state = diag::ping_state::timeout;
|
172
|
+
} else {
|
173
|
+
state = diag::ping_state::error;
|
174
|
+
}
|
167
175
|
error.emplace(fmt::format("code={}, message={}, http_code={}", ec.value(), ec.message(), msg.status_code));
|
168
176
|
}
|
169
177
|
handler->report(diag::endpoint_ping_info{
|
@@ -269,7 +269,7 @@ struct mcbp_command : public std::enable_shared_from_this<mcbp_command<Manager,
|
|
269
269
|
: errc::common::ambiguous_timeout));
|
270
270
|
}
|
271
271
|
if (ec == errc::common::request_canceled) {
|
272
|
-
if (
|
272
|
+
if (!self->request.retries.idempotent() && !allows_non_idempotent_retry(reason)) {
|
273
273
|
if (self->span_->uses_tags())
|
274
274
|
self->span_->add_tag(tracing::attributes::orphan, "canceled");
|
275
275
|
return self->invoke_handler(ec);
|
@@ -46,9 +46,10 @@ struct binary_header {
|
|
46
46
|
};
|
47
47
|
|
48
48
|
struct mcbp_message {
|
49
|
-
binary_header header;
|
50
|
-
std::vector<std::byte> body;
|
49
|
+
binary_header header{};
|
50
|
+
std::vector<std::byte> body{};
|
51
51
|
|
52
|
+
mcbp_message() = default;
|
52
53
|
mcbp_message(const mcbp_message& other) = delete;
|
53
54
|
mcbp_message& operator=(const mcbp_message& other) = delete;
|
54
55
|
mcbp_message(mcbp_message&& other) = default;
|
@@ -51,6 +51,7 @@
|
|
51
51
|
#include "streams.hxx"
|
52
52
|
|
53
53
|
#include <couchbase/build_config.hxx>
|
54
|
+
#include <couchbase/error_codes.hxx>
|
54
55
|
#include <couchbase/fmt/retry_reason.hxx>
|
55
56
|
|
56
57
|
#include <asio.hpp>
|
@@ -153,12 +154,12 @@ struct connection_endpoints {
|
|
153
154
|
connection_endpoints(asio::ip::tcp::endpoint remote_endpoint, asio::ip::tcp::endpoint local_endpoint)
|
154
155
|
: remote{ std::move(remote_endpoint) }
|
155
156
|
, remote_address{ remote.address().to_string() }
|
156
|
-
, remote_address_with_port{
|
157
|
-
|
158
|
-
remote.port()) }
|
157
|
+
, remote_address_with_port{ remote.protocol() == asio::ip::tcp::v6() ? fmt::format("[{}]:{}", remote_address, remote.port())
|
158
|
+
: fmt::format("{}:{}", remote_address, remote.port()) }
|
159
159
|
, local{ std::move(local_endpoint) }
|
160
160
|
, local_address{ local.address().to_string() }
|
161
|
-
, local_address_with_port{
|
161
|
+
, local_address_with_port{ local.protocol() == asio::ip::tcp::v6() ? fmt::format("[{}]:{}", local_address, local.port())
|
162
|
+
: fmt::format("{}:{}", local_address, local.port()) }
|
162
163
|
{
|
163
164
|
}
|
164
165
|
|
@@ -245,6 +246,7 @@ class mcbp_session_impl
|
|
245
246
|
}
|
246
247
|
if (session_->origin_.options().enable_clustermap_notification) {
|
247
248
|
hello_req.body().enable_clustermap_change_notification();
|
249
|
+
hello_req.body().enable_deduplicate_not_my_vbucket_clustermap();
|
248
250
|
}
|
249
251
|
if (session_->origin_.options().enable_compression) {
|
250
252
|
hello_req.body().enable_compression();
|
@@ -259,7 +261,7 @@ class mcbp_session_impl
|
|
259
261
|
CB_LOG_DEBUG("{} user_agent={}, requested_features=[{}]",
|
260
262
|
session_->log_prefix_,
|
261
263
|
user_agent,
|
262
|
-
utils::join_strings_fmt(
|
264
|
+
utils::join_strings_fmt(hello_req.body().features(), ", "));
|
263
265
|
session_->write(hello_req.data());
|
264
266
|
|
265
267
|
if (!session_->origin_.credentials().uses_certificate()) {
|
@@ -347,7 +349,7 @@ class mcbp_session_impl
|
|
347
349
|
session_->supported_features_ = resp.body().supported_features();
|
348
350
|
CB_LOG_DEBUG("{} supported_features=[{}]",
|
349
351
|
session_->log_prefix_,
|
350
|
-
utils::join_strings_fmt(
|
352
|
+
utils::join_strings_fmt(session_->supported_features_, ", "));
|
351
353
|
if (session_->origin_.credentials().uses_certificate()) {
|
352
354
|
CB_LOG_DEBUG("{} skip SASL authentication, because TLS certificate was specified",
|
353
355
|
session_->log_prefix_);
|
@@ -664,7 +666,18 @@ class mcbp_session_impl
|
|
664
666
|
Expects(protocol::is_valid_server_request_opcode(msg.header.opcode));
|
665
667
|
switch (static_cast<protocol::server_opcode>(msg.header.opcode)) {
|
666
668
|
case protocol::server_opcode::cluster_map_change_notification: {
|
667
|
-
protocol::
|
669
|
+
protocol::cmd_info info{ session_->bootstrap_hostname_, session_->bootstrap_port_number_ };
|
670
|
+
if (session_->origin_.options().dump_configuration) {
|
671
|
+
std::string_view config_text{ reinterpret_cast<const char*>(msg.body.data()), msg.body.size() };
|
672
|
+
CB_LOG_TRACE(
|
673
|
+
"{} configuration from cluster_map_change_notification request (size={}, endpoint=\"{}:{}\"), {}",
|
674
|
+
session_->log_prefix_,
|
675
|
+
config_text.size(),
|
676
|
+
info.endpoint_address,
|
677
|
+
info.endpoint_port,
|
678
|
+
config_text);
|
679
|
+
}
|
680
|
+
protocol::server_request<protocol::cluster_map_change_notification_request_body> req(std::move(msg), info);
|
668
681
|
std::optional<topology::configuration> config = req.body().config();
|
669
682
|
if (session_ && config.has_value()) {
|
670
683
|
if ((!config->bucket.has_value() && req.body().bucket().empty()) ||
|
@@ -730,6 +743,7 @@ class mcbp_session_impl
|
|
730
743
|
, bootstrap_deadline_(ctx_)
|
731
744
|
, connection_deadline_(ctx_)
|
732
745
|
, retry_backoff_(ctx_)
|
746
|
+
, ping_deadline_(ctx_)
|
733
747
|
, origin_{ std::move(origin) }
|
734
748
|
, bucket_name_{ std::move(bucket_name) }
|
735
749
|
, supported_features_{ std::move(known_features) }
|
@@ -754,6 +768,7 @@ class mcbp_session_impl
|
|
754
768
|
, bootstrap_deadline_(ctx_)
|
755
769
|
, connection_deadline_(ctx_)
|
756
770
|
, retry_backoff_(ctx_)
|
771
|
+
, ping_deadline_(ctx_)
|
757
772
|
, origin_(std::move(origin))
|
758
773
|
, bucket_name_(std::move(bucket_name))
|
759
774
|
, supported_features_(std::move(known_features))
|
@@ -798,7 +813,7 @@ class mcbp_session_impl
|
|
798
813
|
bucket_name_ };
|
799
814
|
}
|
800
815
|
|
801
|
-
void ping(std::shared_ptr<diag::ping_reporter> handler)
|
816
|
+
void ping(std::shared_ptr<diag::ping_reporter> handler, std::optional<std::chrono::milliseconds> timeout)
|
802
817
|
{
|
803
818
|
protocol::client_request<protocol::mcbp_noop_request_body> req;
|
804
819
|
req.opaque(next_opaque());
|
@@ -812,7 +827,11 @@ class mcbp_session_impl
|
|
812
827
|
diag::ping_state state = diag::ping_state::ok;
|
813
828
|
std::optional<std::string> error{};
|
814
829
|
if (ec) {
|
815
|
-
|
830
|
+
if (ec == errc::common::unambiguous_timeout || ec == errc::common::ambiguous_timeout) {
|
831
|
+
state = diag::ping_state::timeout;
|
832
|
+
} else {
|
833
|
+
state = diag::ping_state::error;
|
834
|
+
}
|
816
835
|
error.emplace(fmt::format("code={}, message={}, reason={}", ec.value(), ec.message(), reason));
|
817
836
|
}
|
818
837
|
handler->report({
|
@@ -826,6 +845,13 @@ class mcbp_session_impl
|
|
826
845
|
error,
|
827
846
|
});
|
828
847
|
});
|
848
|
+
ping_deadline_.expires_after(timeout.value_or(origin_.options().key_value_timeout));
|
849
|
+
ping_deadline_.async_wait([self = this->shared_from_this(), opaque = req.opaque()](std::error_code ec) {
|
850
|
+
if (ec == asio::error::operation_aborted) {
|
851
|
+
return;
|
852
|
+
}
|
853
|
+
static_cast<void>(self->cancel(opaque, errc::common::unambiguous_timeout, retry_reason::do_not_retry));
|
854
|
+
});
|
829
855
|
}
|
830
856
|
|
831
857
|
[[nodiscard]] mcbp_context context() const
|
@@ -850,8 +876,9 @@ class mcbp_session_impl
|
|
850
876
|
self->state_listener_->report_bootstrap_error(fmt::format("{}:{}", self->bootstrap_hostname_, self->bootstrap_port_), ec);
|
851
877
|
}
|
852
878
|
CB_LOG_WARNING("{} unable to bootstrap in time", self->log_prefix_);
|
853
|
-
auto h = std::move(self->bootstrap_callback_);
|
854
|
-
|
879
|
+
if (auto h = std::move(self->bootstrap_callback_); h) {
|
880
|
+
h(ec, {});
|
881
|
+
}
|
855
882
|
self->stop(retry_reason::do_not_retry);
|
856
883
|
});
|
857
884
|
initiate_bootstrap();
|
@@ -926,6 +953,7 @@ class mcbp_session_impl
|
|
926
953
|
bootstrap_deadline_.cancel();
|
927
954
|
connection_deadline_.cancel();
|
928
955
|
retry_backoff_.cancel();
|
956
|
+
ping_deadline_.cancel();
|
929
957
|
resolver_.cancel();
|
930
958
|
stream_->close([](std::error_code) {});
|
931
959
|
if (auto h = std::move(bootstrap_handler_); h) {
|
@@ -1024,8 +1052,10 @@ class mcbp_session_impl
|
|
1024
1052
|
}
|
1025
1053
|
}
|
1026
1054
|
|
1055
|
+
auto reason = status == static_cast<std::uint16_t>(key_value_status_code::not_my_vbucket) ? retry_reason::key_value_not_my_vbucket
|
1056
|
+
: retry_reason::do_not_retry;
|
1027
1057
|
if (fun) {
|
1028
|
-
fun(protocol::map_status_code(opcode, status),
|
1058
|
+
fun(protocol::map_status_code(opcode, status), reason, std::move(msg), decode_error_code(status));
|
1029
1059
|
return true;
|
1030
1060
|
}
|
1031
1061
|
|
@@ -1043,11 +1073,8 @@ class mcbp_session_impl
|
|
1043
1073
|
}
|
1044
1074
|
}
|
1045
1075
|
if (request) {
|
1046
|
-
handler->handle_response(
|
1047
|
-
|
1048
|
-
retry_reason::do_not_retry,
|
1049
|
-
std::move(msg),
|
1050
|
-
decode_error_code(status));
|
1076
|
+
handler->handle_response(
|
1077
|
+
std::move(request), protocol::map_status_code(opcode, status), reason, std::move(msg), decode_error_code(status));
|
1051
1078
|
return true;
|
1052
1079
|
}
|
1053
1080
|
return false;
|
@@ -1245,11 +1272,12 @@ class mcbp_session_impl
|
|
1245
1272
|
}
|
1246
1273
|
}
|
1247
1274
|
}
|
1275
|
+
config_.reset();
|
1248
1276
|
config_.emplace(std::move(config));
|
1249
1277
|
configured_ = true;
|
1250
1278
|
for (const auto& listener : config_listeners_) {
|
1251
|
-
asio::post(
|
1252
|
-
ctx_, [listener,
|
1279
|
+
asio::post(
|
1280
|
+
asio::bind_executor(ctx_, [listener, c = config_.value()]() mutable { return listener->update_config(std::move(c)); }));
|
1253
1281
|
}
|
1254
1282
|
}
|
1255
1283
|
|
@@ -1453,6 +1481,7 @@ class mcbp_session_impl
|
|
1453
1481
|
bootstrap_hostname_,
|
1454
1482
|
connection_endpoints_.remote_address,
|
1455
1483
|
connection_endpoints_.remote.port());
|
1484
|
+
parser_.reset();
|
1456
1485
|
bootstrap_handler_ = std::make_shared<bootstrap_handler>(shared_from_this());
|
1457
1486
|
connection_deadline_.cancel();
|
1458
1487
|
}
|
@@ -1602,6 +1631,7 @@ class mcbp_session_impl
|
|
1602
1631
|
asio::steady_timer bootstrap_deadline_;
|
1603
1632
|
asio::steady_timer connection_deadline_;
|
1604
1633
|
asio::steady_timer retry_backoff_;
|
1634
|
+
asio::steady_timer ping_deadline_;
|
1605
1635
|
couchbase::core::origin origin_;
|
1606
1636
|
std::optional<std::string> bucket_name_;
|
1607
1637
|
mcbp_parser parser_;
|
@@ -1827,9 +1857,9 @@ mcbp_session::supported_features() const
|
|
1827
1857
|
}
|
1828
1858
|
|
1829
1859
|
void
|
1830
|
-
mcbp_session::ping(std::shared_ptr<diag::ping_reporter> handler) const
|
1860
|
+
mcbp_session::ping(std::shared_ptr<diag::ping_reporter> handler, std::optional<std::chrono::milliseconds> timeout) const
|
1831
1861
|
{
|
1832
|
-
return impl_->ping(std::move(handler));
|
1862
|
+
return impl_->ping(std::move(handler), std::move(timeout));
|
1833
1863
|
}
|
1834
1864
|
|
1835
1865
|
bool
|
@@ -23,6 +23,7 @@
|
|
23
23
|
#include "mcbp_context.hxx"
|
24
24
|
#include "mcbp_message.hxx"
|
25
25
|
|
26
|
+
#include <chrono>
|
26
27
|
#include <cinttypes>
|
27
28
|
#include <memory>
|
28
29
|
#include <optional>
|
@@ -118,7 +119,7 @@ class mcbp_session
|
|
118
119
|
[[nodiscard]] bool has_config() const;
|
119
120
|
[[nodiscard]] diag::endpoint_diag_info diag_info() const;
|
120
121
|
void on_configuration_update(std::shared_ptr<config_listener> handler);
|
121
|
-
void ping(std::shared_ptr<diag::ping_reporter> handler) const;
|
122
|
+
void ping(std::shared_ptr<diag::ping_reporter> handler, std::optional<std::chrono::milliseconds> = {}) const;
|
122
123
|
[[nodiscard]] bool supports_gcccp() const;
|
123
124
|
[[nodiscard]] std::optional<key_value_error_map_info> decode_error_code(std::uint16_t code);
|
124
125
|
void handle_not_my_vbucket(const io::mcbp_message& msg) const;
|
@@ -178,16 +178,16 @@ log_protocol(const char* file, int line, const char* function, std::string_view
|
|
178
178
|
* @param msg message to log
|
179
179
|
* @param args the formatting arguments
|
180
180
|
*/
|
181
|
-
template<typename
|
181
|
+
template<typename... Args>
|
182
182
|
inline void
|
183
|
-
log(const char* file, int line, const char* function, level lvl,
|
183
|
+
log(const char* file, int line, const char* function, level lvl, fmt::format_string<Args...> msg, Args&&... args)
|
184
184
|
{
|
185
185
|
detail::log(file, line, function, lvl, fmt::format(msg, std::forward<Args>(args)...));
|
186
186
|
}
|
187
187
|
|
188
|
-
template<typename
|
188
|
+
template<typename... Args>
|
189
189
|
inline void
|
190
|
-
log_protocol(const char* file, int line, const char* function,
|
190
|
+
log_protocol(const char* file, int line, const char* function, fmt::format_string<Args...> msg, Args&&... args)
|
191
191
|
{
|
192
192
|
detail::log_protocol(file, line, function, fmt::format(msg, std::forward<Args>(args)...));
|
193
193
|
}
|
@@ -116,7 +116,7 @@ struct bucket_settings {
|
|
116
116
|
bucket_eviction_policy eviction_policy{ bucket_eviction_policy::unknown };
|
117
117
|
bucket_conflict_resolution conflict_resolution_type{ bucket_conflict_resolution::unknown };
|
118
118
|
std::optional<bool> history_retention_collection_default{};
|
119
|
-
std::optional<std::uint32_t> history_retention_bytes;
|
119
|
+
std::optional<std::uint32_t> history_retention_bytes{};
|
120
120
|
std::optional<std::uint32_t> history_retention_duration{};
|
121
121
|
|
122
122
|
/**
|
@@ -73,3 +73,31 @@
|
|
73
73
|
#define COUCHBASE_CXX_CLIENT_HAS_COLLECTION_QUERY_INDEX_MANAGEMENT 1
|
74
74
|
|
75
75
|
#define COUCHBASE_CXX_CLIENT_TRANSACTIONS_EXT_PARALLEL_UNSTAGING
|
76
|
+
|
77
|
+
/**
|
78
|
+
* core cluster implementation has been hidden and not accessible through the public API
|
79
|
+
*/
|
80
|
+
#define COUCHBASE_CXX_CLIENT_HAS_CORE_CLUSTER_HIDDEN 1
|
81
|
+
|
82
|
+
/**
|
83
|
+
* expiration_time has been renamed to timeout in transactions_options and transactions_config
|
84
|
+
* kv_timeout removed from transactions_options and transactions_config
|
85
|
+
*/
|
86
|
+
#define COUCHBASE_CXX_CLIENT_TRANSACTIONS_OPTIONS_HAVE_TIMEOUT 1
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Search index management is accessible from the public API
|
90
|
+
* couchbase::cluster::search_indexes() support
|
91
|
+
*/
|
92
|
+
#define COUCHBASE_CXX_CLIENT_HAS_PUBLIC_SEARCH_INDEX_MANAGEMENT 1
|
93
|
+
|
94
|
+
/**
|
95
|
+
* FTS is accessible from the public API
|
96
|
+
* couchbase::cluster::search_query() and couchbase::scope::search_query() support
|
97
|
+
*/
|
98
|
+
#define COUCHBASE_CXX_CLIENT_HAS_PUBLIC_SEARCH 1
|
99
|
+
|
100
|
+
/**
|
101
|
+
* The document not locked (couchbase::errc::key_value::document_not_locked) error code is supported
|
102
|
+
*/
|
103
|
+
#define COUCHBASE_CXX_CLIENT_HAS_ERRC_DOCUMENT_NOT_LOCKED 1
|
@@ -26,6 +26,7 @@
|
|
26
26
|
#include <couchbase/error_codes.hxx>
|
27
27
|
|
28
28
|
#include <gsl/assert>
|
29
|
+
#include <regex>
|
29
30
|
|
30
31
|
namespace couchbase::core::operations
|
31
32
|
{
|
@@ -236,7 +237,9 @@ query_request::make_response(error_context::query&& ctx, const encoded_response_
|
|
236
237
|
response.ctx.client_context_id);
|
237
238
|
}
|
238
239
|
}
|
239
|
-
|
240
|
+
if (const auto* s = payload.find("status"); s != nullptr) {
|
241
|
+
response.meta.status = payload.at("status").get_string();
|
242
|
+
}
|
240
243
|
if (const auto* s = payload.find("signature"); s != nullptr) {
|
241
244
|
response.meta.signature = couchbase::core::utils::json::generate(*s);
|
242
245
|
}
|
@@ -342,6 +345,19 @@ query_request::make_response(error_context::query&& ctx, const encoded_response_
|
|
342
345
|
case 4090: /* IKey: "plan.build_prepared.name_not_in_encoded_plan" */
|
343
346
|
response.ctx.ec = errc::query::prepared_statement_failure;
|
344
347
|
break;
|
348
|
+
case 4300: /* IKey: "plan.new_index_already_exists" */
|
349
|
+
response.ctx.ec = errc::common::index_exists;
|
350
|
+
break;
|
351
|
+
case 5000: /* IKey: "Internal Error" */
|
352
|
+
if (std::regex_search(response.ctx.first_error_message, std::regex{ ".*[iI]ndex .*already exist.*" })) {
|
353
|
+
response.ctx.ec = errc::common::index_exists;
|
354
|
+
} else if (response.ctx.first_error_message.find("Index does not exist") != std::string::npos ||
|
355
|
+
std::regex_search(response.ctx.first_error_message, std::regex{ ".*[iI]ndex .*[nN]ot [fF]ound.*" })) {
|
356
|
+
response.ctx.ec = errc::common::index_not_found;
|
357
|
+
} else if (response.ctx.first_error_message.find("Bucket Not Found") != std::string::npos) {
|
358
|
+
response.ctx.ec = errc::common::bucket_not_found;
|
359
|
+
}
|
360
|
+
break;
|
345
361
|
case 12009: /* IKey: "datastore.couchbase.DML_error" */
|
346
362
|
if (response.ctx.first_error_message.find("CAS mismatch") != std::string::npos) {
|
347
363
|
response.ctx.ec = errc::common::cas_mismatch;
|
@@ -31,7 +31,7 @@ std::error_code
|
|
31
31
|
bucket_create_request::encode_to(encoded_request_type& encoded, http_context& /* context */) const
|
32
32
|
{
|
33
33
|
encoded.method = "POST";
|
34
|
-
encoded.path =
|
34
|
+
encoded.path = "/pools/default/buckets";
|
35
35
|
|
36
36
|
encoded.headers["content-type"] = "application/x-www-form-urlencoded";
|
37
37
|
encoded.body.append(fmt::format("name={}", utils::string_codec::form_encode(bucket.name)));
|
@@ -19,13 +19,15 @@
|
|
19
19
|
#include "core/utils/url_codec.hxx"
|
20
20
|
#include "error_utils.hxx"
|
21
21
|
|
22
|
+
#include <fmt/core.h>
|
23
|
+
|
22
24
|
namespace couchbase::core::operations::management
|
23
25
|
{
|
24
26
|
std::error_code
|
25
27
|
change_password_request::encode_to(encoded_request_type& encoded, http_context& /* context */) const
|
26
28
|
{
|
27
29
|
encoded.method = "POST";
|
28
|
-
encoded.path =
|
30
|
+
encoded.path = "/controller/changePassword";
|
29
31
|
encoded.headers["content-type"] = "application/x-www-form-urlencoded";
|
30
32
|
encoded.body = fmt::format("password={}", utils::string_codec::form_encode(newPassword));
|
31
33
|
|