couchbase 3.8.2 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/CMakeLists.txt +16 -1
- data/ext/cache/cpm/{CPM_0.42.0.cmake → CPM_0.43.1.cmake} +18 -2
- data/ext/cache/extconf_include.rb +6 -6
- data/ext/cache/mozilla-ca-bundle.crt +121 -55
- data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
- data/ext/couchbase/CMakeLists.txt +130 -21
- data/ext/couchbase/cmake/APKBUILD.in +25 -4
- data/ext/couchbase/cmake/Bundler.cmake +143 -34
- data/ext/couchbase/cmake/CPM.cmake +126 -12
- data/ext/couchbase/cmake/Cache.cmake +7 -1
- data/ext/couchbase/cmake/CompilerOptions.cmake +1 -1
- data/ext/couchbase/cmake/CompilerWarnings.cmake +17 -6
- data/ext/couchbase/cmake/GrpcProtobuf.cmake +481 -0
- data/ext/couchbase/cmake/OpenSSL.cmake +10 -3
- data/ext/couchbase/cmake/Packaging.cmake +519 -65
- data/ext/couchbase/cmake/Protostellar.cmake +250 -0
- data/ext/couchbase/cmake/Sanitizers.cmake +61 -50
- data/ext/couchbase/cmake/StaticAnalyzers.cmake +16 -5
- data/ext/couchbase/cmake/TestFramework.cmake +283 -0
- data/ext/couchbase/cmake/TestFrameworkAddTests.cmake +51 -0
- data/ext/couchbase/cmake/Testing.cmake +27 -9
- data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +141 -8
- data/ext/couchbase/cmake/VersionInfo.cmake +50 -0
- data/ext/couchbase/cmake/build_config.hxx.in +2 -1
- data/ext/couchbase/cmake/couchbase-cxx-client.spec.in +101 -23
- data/ext/couchbase/cmake/couchbase_cxx_client_static-config.cmake.in +7 -0
- data/ext/couchbase/cmake/couchbase_cxx_client_static.pc.in +2 -0
- data/ext/couchbase/cmake/gRPC_Generate.cmake +58 -0
- data/ext/couchbase/cmake/protobuf_Generate.cmake +69 -0
- data/ext/couchbase/cmake/require-git-checkout.cmake +25 -0
- data/ext/couchbase/cmake/tarball_glob.txt +49 -0
- data/ext/couchbase/core/agent_group.cxx +0 -8
- data/ext/couchbase/core/agent_group.hxx +0 -4
- data/ext/couchbase/core/analytics_stream.cxx +314 -0
- data/ext/couchbase/core/analytics_stream.hxx +129 -0
- data/ext/couchbase/core/analytics_stream_component.cxx +245 -0
- data/ext/couchbase/core/analytics_stream_component.hxx +67 -0
- data/ext/couchbase/core/app_telemetry_meter.cxx +25 -3
- data/ext/couchbase/core/app_telemetry_meter.hxx +77 -0
- data/ext/couchbase/core/app_telemetry_reporter.cxx +7 -6
- data/ext/couchbase/core/bucket.cxx +381 -87
- data/ext/couchbase/core/bucket.hxx +105 -25
- data/ext/couchbase/core/bucket_unit_test_api.hxx +57 -0
- data/ext/couchbase/core/capella.hxx +91 -0
- data/ext/couchbase/core/cluster.cxx +1554 -398
- data/ext/couchbase/core/cluster.hxx +39 -8
- data/ext/couchbase/core/cluster_agent.cxx +0 -8
- data/ext/couchbase/core/cluster_agent.hxx +0 -4
- data/ext/couchbase/core/cluster_options.hxx +26 -3
- data/ext/couchbase/core/collections_component.cxx +39 -15
- data/ext/couchbase/core/config_profiles.cxx +1 -1
- data/ext/couchbase/core/crud_component.cxx +2 -2
- data/ext/couchbase/core/crud_options.hxx +34 -0
- data/ext/couchbase/core/crypto/cbcrypto.cc +18 -13
- data/ext/couchbase/core/document_id_redaction.hxx +81 -0
- data/ext/couchbase/core/error_context/base_error_context.hxx +7 -6
- data/ext/couchbase/core/error_context/key_value.cxx +25 -2
- data/ext/couchbase/core/error_context/key_value.hxx +60 -33
- data/ext/couchbase/core/error_context/key_value_error_context.hxx +16 -15
- data/ext/couchbase/core/error_context/search.hxx +5 -0
- data/ext/couchbase/core/error_context/search_json.hxx +3 -0
- data/ext/couchbase/core/error_context/subdocument_error_context.hxx +19 -18
- data/ext/couchbase/core/error_context/view.hxx +5 -0
- data/ext/couchbase/core/free_form_http_request.cxx +237 -4
- data/ext/couchbase/core/free_form_http_request.hxx +41 -8
- data/ext/couchbase/core/http_component.cxx +300 -284
- data/ext/couchbase/core/http_component.hxx +0 -4
- data/ext/couchbase/core/impl/analytics.cxx +38 -5
- data/ext/couchbase/core/impl/analytics.hxx +34 -0
- data/ext/couchbase/core/impl/bootstrap_error.hxx +0 -3
- data/ext/couchbase/core/impl/collection.cxx +215 -202
- data/ext/couchbase/core/impl/collection_manager.cxx +1 -1
- data/ext/couchbase/core/impl/dns_srv_tracker.cxx +45 -18
- data/ext/couchbase/core/impl/error.cxx +22 -2
- data/ext/couchbase/core/impl/internal_analytics_stream_result.hxx +111 -0
- data/ext/couchbase/core/impl/internal_query_stream_result.hxx +110 -0
- data/ext/couchbase/core/impl/invoke_with_node_id.hxx +15 -7
- data/ext/couchbase/core/impl/key_value_error_category.cxx +6 -0
- data/ext/couchbase/core/impl/lookup_in_replica.cxx +10 -10
- data/ext/couchbase/core/impl/lookup_in_replica.hxx +4 -4
- data/ext/couchbase/core/impl/node_id.cxx +49 -13
- data/ext/couchbase/core/impl/observability_recorder.cxx +12 -2
- data/ext/couchbase/core/impl/observe_poll.cxx +63 -23
- data/ext/couchbase/core/impl/public_analytics_stream_result.cxx +372 -0
- data/ext/couchbase/core/impl/public_bucket.cxx +48 -2
- data/ext/couchbase/core/impl/public_cluster.cxx +229 -42
- data/ext/couchbase/core/impl/public_query_stream_result.cxx +380 -0
- data/ext/couchbase/core/impl/public_transaction_get_multi_replicas_from_preferred_server_group_result.cxx +42 -0
- data/ext/couchbase/core/impl/public_transaction_get_multi_result.cxx +42 -0
- data/ext/couchbase/core/impl/query.cxx +76 -7
- data/ext/couchbase/core/impl/query.hxx +36 -0
- data/ext/couchbase/core/impl/query_index_manager.cxx +54 -1
- data/ext/couchbase/core/impl/replica_utils.cxx +101 -0
- data/ext/couchbase/core/impl/replica_utils.hxx +64 -0
- data/ext/couchbase/core/impl/resolve_node_id.hxx +125 -0
- data/ext/couchbase/core/impl/scope.cxx +70 -0
- data/ext/couchbase/core/impl/search.cxx +31 -1
- data/ext/couchbase/core/impl/transactions.cxx +130 -0
- data/ext/couchbase/core/impl/wait_until_ready.cxx +439 -0
- data/ext/couchbase/core/impl/wait_until_ready.hxx +110 -0
- data/ext/couchbase/core/impl/with_bucket_config_or_timeout.hxx +180 -0
- data/ext/couchbase/core/impl/with_cancellation.hxx +11 -3
- data/ext/couchbase/core/io/configuration_belongs_to_session.hxx +1 -2
- data/ext/couchbase/core/io/dns_client.cxx +122 -45
- data/ext/couchbase/core/io/dns_codec.hxx +21 -21
- data/ext/couchbase/core/io/dns_config.cxx +21 -6
- data/ext/couchbase/core/io/http_command.hxx +149 -121
- data/ext/couchbase/core/io/http_error.hxx +107 -0
- data/ext/couchbase/core/io/http_parser.cxx +4 -0
- data/ext/couchbase/core/io/http_session.cxx +606 -154
- data/ext/couchbase/core/io/http_session.hxx +147 -30
- data/ext/couchbase/core/io/http_session_manager.hxx +329 -382
- data/ext/couchbase/core/io/http_streaming_parser.cxx +4 -0
- data/ext/couchbase/core/io/http_streaming_response.cxx +328 -43
- data/ext/couchbase/core/io/http_streaming_response.hxx +37 -3
- data/ext/couchbase/core/io/mcbp_buffer_pool.hxx +122 -0
- data/ext/couchbase/core/io/mcbp_command.hxx +150 -51
- data/ext/couchbase/core/io/mcbp_command_id.hxx +45 -0
- data/ext/couchbase/core/io/mcbp_message.cxx +9 -1
- data/ext/couchbase/core/io/mcbp_message.hxx +19 -0
- data/ext/couchbase/core/io/mcbp_output_queue.hxx +150 -0
- data/ext/couchbase/core/io/mcbp_parser.cxx +24 -7
- data/ext/couchbase/core/io/mcbp_session.cxx +309 -301
- data/ext/couchbase/core/io/mcbp_session.hxx +27 -18
- data/ext/couchbase/core/io/opaque_ring_table.hxx +145 -0
- data/ext/couchbase/core/io/retry_orchestrator.hxx +6 -5
- data/ext/couchbase/core/io/stream_deadline.hxx +50 -0
- data/ext/couchbase/core/io/streams.cxx +151 -21
- data/ext/couchbase/core/io/streams.hxx +48 -1
- data/ext/couchbase/core/logger/logger.cxx +36 -0
- data/ext/couchbase/core/logger/logger.hxx +46 -6
- data/ext/couchbase/core/logger/redaction.hxx +503 -0
- data/ext/couchbase/core/management/eventing_status.hxx +10 -0
- data/ext/couchbase/core/management/eventing_status_json.hxx +4 -0
- data/ext/couchbase/core/mcbp/big_endian.cxx +1 -1
- data/ext/couchbase/core/mcbp/codec.cxx +27 -18
- data/ext/couchbase/core/mcbp/operation_queue.cxx +2 -2
- data/ext/couchbase/core/mcbp/packet.hxx +2 -2
- data/ext/couchbase/core/mcbp/queue_request.cxx +23 -6
- data/ext/couchbase/core/mcbp/queue_request.hxx +21 -0
- data/ext/couchbase/core/meta/features.hxx +13 -0
- data/ext/couchbase/core/meta/version.cxx +6 -3
- data/ext/couchbase/core/metrics/logging_meter.cxx +5 -10
- data/ext/couchbase/core/metrics/meter_wrapper.cxx +63 -33
- data/ext/couchbase/core/metrics/meter_wrapper.hxx +55 -3
- data/ext/couchbase/core/operations/analytics_response_parsing.cxx +177 -0
- data/ext/couchbase/core/operations/analytics_response_parsing.hxx +55 -0
- data/ext/couchbase/core/operations/document_analytics.cxx +48 -130
- data/ext/couchbase/core/operations/document_analytics.hxx +14 -2
- data/ext/couchbase/core/operations/document_get_all_replicas.hxx +15 -7
- data/ext/couchbase/core/operations/document_get_any_replica.hxx +19 -8
- data/ext/couchbase/core/operations/document_get_projected.cxx +1 -1
- data/ext/couchbase/core/{impl/get_replica.cxx → operations/document_get_replica.cxx} +21 -3
- data/ext/couchbase/core/{impl/get_replica.hxx → operations/document_get_replica.hxx} +31 -4
- data/ext/couchbase/core/operations/document_lookup_in.cxx +10 -10
- data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +228 -198
- data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +215 -217
- data/ext/couchbase/core/operations/document_query.cxx +108 -221
- data/ext/couchbase/core/operations/document_query.hxx +18 -4
- data/ext/couchbase/core/operations/document_search.cxx +52 -8
- data/ext/couchbase/core/operations/document_search.hxx +3 -0
- data/ext/couchbase/core/operations/document_view.cxx +3 -3
- data/ext/couchbase/core/operations/management/analytics_dataset_create.cxx +15 -8
- data/ext/couchbase/core/operations/management/analytics_dataset_create.hxx +4 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_drop.cxx +11 -6
- data/ext/couchbase/core/operations/management/analytics_dataset_get_all.cxx +3 -2
- data/ext/couchbase/core/operations/management/analytics_dataverse_create.cxx +10 -5
- data/ext/couchbase/core/operations/management/analytics_dataverse_drop.cxx +10 -5
- data/ext/couchbase/core/operations/management/analytics_get_pending_mutations.cxx +2 -1
- data/ext/couchbase/core/operations/management/analytics_index_create.cxx +33 -8
- data/ext/couchbase/core/operations/management/analytics_index_drop.cxx +12 -7
- data/ext/couchbase/core/operations/management/analytics_index_get_all.cxx +3 -2
- data/ext/couchbase/core/operations/management/analytics_link_connect.cxx +11 -6
- data/ext/couchbase/core/operations/management/analytics_link_create.cxx +3 -3
- data/ext/couchbase/core/operations/management/analytics_link_disconnect.cxx +10 -4
- data/ext/couchbase/core/operations/management/analytics_link_drop.cxx +6 -4
- data/ext/couchbase/core/operations/management/analytics_link_get_all.cxx +4 -3
- data/ext/couchbase/core/operations/management/analytics_link_replace.cxx +3 -3
- data/ext/couchbase/core/operations/management/analytics_link_utils.hxx +1 -1
- data/ext/couchbase/core/operations/management/change_password.cxx +2 -0
- data/ext/couchbase/core/operations/management/collection_drop.cxx +5 -1
- data/ext/couchbase/core/operations/management/error_utils.cxx +59 -5
- data/ext/couchbase/core/operations/management/error_utils.hxx +29 -1
- data/ext/couchbase/core/operations/management/eventing_deploy_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_drop_function.cxx +8 -3
- data/ext/couchbase/core/operations/management/eventing_get_all_functions.cxx +4 -2
- data/ext/couchbase/core/operations/management/eventing_get_function.cxx +5 -3
- data/ext/couchbase/core/operations/management/eventing_get_status.cxx +4 -2
- data/ext/couchbase/core/operations/management/eventing_pause_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_resume_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_undeploy_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/eventing_upsert_function.cxx +9 -3
- data/ext/couchbase/core/operations/management/group_drop.cxx +3 -1
- data/ext/couchbase/core/operations/management/group_get.cxx +3 -1
- data/ext/couchbase/core/operations/management/group_upsert.cxx +11 -8
- data/ext/couchbase/core/operations/management/query_index_build.cxx +5 -2
- data/ext/couchbase/core/operations/management/query_index_create.cxx +9 -3
- data/ext/couchbase/core/operations/management/query_index_drop.cxx +11 -4
- data/ext/couchbase/core/operations/management/query_index_get_all.cxx +1 -1
- data/ext/couchbase/core/operations/management/query_index_get_all_deferred.cxx +1 -1
- data/ext/couchbase/core/operations/management/scope_drop.cxx +5 -1
- data/ext/couchbase/core/operations/management/scope_get_all.cxx +6 -1
- data/ext/couchbase/core/operations/management/search_get_stats.cxx +10 -0
- data/ext/couchbase/core/operations/management/search_index_analyze_document.cxx +3 -2
- data/ext/couchbase/core/operations/management/search_index_control_ingest.cxx +4 -3
- data/ext/couchbase/core/operations/management/search_index_control_plan_freeze.cxx +4 -3
- data/ext/couchbase/core/operations/management/search_index_control_query.cxx +4 -3
- data/ext/couchbase/core/operations/management/search_index_drop.cxx +2 -2
- data/ext/couchbase/core/operations/management/search_index_get.cxx +2 -2
- data/ext/couchbase/core/operations/management/search_index_get_documents_count.cxx +3 -2
- data/ext/couchbase/core/operations/management/search_index_get_stats.cxx +3 -1
- data/ext/couchbase/core/operations/management/search_index_upsert.cxx +2 -2
- data/ext/couchbase/core/operations/management/user_drop.cxx +3 -1
- data/ext/couchbase/core/operations/management/user_get.cxx +3 -1
- data/ext/couchbase/core/operations/management/user_upsert.cxx +12 -9
- data/ext/couchbase/core/operations/management/view_index_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_get.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_upsert.cxx +1 -1
- data/ext/couchbase/core/operations/operation_traits.hxx +18 -0
- data/ext/couchbase/core/operations/query_response_parsing.cxx +211 -0
- data/ext/couchbase/core/operations/query_response_parsing.hxx +60 -0
- data/ext/couchbase/core/operations_fwd.hxx +3 -3
- data/ext/couchbase/core/origin.cxx +54 -26
- data/ext/couchbase/core/origin.hxx +12 -0
- data/ext/couchbase/core/orphan_reporter.cxx +2 -1
- data/ext/couchbase/core/platform/random.cc +7 -7
- data/ext/couchbase/core/protocol/client_request.cxx +2 -2
- data/ext/couchbase/core/protocol/client_request.hxx +38 -21
- data/ext/couchbase/core/protocol/client_response.cxx +11 -3
- data/ext/couchbase/core/protocol/client_response.hxx +27 -6
- data/ext/couchbase/core/protocol/cmd_append.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_cluster_map_change_notification.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_decrement.cxx +6 -6
- data/ext/couchbase/core/protocol/cmd_get.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_get_and_lock.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_get_and_touch.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_get_cluster_config.cxx +6 -4
- data/ext/couchbase/core/protocol/cmd_get_collection_id.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_get_error_map.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_get_meta.cxx +4 -4
- data/ext/couchbase/core/protocol/cmd_get_replica.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_hello.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_increment.cxx +6 -6
- data/ext/couchbase/core/protocol/cmd_insert.cxx +4 -4
- data/ext/couchbase/core/protocol/cmd_lookup_in.cxx +4 -3
- data/ext/couchbase/core/protocol/cmd_lookup_in_replica.cxx +4 -3
- data/ext/couchbase/core/protocol/cmd_mutate_in.cxx +10 -9
- data/ext/couchbase/core/protocol/cmd_mutate_in.hxx +10 -10
- data/ext/couchbase/core/protocol/cmd_observe_seqno.cxx +7 -7
- data/ext/couchbase/core/protocol/cmd_prepend.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_remove.cxx +2 -2
- data/ext/couchbase/core/protocol/cmd_replace.cxx +4 -4
- data/ext/couchbase/core/protocol/cmd_touch.cxx +1 -1
- data/ext/couchbase/core/protocol/cmd_upsert.cxx +4 -4
- data/ext/couchbase/core/protocol/datatype.hxx +118 -1
- data/ext/couchbase/core/protocol/frame_info_utils.cxx +1 -1
- data/ext/couchbase/core/protocol/magic.hxx +4 -0
- data/ext/couchbase/core/protocol/magic_fmt.hxx +3 -0
- data/ext/couchbase/core/protocol/server_request.hxx +3 -1
- data/ext/couchbase/core/protocol/status.cxx +1 -1
- data/ext/couchbase/core/protostellar/analytics_converter.hxx +171 -0
- data/ext/couchbase/core/protostellar/bucket_admin_converter.hxx +301 -0
- data/ext/couchbase/core/protostellar/collection_admin_converter.hxx +92 -0
- data/ext/couchbase/core/protostellar/component.cxx +2445 -0
- data/ext/couchbase/core/protostellar/component.hxx +391 -0
- data/ext/couchbase/core/{columnar/bootstrap_notification_subscriber.hxx → protostellar/compression_settings.hxx} +11 -10
- data/ext/couchbase/core/protostellar/credentials.cxx +233 -0
- data/ext/couchbase/core/protostellar/credentials.hxx +88 -0
- data/ext/couchbase/core/protostellar/dispatcher.cxx +57 -0
- data/ext/couchbase/core/protostellar/dispatcher.hxx +482 -0
- data/ext/couchbase/core/protostellar/error_utils.cxx +293 -0
- data/ext/couchbase/core/protostellar/error_utils.hxx +97 -0
- data/ext/couchbase/core/protostellar/json_payload.hxx +49 -0
- data/ext/couchbase/core/protostellar/kv_converter.cxx +70 -0
- data/ext/couchbase/core/protostellar/kv_converter.hxx +600 -0
- data/ext/couchbase/core/protostellar/query_converter.hxx +265 -0
- data/ext/couchbase/core/protostellar/query_index_admin_converter.hxx +291 -0
- data/ext/couchbase/core/protostellar/query_proto.hxx +73 -0
- data/ext/couchbase/core/protostellar/search_converter.hxx +244 -0
- data/ext/couchbase/core/protostellar/search_index_admin_converter.hxx +156 -0
- data/ext/couchbase/core/protostellar/view_converter.hxx +158 -0
- data/ext/couchbase/core/query_stream.cxx +447 -0
- data/ext/couchbase/core/query_stream.hxx +141 -0
- data/ext/couchbase/core/query_stream_component.cxx +243 -0
- data/ext/couchbase/core/query_stream_component.hxx +68 -0
- data/ext/couchbase/core/range_scan_load_balancer.cxx +15 -8
- data/ext/couchbase/core/range_scan_orchestrator.cxx +15 -3
- data/ext/couchbase/core/response_handler.hxx +41 -4
- data/ext/couchbase/core/row_streamer.cxx +332 -46
- data/ext/couchbase/core/row_streamer.hxx +31 -1
- data/ext/couchbase/core/row_streamer_options.hxx +55 -0
- data/ext/couchbase/core/sasl/client.h +3 -0
- data/ext/couchbase/core/search_scoring.hxx +66 -0
- data/ext/couchbase/core/stream_error_details.hxx +69 -0
- data/ext/couchbase/core/timeout_defaults.hxx +0 -1
- data/ext/couchbase/core/topology/capabilities.hxx +6 -0
- data/ext/couchbase/core/topology/capabilities_fmt.hxx +3 -0
- data/ext/couchbase/core/topology/configuration.cxx +21 -6
- data/ext/couchbase/core/topology/configuration.hxx +29 -8
- data/ext/couchbase/core/topology/configuration_json.hxx +3 -0
- data/ext/couchbase/core/topology/error_map_json.hxx +3 -1
- data/ext/couchbase/core/tracing/threshold_logging_tracer.cxx +70 -4
- data/ext/couchbase/core/tracing/threshold_logging_tracer.hxx +10 -0
- data/ext/couchbase/core/transactions/active_transaction_record.cxx +0 -34
- data/ext/couchbase/core/transactions/attempt_context_impl.cxx +108 -63
- data/ext/couchbase/core/transactions/attempt_context_impl.hxx +19 -2
- data/ext/couchbase/core/transactions/error_list.hxx +2 -2
- data/ext/couchbase/core/transactions/get_multi_fetch.hxx +160 -0
- data/ext/couchbase/core/transactions/get_multi_orchestrator.cxx +326 -125
- data/ext/couchbase/core/transactions/get_multi_transaction_id.hxx +62 -0
- data/ext/couchbase/core/transactions/internal/atr_entry.hxx +22 -2
- data/ext/couchbase/core/transactions/internal/transaction_context.hxx +2 -2
- data/ext/couchbase/core/transactions/internal/transactions_cleanup.hxx +23 -1
- data/ext/couchbase/core/transactions/internal/utils.hxx +50 -14
- data/ext/couchbase/core/transactions/staged_mutation.cxx +23 -18
- data/ext/couchbase/core/transactions/staged_mutation.hxx +15 -4
- data/ext/couchbase/core/transactions/transaction_context.cxx +55 -40
- data/ext/couchbase/core/transactions/transaction_get_result.hxx +16 -0
- data/ext/couchbase/core/transactions/transactions.cxx +3 -55
- data/ext/couchbase/core/transactions/transactions_cleanup.cxx +165 -72
- data/ext/couchbase/core/transactions/transactions_config.cxx +0 -11
- data/ext/couchbase/core/transactions/utils.cxx +10 -0
- data/ext/couchbase/core/transactions/waitable_op_list.hxx +2 -2
- data/ext/couchbase/core/transactions.hxx +9 -9
- data/ext/couchbase/core/utils/byteswap.hxx +166 -9
- data/ext/couchbase/core/utils/connection_string.cxx +50 -85
- data/ext/couchbase/core/utils/connection_string.hxx +15 -0
- data/ext/couchbase/core/{columnar/backoff_calculator.hxx → utils/deadline.hxx} +13 -13
- data/ext/couchbase/core/utils/duration_parser.cxx +1 -1
- data/ext/couchbase/core/utils/json_streaming_lexer.cxx +48 -5
- data/ext/couchbase/core/utils/json_streaming_lexer.hxx +4 -1
- data/ext/couchbase/core/utils/movable_function.hxx +301 -52
- data/ext/couchbase/core/utils/name_codec.hxx +154 -11
- data/ext/couchbase/core/{columnar/retry_info.hxx → utils/process_id.hxx} +18 -13
- data/ext/couchbase/core/utils/url_codec.cxx +12 -51
- data/ext/couchbase/core/websocket_codec.cxx +3 -29
- data/ext/couchbase/couchbase/analytics_options.hxx +21 -10
- data/ext/couchbase/couchbase/analytics_row.hxx +105 -0
- data/ext/couchbase/couchbase/analytics_stream_result.hxx +266 -0
- data/ext/couchbase/couchbase/boolean_query.hxx +3 -3
- data/ext/couchbase/couchbase/bucket.hxx +57 -0
- data/ext/couchbase/couchbase/cluster.hxx +183 -5
- data/ext/couchbase/{core/columnar/security_options.hxx → couchbase/cluster_state.hxx} +18 -14
- data/ext/couchbase/couchbase/codec/lenient_json_transcoder.hxx +69 -0
- data/ext/couchbase/couchbase/collection.hxx +234 -14
- data/ext/couchbase/couchbase/common_durability_options.hxx +18 -3
- data/ext/couchbase/couchbase/conjunction_query.hxx +1 -1
- data/ext/couchbase/couchbase/create_dataset_analytics_options.hxx +6 -1
- data/ext/couchbase/couchbase/date_range_query.hxx +2 -2
- data/ext/couchbase/couchbase/decrement_options.hxx +1 -1
- data/ext/couchbase/couchbase/disjunction_query.hxx +1 -1
- data/ext/couchbase/couchbase/error.hxx +32 -0
- data/ext/couchbase/couchbase/error_codes.hxx +32 -0
- data/ext/couchbase/couchbase/geo_bounding_box_query.hxx +1 -1
- data/ext/couchbase/couchbase/geo_distance_query.hxx +1 -1
- data/ext/couchbase/couchbase/geo_polygon_query.hxx +1 -1
- data/ext/couchbase/couchbase/get_replica_options.hxx +68 -0
- data/ext/couchbase/couchbase/get_replica_result.hxx +5 -3
- data/ext/couchbase/couchbase/get_replica_strategy.hxx +161 -0
- data/ext/couchbase/couchbase/get_result.hxx +1 -0
- data/ext/couchbase/couchbase/increment_options.hxx +1 -1
- data/ext/couchbase/couchbase/insert_options.hxx +1 -1
- data/ext/couchbase/couchbase/match_phrase_query.hxx +1 -1
- data/ext/couchbase/couchbase/match_query.hxx +1 -1
- data/ext/couchbase/couchbase/mutate_in_options.hxx +3 -3
- data/ext/couchbase/couchbase/network_options.hxx +1 -1
- data/ext/couchbase/couchbase/node_id.hxx +42 -14
- data/ext/couchbase/couchbase/node_id_for_options.hxx +7 -1
- data/ext/couchbase/couchbase/node_ids_options.hxx +8 -2
- data/ext/couchbase/couchbase/numeric_range_query.hxx +1 -1
- data/ext/couchbase/couchbase/phrase_query.hxx +1 -1
- data/ext/couchbase/couchbase/prefix_query.hxx +1 -1
- data/ext/couchbase/couchbase/query_options.hxx +23 -12
- data/ext/couchbase/couchbase/query_row.hxx +111 -0
- data/ext/couchbase/couchbase/query_stream_result.hxx +302 -0
- data/ext/couchbase/couchbase/query_string_query.hxx +3 -3
- data/ext/couchbase/couchbase/regexp_query.hxx +1 -1
- data/ext/couchbase/couchbase/replace_options.hxx +3 -3
- data/ext/couchbase/couchbase/result.hxx +14 -3
- data/ext/couchbase/couchbase/scan_result_item.hxx +1 -0
- data/ext/couchbase/couchbase/scope.hxx +85 -2
- data/ext/couchbase/couchbase/search_options.hxx +58 -8
- data/ext/couchbase/couchbase/search_scoring.hxx +94 -0
- data/ext/couchbase/couchbase/search_scoring_none.hxx +51 -0
- data/ext/couchbase/couchbase/search_scoring_reciprocal_rank_fusion.hxx +88 -0
- data/ext/couchbase/couchbase/search_scoring_relative_score_fusion.hxx +70 -0
- data/ext/couchbase/couchbase/term_range_query.hxx +1 -1
- data/ext/couchbase/couchbase/tracing/request_span.hxx +46 -0
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_replicas_from_preferred_server_group_result.hxx +23 -21
- data/ext/couchbase/couchbase/transactions/transaction_get_multi_result.hxx +24 -19
- data/ext/couchbase/couchbase/transactions/transaction_get_result.hxx +17 -3
- data/ext/couchbase/couchbase/transactions/transactions_config.hxx +4 -2
- data/ext/couchbase/couchbase/transactions.hxx +27 -18
- data/ext/couchbase/couchbase/upsert_options.hxx +3 -3
- data/ext/couchbase/couchbase/vector_query.hxx +1 -1
- data/ext/couchbase/couchbase/wait_until_ready_options.hxx +111 -0
- data/ext/couchbase/couchbase/wildcard_query.hxx +1 -1
- data/ext/extconf.rb +15 -10
- data/ext/rcb_analytics.cxx +82 -102
- data/ext/rcb_backend.cxx +42 -36
- data/ext/rcb_backend.hxx +2 -0
- data/ext/rcb_buckets.cxx +47 -59
- data/ext/rcb_collections.cxx +42 -52
- data/ext/rcb_crud.cxx +345 -224
- data/ext/rcb_diagnostics.cxx +117 -27
- data/ext/rcb_exceptions.cxx +152 -99
- data/ext/rcb_exceptions.hxx +25 -0
- data/ext/rcb_extras.cxx +18 -19
- data/ext/rcb_hdr_histogram.cxx +19 -4
- data/ext/rcb_logger.cxx +202 -27
- data/ext/rcb_logger.hxx +12 -0
- data/ext/rcb_multi.cxx +40 -40
- data/ext/rcb_observability.cxx +7 -5
- data/ext/rcb_query.cxx +99 -142
- data/ext/rcb_range_scan.cxx +41 -35
- data/ext/rcb_search.cxx +98 -99
- data/ext/rcb_users.cxx +36 -56
- data/ext/rcb_utils.cxx +100 -37
- data/ext/rcb_utils.hxx +287 -33
- data/ext/rcb_version.cxx +1 -1
- data/ext/rcb_views.cxx +55 -51
- data/lib/active_support/cache/couchbase_store.rb +77 -12
- data/lib/couchbase/bucket.rb +20 -0
- data/lib/couchbase/cluster.rb +17 -0
- data/lib/couchbase/collection.rb +36 -1
- data/lib/couchbase/errors.rb +18 -0
- data/lib/couchbase/fork_hooks.rb +16 -7
- data/lib/couchbase/get_replica_strategy.rb +89 -0
- data/lib/couchbase/logger.rb +1 -1
- data/lib/couchbase/management/analytics_index_manager.rb +15 -15
- data/lib/couchbase/management/bucket_manager.rb +6 -6
- data/lib/couchbase/management/collection_manager.rb +6 -6
- data/lib/couchbase/management/query_index_manager.rb +7 -7
- data/lib/couchbase/management/search_index_manager.rb +13 -13
- data/lib/couchbase/management/user_manager.rb +10 -10
- data/lib/couchbase/management/view_index_manager.rb +5 -5
- data/lib/couchbase/options.rb +174 -42
- data/lib/couchbase/protostellar/bucket.rb +4 -0
- data/lib/couchbase/protostellar/cluster.rb +4 -0
- data/lib/couchbase/protostellar/collection.rb +4 -0
- data/lib/couchbase/protostellar/error_handling.rb +2 -1
- data/lib/couchbase/protostellar/request.rb +1 -0
- data/lib/couchbase/protostellar/request_generator/kv.rb +16 -2
- data/lib/couchbase/protostellar/request_generator/search.rb +17 -1
- data/lib/couchbase/protostellar/retry/orchestrator.rb +3 -2
- data/lib/couchbase/protostellar/retry/strategies/fail_fast.rb +33 -0
- data/lib/couchbase/protostellar/retry/strategies.rb +1 -0
- data/lib/couchbase/search_options.rb +95 -6
- data/lib/couchbase/version.rb +1 -1
- metadata +91 -33
- data/ext/0001-fix-build-for-mingw-w64-ucrt-x86_64-toolchain.patch +0 -40
- data/ext/couchbase/core/columnar/agent.hxx +0 -71
- data/ext/couchbase/core/columnar/agent_config.hxx +0 -59
- data/ext/couchbase/core/columnar/background_bootstrap_listener.hxx +0 -42
- data/ext/couchbase/core/columnar/backoff_calculator.cxx +0 -62
- data/ext/couchbase/core/columnar/columnar_agent.cxx +0 -147
- data/ext/couchbase/core/columnar/columnar_agent_config.cxx +0 -48
- data/ext/couchbase/core/columnar/columnar_error.cxx +0 -51
- data/ext/couchbase/core/columnar/database_management_options.hxx +0 -56
- data/ext/couchbase/core/columnar/error.hxx +0 -51
- data/ext/couchbase/core/columnar/error_codes.cxx +0 -107
- data/ext/couchbase/core/columnar/error_codes.hxx +0 -75
- data/ext/couchbase/core/columnar/management_component.cxx +0 -300
- data/ext/couchbase/core/columnar/management_component.hxx +0 -56
- data/ext/couchbase/core/columnar/query_component.cxx +0 -523
- data/ext/couchbase/core/columnar/query_component.hxx +0 -57
- data/ext/couchbase/core/columnar/query_options.hxx +0 -59
- data/ext/couchbase/core/columnar/query_result.cxx +0 -130
- data/ext/couchbase/core/columnar/query_result.hxx +0 -78
- data/ext/couchbase/core/io/config_tracker.cxx +0 -687
- data/ext/couchbase/core/io/config_tracker.hxx +0 -123
data/lib/couchbase/options.rb
CHANGED
|
@@ -24,12 +24,14 @@ module Couchbase
|
|
|
24
24
|
# Base class for most of the options
|
|
25
25
|
class Base
|
|
26
26
|
attr_accessor :timeout # @return [Integer, #in_milliseconds, nil]
|
|
27
|
-
attr_accessor :retry_strategy # @return [
|
|
27
|
+
attr_accessor :retry_strategy # @return [Symbol, nil]
|
|
28
28
|
attr_accessor :client_context # @return [Hash, nil]
|
|
29
29
|
attr_accessor :parent_span # @return [Span, nil]
|
|
30
30
|
|
|
31
31
|
# @param [Integer, #in_milliseconds, nil] timeout the time in milliseconds allowed for the operation to complete
|
|
32
|
-
# @param [
|
|
32
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+, honoured by key/value operations
|
|
33
|
+
# other than {Collection#get_any_replica}, {Collection#get_all_replicas} and range scans; the cluster's
|
|
34
|
+
# default when +nil+
|
|
33
35
|
# @param [Hash, nil] client_context the client context data, if set
|
|
34
36
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
35
37
|
#
|
|
@@ -42,7 +44,8 @@ module Couchbase
|
|
|
42
44
|
@retry_strategy = retry_strategy
|
|
43
45
|
@client_context = client_context
|
|
44
46
|
@parent_span = parent_span
|
|
45
|
-
|
|
47
|
+
# A subclass yields at the end of its own initialize, once its defaults are set.
|
|
48
|
+
yield self if block_given? && instance_of?(Base)
|
|
46
49
|
end
|
|
47
50
|
|
|
48
51
|
# @api private
|
|
@@ -65,7 +68,7 @@ module Couchbase
|
|
|
65
68
|
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
|
66
69
|
#
|
|
67
70
|
# @param [Integer, #in_milliseconds, nil] timeout the time in milliseconds allowed for the operation to complete
|
|
68
|
-
# @param [
|
|
71
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
69
72
|
# @param [Hash, nil] client_context the client context data, if set
|
|
70
73
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
71
74
|
#
|
|
@@ -114,6 +117,7 @@ module Couchbase
|
|
|
114
117
|
def to_backend
|
|
115
118
|
options = {
|
|
116
119
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
120
|
+
retry_strategy: @retry_strategy,
|
|
117
121
|
}
|
|
118
122
|
options.update(with_expiry: true) if @with_expiry
|
|
119
123
|
unless @projections.nil? || @projections.empty?
|
|
@@ -138,7 +142,7 @@ module Couchbase
|
|
|
138
142
|
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
|
139
143
|
#
|
|
140
144
|
# @param [Integer, #in_milliseconds, nil] timeout the time in milliseconds allowed for the operation to complete
|
|
141
|
-
# @param [
|
|
145
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
142
146
|
# @param [Hash, nil] client_context the client context data, if set
|
|
143
147
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
144
148
|
#
|
|
@@ -157,6 +161,7 @@ module Couchbase
|
|
|
157
161
|
def to_backend
|
|
158
162
|
{
|
|
159
163
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
164
|
+
retry_strategy: @retry_strategy,
|
|
160
165
|
}
|
|
161
166
|
end
|
|
162
167
|
|
|
@@ -173,7 +178,7 @@ module Couchbase
|
|
|
173
178
|
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
|
174
179
|
#
|
|
175
180
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
176
|
-
# @param [
|
|
181
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
177
182
|
# @param [Hash, nil] client_context the client context data, if set
|
|
178
183
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
179
184
|
#
|
|
@@ -192,6 +197,7 @@ module Couchbase
|
|
|
192
197
|
def to_backend
|
|
193
198
|
{
|
|
194
199
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
200
|
+
retry_strategy: @retry_strategy,
|
|
195
201
|
}
|
|
196
202
|
end
|
|
197
203
|
|
|
@@ -208,7 +214,7 @@ module Couchbase
|
|
|
208
214
|
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
|
209
215
|
#
|
|
210
216
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
211
|
-
# @param [
|
|
217
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
212
218
|
# @param [Hash, nil] client_context the client context data, if set
|
|
213
219
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
214
220
|
#
|
|
@@ -227,6 +233,7 @@ module Couchbase
|
|
|
227
233
|
def to_backend
|
|
228
234
|
{
|
|
229
235
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
236
|
+
retry_strategy: @retry_strategy,
|
|
230
237
|
}
|
|
231
238
|
end
|
|
232
239
|
|
|
@@ -247,7 +254,7 @@ module Couchbase
|
|
|
247
254
|
# +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
|
|
248
255
|
#
|
|
249
256
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
250
|
-
# @param [
|
|
257
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
251
258
|
# @param [Hash, nil] client_context the client context data, if set
|
|
252
259
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
253
260
|
#
|
|
@@ -289,7 +296,7 @@ module Couchbase
|
|
|
289
296
|
# +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
|
|
290
297
|
#
|
|
291
298
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
292
|
-
# @param [
|
|
299
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
293
300
|
# @param [Hash, nil] client_context the client context data, if set
|
|
294
301
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
295
302
|
#
|
|
@@ -318,12 +325,50 @@ module Couchbase
|
|
|
318
325
|
DEFAULT = GetAnyReplica.new.freeze
|
|
319
326
|
end
|
|
320
327
|
|
|
328
|
+
# Options for {Collection#get_replica}
|
|
329
|
+
#
|
|
330
|
+
# @since 3.9.0
|
|
331
|
+
class GetReplica < Base
|
|
332
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
|
333
|
+
|
|
334
|
+
# Creates an instance of options for {Collection#get_replica}
|
|
335
|
+
#
|
|
336
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
|
337
|
+
#
|
|
338
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
|
339
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
340
|
+
# @param [Hash, nil] client_context the client context data, if set
|
|
341
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
342
|
+
#
|
|
343
|
+
# @yieldparam [GetReplica] self
|
|
344
|
+
def initialize(transcoder: JsonTranscoder.new,
|
|
345
|
+
timeout: nil,
|
|
346
|
+
retry_strategy: nil,
|
|
347
|
+
client_context: nil,
|
|
348
|
+
parent_span: nil)
|
|
349
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span, &nil)
|
|
350
|
+
@transcoder = transcoder
|
|
351
|
+
yield self if block_given?
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# @api private
|
|
355
|
+
def to_backend
|
|
356
|
+
{
|
|
357
|
+
timeout: Utils::Time.extract_duration(@timeout),
|
|
358
|
+
retry_strategy: @retry_strategy,
|
|
359
|
+
}
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# @api private
|
|
363
|
+
DEFAULT = GetReplica.new.freeze
|
|
364
|
+
end
|
|
365
|
+
|
|
321
366
|
# Options for {Collection#exists}
|
|
322
367
|
class Exists < Base
|
|
323
368
|
# Creates an instance of options for {Collection#exists}
|
|
324
369
|
#
|
|
325
370
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
326
|
-
# @param [
|
|
371
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
327
372
|
# @param [Hash, nil] client_context the client context data, if set
|
|
328
373
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
329
374
|
#
|
|
@@ -340,6 +385,7 @@ module Couchbase
|
|
|
340
385
|
def to_backend
|
|
341
386
|
{
|
|
342
387
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
388
|
+
retry_strategy: @retry_strategy,
|
|
343
389
|
}
|
|
344
390
|
end
|
|
345
391
|
|
|
@@ -352,7 +398,7 @@ module Couchbase
|
|
|
352
398
|
# Creates an instance of options for {Collection#touch}
|
|
353
399
|
#
|
|
354
400
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
355
|
-
# @param [
|
|
401
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
356
402
|
# @param [Hash, nil] client_context the client context data, if set
|
|
357
403
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
358
404
|
#
|
|
@@ -369,6 +415,7 @@ module Couchbase
|
|
|
369
415
|
def to_backend
|
|
370
416
|
{
|
|
371
417
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
418
|
+
retry_strategy: @retry_strategy,
|
|
372
419
|
}
|
|
373
420
|
end
|
|
374
421
|
|
|
@@ -381,7 +428,7 @@ module Couchbase
|
|
|
381
428
|
# Creates an instance of options for {Collection#unlock}
|
|
382
429
|
#
|
|
383
430
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
384
|
-
# @param [
|
|
431
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
385
432
|
# @param [Hash, nil] client_context the client context data, if set
|
|
386
433
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
387
434
|
#
|
|
@@ -398,6 +445,7 @@ module Couchbase
|
|
|
398
445
|
def to_backend
|
|
399
446
|
{
|
|
400
447
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
448
|
+
retry_strategy: @retry_strategy,
|
|
401
449
|
}
|
|
402
450
|
end
|
|
403
451
|
|
|
@@ -440,7 +488,7 @@ module Couchbase
|
|
|
440
488
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
441
489
|
#
|
|
442
490
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
443
|
-
# @param [
|
|
491
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
444
492
|
# @param [Hash, nil] client_context the client context data, if set
|
|
445
493
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
446
494
|
#
|
|
@@ -469,6 +517,7 @@ module Couchbase
|
|
|
469
517
|
def to_backend
|
|
470
518
|
{
|
|
471
519
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
520
|
+
retry_strategy: @retry_strategy,
|
|
472
521
|
durability_level: @durability_level,
|
|
473
522
|
persist_to: @persist_to,
|
|
474
523
|
replicate_to: @replicate_to,
|
|
@@ -513,7 +562,7 @@ module Couchbase
|
|
|
513
562
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
514
563
|
#
|
|
515
564
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
516
|
-
# @param [
|
|
565
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
517
566
|
# @param [Hash, nil] client_context the client context data, if set
|
|
518
567
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
519
568
|
#
|
|
@@ -540,6 +589,7 @@ module Couchbase
|
|
|
540
589
|
def to_backend
|
|
541
590
|
{
|
|
542
591
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
592
|
+
retry_strategy: @retry_strategy,
|
|
543
593
|
durability_level: @durability_level,
|
|
544
594
|
persist_to: @persist_to,
|
|
545
595
|
replicate_to: @replicate_to,
|
|
@@ -587,7 +637,7 @@ module Couchbase
|
|
|
587
637
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
588
638
|
#
|
|
589
639
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
590
|
-
# @param [
|
|
640
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
591
641
|
# @param [Hash, nil] client_context the client context data, if set
|
|
592
642
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
593
643
|
#
|
|
@@ -618,6 +668,7 @@ module Couchbase
|
|
|
618
668
|
def to_backend
|
|
619
669
|
{
|
|
620
670
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
671
|
+
retry_strategy: @retry_strategy,
|
|
621
672
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
622
673
|
durability_level: @durability_level,
|
|
623
674
|
persist_to: @persist_to,
|
|
@@ -669,7 +720,7 @@ module Couchbase
|
|
|
669
720
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
670
721
|
#
|
|
671
722
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
672
|
-
# @param [
|
|
723
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
673
724
|
# @param [Hash, nil] client_context the client context data, if set
|
|
674
725
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
675
726
|
#
|
|
@@ -701,6 +752,7 @@ module Couchbase
|
|
|
701
752
|
def to_backend
|
|
702
753
|
{
|
|
703
754
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
755
|
+
retry_strategy: @retry_strategy,
|
|
704
756
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
705
757
|
preserve_expiry: @preserve_expiry,
|
|
706
758
|
durability_level: @durability_level,
|
|
@@ -753,7 +805,7 @@ module Couchbase
|
|
|
753
805
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
754
806
|
#
|
|
755
807
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
756
|
-
# @param [
|
|
808
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
757
809
|
# @param [Hash, nil] client_context the client context data, if set
|
|
758
810
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
759
811
|
#
|
|
@@ -785,6 +837,7 @@ module Couchbase
|
|
|
785
837
|
def to_backend
|
|
786
838
|
{
|
|
787
839
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
840
|
+
retry_strategy: @retry_strategy,
|
|
788
841
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
789
842
|
preserve_expiry: @preserve_expiry,
|
|
790
843
|
durability_level: @durability_level,
|
|
@@ -839,7 +892,7 @@ module Couchbase
|
|
|
839
892
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
840
893
|
#
|
|
841
894
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
842
|
-
# @param [
|
|
895
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
843
896
|
# @param [Hash, nil] client_context the client context data, if set
|
|
844
897
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
845
898
|
#
|
|
@@ -873,6 +926,7 @@ module Couchbase
|
|
|
873
926
|
def to_backend
|
|
874
927
|
{
|
|
875
928
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
929
|
+
retry_strategy: @retry_strategy,
|
|
876
930
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
877
931
|
preserve_expiry: @preserve_expiry,
|
|
878
932
|
durability_level: @durability_level,
|
|
@@ -935,7 +989,7 @@ module Couchbase
|
|
|
935
989
|
# @param [JsonTranscoder, #encode(Object)] transcoder used for encoding
|
|
936
990
|
#
|
|
937
991
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
938
|
-
# @param [
|
|
992
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
939
993
|
# @param [Hash, nil] client_context the client context data, if set
|
|
940
994
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
941
995
|
#
|
|
@@ -976,6 +1030,7 @@ module Couchbase
|
|
|
976
1030
|
def to_backend
|
|
977
1031
|
{
|
|
978
1032
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
1033
|
+
retry_strategy: @retry_strategy,
|
|
979
1034
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
980
1035
|
preserve_expiry: @preserve_expiry,
|
|
981
1036
|
durability_level: @durability_level,
|
|
@@ -1010,7 +1065,7 @@ module Couchbase
|
|
|
1010
1065
|
# @param [JsonTranscoder, #decode(String)] transcoder used for encoding
|
|
1011
1066
|
#
|
|
1012
1067
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1013
|
-
# @param [
|
|
1068
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
1014
1069
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1015
1070
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1016
1071
|
#
|
|
@@ -1031,6 +1086,7 @@ module Couchbase
|
|
|
1031
1086
|
def to_backend
|
|
1032
1087
|
{
|
|
1033
1088
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
1089
|
+
retry_strategy: @retry_strategy,
|
|
1034
1090
|
access_deleted: @access_deleted,
|
|
1035
1091
|
}
|
|
1036
1092
|
end
|
|
@@ -1056,7 +1112,7 @@ module Couchbase
|
|
|
1056
1112
|
# +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
|
|
1057
1113
|
#
|
|
1058
1114
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1059
|
-
# @param [
|
|
1115
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
1060
1116
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1061
1117
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1062
1118
|
#
|
|
@@ -1102,7 +1158,7 @@ module Couchbase
|
|
|
1102
1158
|
# +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
|
|
1103
1159
|
#
|
|
1104
1160
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1105
|
-
# @param [
|
|
1161
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
1106
1162
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1107
1163
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1108
1164
|
#
|
|
@@ -1153,7 +1209,7 @@ module Couchbase
|
|
|
1153
1209
|
# defaults to 1
|
|
1154
1210
|
#
|
|
1155
1211
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1156
|
-
# @param [
|
|
1212
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
1157
1213
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1158
1214
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1159
1215
|
#
|
|
@@ -1239,7 +1295,7 @@ module Couchbase
|
|
|
1239
1295
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
1240
1296
|
#
|
|
1241
1297
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1242
|
-
# @param [
|
|
1298
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
1243
1299
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1244
1300
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1245
1301
|
#
|
|
@@ -1269,6 +1325,7 @@ module Couchbase
|
|
|
1269
1325
|
def to_backend
|
|
1270
1326
|
{
|
|
1271
1327
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
1328
|
+
retry_strategy: @retry_strategy,
|
|
1272
1329
|
cas: @cas,
|
|
1273
1330
|
durability_level: @durability_level,
|
|
1274
1331
|
persist_to: @persist_to,
|
|
@@ -1317,7 +1374,7 @@ module Couchbase
|
|
|
1317
1374
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
1318
1375
|
#
|
|
1319
1376
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1320
|
-
# @param [
|
|
1377
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
1321
1378
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1322
1379
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1323
1380
|
#
|
|
@@ -1347,6 +1404,7 @@ module Couchbase
|
|
|
1347
1404
|
def to_backend
|
|
1348
1405
|
{
|
|
1349
1406
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
1407
|
+
retry_strategy: @retry_strategy,
|
|
1350
1408
|
cas: @cas,
|
|
1351
1409
|
durability_level: @durability_level,
|
|
1352
1410
|
persist_to: @persist_to,
|
|
@@ -1397,7 +1455,7 @@ module Couchbase
|
|
|
1397
1455
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
1398
1456
|
#
|
|
1399
1457
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1400
|
-
# @param [
|
|
1458
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
1401
1459
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1402
1460
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1403
1461
|
#
|
|
@@ -1439,6 +1497,7 @@ module Couchbase
|
|
|
1439
1497
|
def to_backend
|
|
1440
1498
|
{
|
|
1441
1499
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
1500
|
+
retry_strategy: @retry_strategy,
|
|
1442
1501
|
delta: @delta,
|
|
1443
1502
|
initial_value: @initial,
|
|
1444
1503
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
@@ -1491,7 +1550,7 @@ module Couchbase
|
|
|
1491
1550
|
# +:four+:: wait for persistence to four nodes (active and replicas).
|
|
1492
1551
|
#
|
|
1493
1552
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1494
|
-
# @param [
|
|
1553
|
+
# @param [Symbol, nil] retry_strategy +:best_effort+ or +:fail_fast+; the cluster's default when +nil+
|
|
1495
1554
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1496
1555
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1497
1556
|
#
|
|
@@ -1533,6 +1592,7 @@ module Couchbase
|
|
|
1533
1592
|
def to_backend
|
|
1534
1593
|
{
|
|
1535
1594
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
1595
|
+
retry_strategy: @retry_strategy,
|
|
1536
1596
|
delta: @delta,
|
|
1537
1597
|
initial_value: @initial,
|
|
1538
1598
|
expiry: Utils::Time.extract_expiry_time(@expiry),
|
|
@@ -1954,6 +2014,41 @@ module Couchbase
|
|
|
1954
2014
|
DEFAULT = Ping.new.freeze
|
|
1955
2015
|
end
|
|
1956
2016
|
|
|
2017
|
+
# Options for {Couchbase::Cluster#wait_until_ready} and {Couchbase::Bucket#wait_until_ready}
|
|
2018
|
+
class WaitUntilReady
|
|
2019
|
+
attr_accessor :desired_state # @return [Symbol]
|
|
2020
|
+
attr_accessor :service_types # @return [Array<Symbol>, nil]
|
|
2021
|
+
|
|
2022
|
+
# Creates an instance of options for {Couchbase::Cluster#wait_until_ready} and {Couchbase::Bucket#wait_until_ready}
|
|
2023
|
+
#
|
|
2024
|
+
# @param [Symbol] desired_state the state to wait for
|
|
2025
|
+
# +:online+:: every endpoint the ping reports for each requested service responds
|
|
2026
|
+
# +:degraded+:: at least one endpoint the ping reports for each requested service responds
|
|
2027
|
+
# @param [Array<Symbol>, nil] service_types the service types to wait for (same names as {Ping#service_types}).
|
|
2028
|
+
# When +nil+ or empty, every service in the ping report is considered. A requested service that no node runs
|
|
2029
|
+
# is never ready, so the wait times out.
|
|
2030
|
+
#
|
|
2031
|
+
# @yieldparam [WaitUntilReady] self
|
|
2032
|
+
def initialize(desired_state: :online,
|
|
2033
|
+
service_types: nil)
|
|
2034
|
+
@desired_state = desired_state
|
|
2035
|
+
@service_types = service_types
|
|
2036
|
+
|
|
2037
|
+
yield self if block_given?
|
|
2038
|
+
end
|
|
2039
|
+
|
|
2040
|
+
# @api private
|
|
2041
|
+
def to_backend
|
|
2042
|
+
{
|
|
2043
|
+
desired_state: @desired_state,
|
|
2044
|
+
service_types: @service_types,
|
|
2045
|
+
}
|
|
2046
|
+
end
|
|
2047
|
+
|
|
2048
|
+
# @api private
|
|
2049
|
+
DEFAULT = WaitUntilReady.new.freeze
|
|
2050
|
+
end
|
|
2051
|
+
|
|
1957
2052
|
# Options for {Couchbase::Cluster#analytics_query}
|
|
1958
2053
|
class Analytics < Base
|
|
1959
2054
|
attr_accessor :client_context_id # @return [String]
|
|
@@ -1991,7 +2086,7 @@ module Couchbase
|
|
|
1991
2086
|
# The qualifier must be in form +{bucket_name}.{scope_name}+ or +default:{bucket_name}.{scope_name}+.
|
|
1992
2087
|
#
|
|
1993
2088
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
1994
|
-
# @param [
|
|
2089
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
1995
2090
|
# @param [Hash, nil] client_context the client context data, if set
|
|
1996
2091
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
1997
2092
|
#
|
|
@@ -2043,10 +2138,10 @@ module Couchbase
|
|
|
2043
2138
|
|
|
2044
2139
|
# Allows providing custom JSON key/value pairs for advanced usage
|
|
2045
2140
|
#
|
|
2046
|
-
# @param [String] key the parameter name (key of the JSON property)
|
|
2141
|
+
# @param [String, Symbol] key the parameter name (key of the JSON property), converted with +to_s+
|
|
2047
2142
|
# @param [Object] value the parameter value (value of the JSON property)
|
|
2048
2143
|
def raw(key, value)
|
|
2049
|
-
@raw_parameters[key] = JSON.generate(value)
|
|
2144
|
+
@raw_parameters[key.to_s] = JSON.generate(value)
|
|
2050
2145
|
end
|
|
2051
2146
|
|
|
2052
2147
|
# @api private
|
|
@@ -2162,7 +2257,7 @@ module Couchbase
|
|
|
2162
2257
|
# Overrides +scan_consistency+.
|
|
2163
2258
|
#
|
|
2164
2259
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
2165
|
-
# @param [
|
|
2260
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
2166
2261
|
# @param [Hash, nil] client_context the client context data, if set
|
|
2167
2262
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
2168
2263
|
#
|
|
@@ -2220,10 +2315,10 @@ module Couchbase
|
|
|
2220
2315
|
|
|
2221
2316
|
# Allows providing custom JSON key/value pairs for advanced usage
|
|
2222
2317
|
#
|
|
2223
|
-
# @param [String] key the parameter name (key of the JSON property)
|
|
2318
|
+
# @param [String, Symbol] key the parameter name (key of the JSON property), converted with +to_s+
|
|
2224
2319
|
# @param [Object] value the parameter value (value of the JSON property)
|
|
2225
2320
|
def raw(key, value)
|
|
2226
|
-
@raw_parameters[key] = JSON.generate(value)
|
|
2321
|
+
@raw_parameters[key.to_s] = JSON.generate(value)
|
|
2227
2322
|
end
|
|
2228
2323
|
|
|
2229
2324
|
# Customizes the consistency guarantees for this query
|
|
@@ -2329,7 +2424,12 @@ module Couchbase
|
|
|
2329
2424
|
attr_accessor :highlight_style # @return [Symbol]
|
|
2330
2425
|
attr_accessor :highlight_fields # @return [Array<String>]
|
|
2331
2426
|
attr_accessor :fields # @return [Array<String>]
|
|
2332
|
-
|
|
2427
|
+
|
|
2428
|
+
# @deprecated Use +scoring+ with {SearchScoring.none} instead
|
|
2429
|
+
# @return [Boolean]
|
|
2430
|
+
attr_accessor :disable_scoring
|
|
2431
|
+
|
|
2432
|
+
attr_accessor :scoring # @return [SearchScoring, nil]
|
|
2333
2433
|
attr_accessor :include_locations # @return [Boolean]
|
|
2334
2434
|
attr_accessor :collections # @return [Array<String>, nil]
|
|
2335
2435
|
attr_accessor :sort # @return [Array<String, Cluster::SearchSort>]
|
|
@@ -2346,7 +2446,12 @@ module Couchbase
|
|
|
2346
2446
|
# @param [Array<String>] fields list of field values which should be retrieved for result documents, provided they
|
|
2347
2447
|
# were stored while indexing
|
|
2348
2448
|
# @param [MutationState] mutation_state the mutation tokens this query should be consistent with
|
|
2349
|
-
# @param [Boolean] disable_scoring
|
|
2449
|
+
# @param [Boolean] disable_scoring DEPRECATED: Use +scoring+ with {SearchScoring.none} instead. If set to true,
|
|
2450
|
+
# the server will not perform any scoring on the hits.
|
|
2451
|
+
# @param [SearchScoring, nil] scoring specifies the scoring mode used for the request. For a
|
|
2452
|
+
# hybrid search (a traditional FTS query combined with one or more vector queries) a fusion strategy
|
|
2453
|
+
# controls how the FTS and vector result sets are merged into a single ranked list. Must not be used
|
|
2454
|
+
# together with +disable_scoring+.
|
|
2350
2455
|
# @param [Boolean] include_locations UNCOMMITTED: If set to true, will include the vector of search_location in rows
|
|
2351
2456
|
# @param [Array<String>, nil] collections list of collections by which to filter the results
|
|
2352
2457
|
# @param [Array<String, Cluster::SearchSort>] sort Ordering rules to apply to the results. The list might contain
|
|
@@ -2359,7 +2464,7 @@ module Couchbase
|
|
|
2359
2464
|
# @param [JsonTranscoder, #decode(String)] transcoder to use for the results
|
|
2360
2465
|
#
|
|
2361
2466
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
2362
|
-
# @param [
|
|
2467
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
2363
2468
|
# @param [Hash, nil] client_context the client context data, if set
|
|
2364
2469
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
2365
2470
|
#
|
|
@@ -2372,6 +2477,7 @@ module Couchbase
|
|
|
2372
2477
|
fields: nil,
|
|
2373
2478
|
mutation_state: nil,
|
|
2374
2479
|
disable_scoring: false,
|
|
2480
|
+
scoring: nil,
|
|
2375
2481
|
include_locations: false,
|
|
2376
2482
|
collections: nil,
|
|
2377
2483
|
sort: nil,
|
|
@@ -2389,6 +2495,7 @@ module Couchbase
|
|
|
2389
2495
|
@highlight_fields = highlight_fields
|
|
2390
2496
|
@fields = fields
|
|
2391
2497
|
@disable_scoring = disable_scoring
|
|
2498
|
+
@scoring = scoring
|
|
2392
2499
|
@include_locations = include_locations
|
|
2393
2500
|
@collections = collections
|
|
2394
2501
|
@sort = sort
|
|
@@ -2432,14 +2539,22 @@ module Couchbase
|
|
|
2432
2539
|
# @return [Symbol]
|
|
2433
2540
|
attr_reader :scan_consistency
|
|
2434
2541
|
|
|
2542
|
+
# @api private
|
|
2543
|
+
def validate_scoring
|
|
2544
|
+
raise Error::InvalidArgument, "disable_scoring and scoring must not be used together" if @disable_scoring && !@scoring.nil?
|
|
2545
|
+
end
|
|
2546
|
+
|
|
2435
2547
|
# @api private
|
|
2436
2548
|
def to_backend(show_request: nil)
|
|
2549
|
+
validate_scoring
|
|
2550
|
+
|
|
2437
2551
|
{
|
|
2438
2552
|
timeout: Utils::Time.extract_duration(@timeout),
|
|
2439
2553
|
limit: @limit,
|
|
2440
2554
|
skip: @skip,
|
|
2441
2555
|
explain: @explain,
|
|
2442
2556
|
disable_scoring: @disable_scoring,
|
|
2557
|
+
scoring: @scoring&.to_backend,
|
|
2443
2558
|
include_locations: @include_locations,
|
|
2444
2559
|
collections: @collections,
|
|
2445
2560
|
highlight_style: @highlight_style,
|
|
@@ -2520,7 +2635,7 @@ module Couchbase
|
|
|
2520
2635
|
# @param [Boolean, nil] debug allows to return debug information as part of the view response
|
|
2521
2636
|
#
|
|
2522
2637
|
# @param [Integer, #in_milliseconds, nil] timeout
|
|
2523
|
-
# @param [
|
|
2638
|
+
# @param [Symbol, nil] retry_strategy ignored by this operation
|
|
2524
2639
|
# @param [Hash, nil] client_context the client context data, if set
|
|
2525
2640
|
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
|
2526
2641
|
#
|
|
@@ -2546,7 +2661,7 @@ module Couchbase
|
|
|
2546
2661
|
retry_strategy: nil,
|
|
2547
2662
|
client_context: nil,
|
|
2548
2663
|
parent_span: nil)
|
|
2549
|
-
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
|
2664
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span, &nil)
|
|
2550
2665
|
|
|
2551
2666
|
@scan_consistency = scan_consistency
|
|
2552
2667
|
@namespace = namespace
|
|
@@ -2565,15 +2680,24 @@ module Couchbase
|
|
|
2565
2680
|
@reduce = reduce
|
|
2566
2681
|
@on_error = on_error
|
|
2567
2682
|
@debug = debug
|
|
2683
|
+
@raw_parameters = {}
|
|
2568
2684
|
yield self if block_given?
|
|
2569
2685
|
end
|
|
2570
2686
|
|
|
2571
|
-
# Allows providing custom
|
|
2687
|
+
# Allows providing custom query-string parameters for advanced usage
|
|
2572
2688
|
#
|
|
2573
|
-
#
|
|
2574
|
-
#
|
|
2689
|
+
# The SDK form-encodes the name and the value. A parameter that shares its name with a typed option is sent
|
|
2690
|
+
# in addition to it.
|
|
2691
|
+
#
|
|
2692
|
+
# @param [String, Symbol] key the parameter name
|
|
2693
|
+
# @param [Object] value the parameter value. A String must already be in the form the view engine expects,
|
|
2694
|
+
# such as JSON for +key+ or +keys+. Any other value is converted with +JSON.generate+.
|
|
2695
|
+
#
|
|
2696
|
+
# @example Pass parameters as raw values
|
|
2697
|
+
# options.raw("limit", 2) # limit=2
|
|
2698
|
+
# options.raw(:key, '"k2"') # key="k2", form-encoded
|
|
2575
2699
|
def raw(key, value)
|
|
2576
|
-
@raw_parameters[key] = JSON.generate(value)
|
|
2700
|
+
@raw_parameters[key.to_s] = value.is_a?(String) ? value : JSON.generate(value)
|
|
2577
2701
|
end
|
|
2578
2702
|
|
|
2579
2703
|
# @api private
|
|
@@ -2596,6 +2720,7 @@ module Couchbase
|
|
|
2596
2720
|
reduce: @reduce,
|
|
2597
2721
|
on_error: @on_error,
|
|
2598
2722
|
debug: @debug,
|
|
2723
|
+
raw_parameters: @raw_parameters,
|
|
2599
2724
|
}
|
|
2600
2725
|
end
|
|
2601
2726
|
|
|
@@ -2674,6 +2799,13 @@ module Couchbase
|
|
|
2674
2799
|
GetAnyReplica.new(**args)
|
|
2675
2800
|
end
|
|
2676
2801
|
|
|
2802
|
+
# Construct {GetReplica} options for {Collection#get_replica}
|
|
2803
|
+
#
|
|
2804
|
+
# @return [GetReplica]
|
|
2805
|
+
def GetReplica(**args)
|
|
2806
|
+
GetReplica.new(**args)
|
|
2807
|
+
end
|
|
2808
|
+
|
|
2677
2809
|
# Construct {Exists} options for {Collection#exists}
|
|
2678
2810
|
#
|
|
2679
2811
|
# @example Check if the document exists without fetching its contents
|
|
@@ -50,6 +50,10 @@ module Couchbase
|
|
|
50
50
|
def ping(_options = Options::Ping::DEFAULT)
|
|
51
51
|
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping"
|
|
52
52
|
end
|
|
53
|
+
|
|
54
|
+
def wait_until_ready(_timeout, _options = Options::WaitUntilReady::DEFAULT)
|
|
55
|
+
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support wait_until_ready"
|
|
56
|
+
end
|
|
53
57
|
end
|
|
54
58
|
end
|
|
55
59
|
end
|
|
@@ -155,6 +155,10 @@ module Couchbase
|
|
|
155
155
|
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping"
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
+
def wait_until_ready(_timeout, _options = Options::WaitUntilReady::DEFAULT)
|
|
159
|
+
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support wait_until_ready"
|
|
160
|
+
end
|
|
161
|
+
|
|
158
162
|
def search_indexes
|
|
159
163
|
raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support search index management"
|
|
160
164
|
end
|