couchbase 3.0.3-universal-darwin-20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +202 -0
- data/README.md +131 -0
- data/ext/CMakeLists.txt +130 -0
- data/ext/LICENSE.txt +202 -0
- data/ext/build_config.hxx.in +22 -0
- data/ext/build_version.hxx.in +30 -0
- data/ext/cmake/Backtrace.cmake +35 -0
- data/ext/cmake/BuildTracing.cmake +6 -0
- data/ext/cmake/Cache.cmake +29 -0
- data/ext/cmake/CompilerWarnings.cmake +84 -0
- data/ext/cmake/PreventInSourceBuilds.cmake +21 -0
- data/ext/cmake/Sanitizers.cmake +66 -0
- data/ext/cmake/StandardProjectSettings.cmake +40 -0
- data/ext/cmake/StaticAnalyzers.cmake +37 -0
- data/ext/cmake/Testing.cmake +49 -0
- data/ext/cmake/ThirdPartyDependencies.cmake +20 -0
- data/ext/cmake/VersionInfo.cmake +37 -0
- data/ext/couchbase/bucket.hxx +372 -0
- data/ext/couchbase/capabilities.hxx +117 -0
- data/ext/couchbase/cbcrypto/cbcrypto.cc +888 -0
- data/ext/couchbase/cbcrypto/cbcrypto.h +89 -0
- data/ext/couchbase/cbsasl/client.cc +48 -0
- data/ext/couchbase/cbsasl/client.h +127 -0
- data/ext/couchbase/cbsasl/context.cc +33 -0
- data/ext/couchbase/cbsasl/context.h +52 -0
- data/ext/couchbase/cbsasl/error.h +72 -0
- data/ext/couchbase/cbsasl/mechanism.cc +48 -0
- data/ext/couchbase/cbsasl/mechanism.h +55 -0
- data/ext/couchbase/cbsasl/plain/plain.cc +36 -0
- data/ext/couchbase/cbsasl/plain/plain.h +53 -0
- data/ext/couchbase/cbsasl/scram-sha/scram-sha.cc +390 -0
- data/ext/couchbase/cbsasl/scram-sha/scram-sha.h +185 -0
- data/ext/couchbase/cbsasl/scram-sha/stringutils.cc +81 -0
- data/ext/couchbase/cbsasl/scram-sha/stringutils.h +48 -0
- data/ext/couchbase/cluster.hxx +356 -0
- data/ext/couchbase/cluster_options.hxx +54 -0
- data/ext/couchbase/collections_manifest.hxx +88 -0
- data/ext/couchbase/configuration.hxx +652 -0
- data/ext/couchbase/couchbase.cxx +8015 -0
- data/ext/couchbase/diagnostics.hxx +248 -0
- data/ext/couchbase/document_id.hxx +40 -0
- data/ext/couchbase/error_context/analytics.hxx +46 -0
- data/ext/couchbase/error_context/http.hxx +44 -0
- data/ext/couchbase/error_context/key_value.hxx +47 -0
- data/ext/couchbase/error_context/query.hxx +46 -0
- data/ext/couchbase/error_context/search.hxx +47 -0
- data/ext/couchbase/error_context/view.hxx +47 -0
- data/ext/couchbase/error_map.hxx +261 -0
- data/ext/couchbase/errors.hxx +706 -0
- data/ext/couchbase/io/dns_client.hxx +217 -0
- data/ext/couchbase/io/dns_codec.hxx +206 -0
- data/ext/couchbase/io/dns_config.hxx +116 -0
- data/ext/couchbase/io/dns_message.hxx +555 -0
- data/ext/couchbase/io/http_command.hxx +111 -0
- data/ext/couchbase/io/http_context.hxx +37 -0
- data/ext/couchbase/io/http_message.hxx +47 -0
- data/ext/couchbase/io/http_parser.hxx +176 -0
- data/ext/couchbase/io/http_session.hxx +444 -0
- data/ext/couchbase/io/http_session_manager.hxx +264 -0
- data/ext/couchbase/io/mcbp_command.hxx +249 -0
- data/ext/couchbase/io/mcbp_context.hxx +37 -0
- data/ext/couchbase/io/mcbp_message.hxx +63 -0
- data/ext/couchbase/io/mcbp_parser.hxx +101 -0
- data/ext/couchbase/io/mcbp_session.hxx +1350 -0
- data/ext/couchbase/io/query_cache.hxx +61 -0
- data/ext/couchbase/io/retry_action.hxx +30 -0
- data/ext/couchbase/io/retry_context.hxx +38 -0
- data/ext/couchbase/io/retry_orchestrator.hxx +112 -0
- data/ext/couchbase/io/retry_reason.hxx +235 -0
- data/ext/couchbase/io/retry_strategy.hxx +156 -0
- data/ext/couchbase/io/streams.hxx +216 -0
- data/ext/couchbase/mutation_token.hxx +38 -0
- data/ext/couchbase/operations.hxx +109 -0
- data/ext/couchbase/operations/analytics_dataset_create.hxx +125 -0
- data/ext/couchbase/operations/analytics_dataset_drop.hxx +112 -0
- data/ext/couchbase/operations/analytics_dataset_get_all.hxx +114 -0
- data/ext/couchbase/operations/analytics_dataverse_create.hxx +112 -0
- data/ext/couchbase/operations/analytics_dataverse_drop.hxx +111 -0
- data/ext/couchbase/operations/analytics_get_pending_mutations.hxx +99 -0
- data/ext/couchbase/operations/analytics_index_create.hxx +135 -0
- data/ext/couchbase/operations/analytics_index_drop.hxx +117 -0
- data/ext/couchbase/operations/analytics_index_get_all.hxx +113 -0
- data/ext/couchbase/operations/analytics_link_connect.hxx +109 -0
- data/ext/couchbase/operations/analytics_link_disconnect.hxx +108 -0
- data/ext/couchbase/operations/bucket_create.hxx +171 -0
- data/ext/couchbase/operations/bucket_drop.hxx +70 -0
- data/ext/couchbase/operations/bucket_flush.hxx +69 -0
- data/ext/couchbase/operations/bucket_get.hxx +78 -0
- data/ext/couchbase/operations/bucket_get_all.hxx +73 -0
- data/ext/couchbase/operations/bucket_settings.hxx +166 -0
- data/ext/couchbase/operations/bucket_update.hxx +147 -0
- data/ext/couchbase/operations/cluster_developer_preview_enable.hxx +64 -0
- data/ext/couchbase/operations/collection_create.hxx +102 -0
- data/ext/couchbase/operations/collection_drop.hxx +92 -0
- data/ext/couchbase/operations/collections_manifest_get.hxx +66 -0
- data/ext/couchbase/operations/design_document.hxx +59 -0
- data/ext/couchbase/operations/document_analytics.hxx +316 -0
- data/ext/couchbase/operations/document_append.hxx +72 -0
- data/ext/couchbase/operations/document_decrement.hxx +83 -0
- data/ext/couchbase/operations/document_exists.hxx +83 -0
- data/ext/couchbase/operations/document_get.hxx +66 -0
- data/ext/couchbase/operations/document_get_and_lock.hxx +67 -0
- data/ext/couchbase/operations/document_get_and_touch.hxx +67 -0
- data/ext/couchbase/operations/document_get_projected.hxx +257 -0
- data/ext/couchbase/operations/document_increment.hxx +85 -0
- data/ext/couchbase/operations/document_insert.hxx +77 -0
- data/ext/couchbase/operations/document_lookup_in.hxx +112 -0
- data/ext/couchbase/operations/document_mutate_in.hxx +151 -0
- data/ext/couchbase/operations/document_prepend.hxx +72 -0
- data/ext/couchbase/operations/document_query.hxx +440 -0
- data/ext/couchbase/operations/document_remove.hxx +72 -0
- data/ext/couchbase/operations/document_replace.hxx +79 -0
- data/ext/couchbase/operations/document_search.hxx +392 -0
- data/ext/couchbase/operations/document_touch.hxx +63 -0
- data/ext/couchbase/operations/document_unlock.hxx +63 -0
- data/ext/couchbase/operations/document_upsert.hxx +77 -0
- data/ext/couchbase/operations/document_view.hxx +245 -0
- data/ext/couchbase/operations/group_drop.hxx +72 -0
- data/ext/couchbase/operations/group_get.hxx +80 -0
- data/ext/couchbase/operations/group_get_all.hxx +77 -0
- data/ext/couchbase/operations/group_upsert.hxx +125 -0
- data/ext/couchbase/operations/http_noop.hxx +78 -0
- data/ext/couchbase/operations/mcbp_noop.hxx +55 -0
- data/ext/couchbase/operations/query_index_build_deferred.hxx +93 -0
- data/ext/couchbase/operations/query_index_create.hxx +152 -0
- data/ext/couchbase/operations/query_index_drop.hxx +126 -0
- data/ext/couchbase/operations/query_index_get_all.hxx +124 -0
- data/ext/couchbase/operations/rbac.hxx +276 -0
- data/ext/couchbase/operations/role_get_all.hxx +77 -0
- data/ext/couchbase/operations/scope_create.hxx +95 -0
- data/ext/couchbase/operations/scope_drop.hxx +89 -0
- data/ext/couchbase/operations/scope_get_all.hxx +82 -0
- data/ext/couchbase/operations/search_get_stats.hxx +60 -0
- data/ext/couchbase/operations/search_index.hxx +79 -0
- data/ext/couchbase/operations/search_index_analyze_document.hxx +105 -0
- data/ext/couchbase/operations/search_index_control_ingest.hxx +93 -0
- data/ext/couchbase/operations/search_index_control_plan_freeze.hxx +93 -0
- data/ext/couchbase/operations/search_index_control_query.hxx +93 -0
- data/ext/couchbase/operations/search_index_drop.hxx +90 -0
- data/ext/couchbase/operations/search_index_get.hxx +93 -0
- data/ext/couchbase/operations/search_index_get_all.hxx +89 -0
- data/ext/couchbase/operations/search_index_get_documents_count.hxx +101 -0
- data/ext/couchbase/operations/search_index_get_stats.hxx +88 -0
- data/ext/couchbase/operations/search_index_upsert.hxx +119 -0
- data/ext/couchbase/operations/user_drop.hxx +73 -0
- data/ext/couchbase/operations/user_get.hxx +81 -0
- data/ext/couchbase/operations/user_get_all.hxx +78 -0
- data/ext/couchbase/operations/user_upsert.hxx +132 -0
- data/ext/couchbase/operations/view_index_drop.hxx +68 -0
- data/ext/couchbase/operations/view_index_get.hxx +97 -0
- data/ext/couchbase/operations/view_index_get_all.hxx +132 -0
- data/ext/couchbase/operations/view_index_upsert.hxx +88 -0
- data/ext/couchbase/origin.hxx +179 -0
- data/ext/couchbase/platform/backtrace.c +189 -0
- data/ext/couchbase/platform/backtrace.h +54 -0
- data/ext/couchbase/platform/base64.cc +234 -0
- data/ext/couchbase/platform/base64.h +47 -0
- data/ext/couchbase/platform/random.cc +119 -0
- data/ext/couchbase/platform/random.h +39 -0
- data/ext/couchbase/platform/string_hex.cc +99 -0
- data/ext/couchbase/platform/string_hex.h +50 -0
- data/ext/couchbase/platform/terminate_handler.cc +130 -0
- data/ext/couchbase/platform/terminate_handler.h +36 -0
- data/ext/couchbase/platform/uuid.cc +96 -0
- data/ext/couchbase/platform/uuid.h +56 -0
- data/ext/couchbase/protocol/client_opcode.hxx +632 -0
- data/ext/couchbase/protocol/client_request.hxx +161 -0
- data/ext/couchbase/protocol/client_response.hxx +221 -0
- data/ext/couchbase/protocol/cmd_append.hxx +145 -0
- data/ext/couchbase/protocol/cmd_cluster_map_change_notification.hxx +79 -0
- data/ext/couchbase/protocol/cmd_decrement.hxx +187 -0
- data/ext/couchbase/protocol/cmd_exists.hxx +172 -0
- data/ext/couchbase/protocol/cmd_get.hxx +122 -0
- data/ext/couchbase/protocol/cmd_get_and_lock.hxx +142 -0
- data/ext/couchbase/protocol/cmd_get_and_touch.hxx +142 -0
- data/ext/couchbase/protocol/cmd_get_cluster_config.hxx +126 -0
- data/ext/couchbase/protocol/cmd_get_collection_id.hxx +117 -0
- data/ext/couchbase/protocol/cmd_get_collections_manifest.hxx +99 -0
- data/ext/couchbase/protocol/cmd_get_error_map.hxx +126 -0
- data/ext/couchbase/protocol/cmd_hello.hxx +157 -0
- data/ext/couchbase/protocol/cmd_increment.hxx +187 -0
- data/ext/couchbase/protocol/cmd_info.hxx +25 -0
- data/ext/couchbase/protocol/cmd_insert.hxx +172 -0
- data/ext/couchbase/protocol/cmd_lookup_in.hxx +227 -0
- data/ext/couchbase/protocol/cmd_mutate_in.hxx +406 -0
- data/ext/couchbase/protocol/cmd_noop.hxx +82 -0
- data/ext/couchbase/protocol/cmd_prepend.hxx +145 -0
- data/ext/couchbase/protocol/cmd_remove.hxx +134 -0
- data/ext/couchbase/protocol/cmd_replace.hxx +172 -0
- data/ext/couchbase/protocol/cmd_sasl_auth.hxx +106 -0
- data/ext/couchbase/protocol/cmd_sasl_list_mechs.hxx +100 -0
- data/ext/couchbase/protocol/cmd_sasl_step.hxx +104 -0
- data/ext/couchbase/protocol/cmd_select_bucket.hxx +85 -0
- data/ext/couchbase/protocol/cmd_touch.hxx +102 -0
- data/ext/couchbase/protocol/cmd_unlock.hxx +95 -0
- data/ext/couchbase/protocol/cmd_upsert.hxx +172 -0
- data/ext/couchbase/protocol/datatype.hxx +48 -0
- data/ext/couchbase/protocol/durability_level.hxx +83 -0
- data/ext/couchbase/protocol/enhanced_error_info.hxx +28 -0
- data/ext/couchbase/protocol/frame_info_id.hxx +187 -0
- data/ext/couchbase/protocol/hello_feature.hxx +264 -0
- data/ext/couchbase/protocol/magic.hxx +83 -0
- data/ext/couchbase/protocol/server_opcode.hxx +57 -0
- data/ext/couchbase/protocol/server_request.hxx +122 -0
- data/ext/couchbase/protocol/status.hxx +343 -0
- data/ext/couchbase/protocol/unsigned_leb128.h +195 -0
- data/ext/couchbase/service_type.hxx +60 -0
- data/ext/couchbase/timeout_defaults.hxx +41 -0
- data/ext/couchbase/utils/byteswap.hxx +33 -0
- data/ext/couchbase/utils/connection_string.hxx +379 -0
- data/ext/couchbase/utils/crc32.hxx +48 -0
- data/ext/couchbase/utils/url_codec.hxx +225 -0
- data/ext/couchbase/version.hxx +38 -0
- data/ext/extconf.rb +98 -0
- data/ext/test/CMakeLists.txt +5 -0
- data/ext/test/test_helper.hxx +141 -0
- data/ext/test/test_helper_native.hxx +56 -0
- data/ext/test/test_helper_ruby.hxx +72 -0
- data/ext/test/test_native_binary_operations.cxx +186 -0
- data/ext/test/test_native_diagnostics.cxx +436 -0
- data/ext/test/test_native_trivial_crud.cxx +83 -0
- data/ext/test/test_ruby_trivial_crud.cxx +35 -0
- data/ext/test/test_ruby_trivial_query.cxx +34 -0
- data/ext/third_party/asio/asio/include/asio.hpp +182 -0
- data/ext/third_party/asio/asio/include/asio/any_io_executor.hpp +71 -0
- data/ext/third_party/asio/asio/include/asio/associated_allocator.hpp +125 -0
- data/ext/third_party/asio/asio/include/asio/associated_executor.hpp +166 -0
- data/ext/third_party/asio/asio/include/asio/async_result.hpp +582 -0
- data/ext/third_party/asio/asio/include/asio/awaitable.hpp +133 -0
- data/ext/third_party/asio/asio/include/asio/basic_datagram_socket.hpp +1215 -0
- data/ext/third_party/asio/asio/include/asio/basic_deadline_timer.hpp +693 -0
- data/ext/third_party/asio/asio/include/asio/basic_io_object.hpp +290 -0
- data/ext/third_party/asio/asio/include/asio/basic_raw_socket.hpp +1206 -0
- data/ext/third_party/asio/asio/include/asio/basic_seq_packet_socket.hpp +761 -0
- data/ext/third_party/asio/asio/include/asio/basic_serial_port.hpp +907 -0
- data/ext/third_party/asio/asio/include/asio/basic_signal_set.hpp +568 -0
- data/ext/third_party/asio/asio/include/asio/basic_socket.hpp +1894 -0
- data/ext/third_party/asio/asio/include/asio/basic_socket_acceptor.hpp +2501 -0
- data/ext/third_party/asio/asio/include/asio/basic_socket_iostream.hpp +407 -0
- data/ext/third_party/asio/asio/include/asio/basic_socket_streambuf.hpp +687 -0
- data/ext/third_party/asio/asio/include/asio/basic_stream_socket.hpp +1053 -0
- data/ext/third_party/asio/asio/include/asio/basic_streambuf.hpp +452 -0
- data/ext/third_party/asio/asio/include/asio/basic_streambuf_fwd.hpp +36 -0
- data/ext/third_party/asio/asio/include/asio/basic_waitable_timer.hpp +811 -0
- data/ext/third_party/asio/asio/include/asio/bind_executor.hpp +575 -0
- data/ext/third_party/asio/asio/include/asio/buffer.hpp +2496 -0
- data/ext/third_party/asio/asio/include/asio/buffered_read_stream.hpp +253 -0
- data/ext/third_party/asio/asio/include/asio/buffered_read_stream_fwd.hpp +25 -0
- data/ext/third_party/asio/asio/include/asio/buffered_stream.hpp +279 -0
- data/ext/third_party/asio/asio/include/asio/buffered_stream_fwd.hpp +25 -0
- data/ext/third_party/asio/asio/include/asio/buffered_write_stream.hpp +245 -0
- data/ext/third_party/asio/asio/include/asio/buffered_write_stream_fwd.hpp +25 -0
- data/ext/third_party/asio/asio/include/asio/buffers_iterator.hpp +521 -0
- data/ext/third_party/asio/asio/include/asio/co_spawn.hpp +471 -0
- data/ext/third_party/asio/asio/include/asio/completion_condition.hpp +218 -0
- data/ext/third_party/asio/asio/include/asio/compose.hpp +136 -0
- data/ext/third_party/asio/asio/include/asio/connect.hpp +1076 -0
- data/ext/third_party/asio/asio/include/asio/coroutine.hpp +328 -0
- data/ext/third_party/asio/asio/include/asio/deadline_timer.hpp +38 -0
- data/ext/third_party/asio/asio/include/asio/defer.hpp +130 -0
- data/ext/third_party/asio/asio/include/asio/detached.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/detail/array.hpp +38 -0
- data/ext/third_party/asio/asio/include/asio/detail/array_fwd.hpp +34 -0
- data/ext/third_party/asio/asio/include/asio/detail/assert.hpp +32 -0
- data/ext/third_party/asio/asio/include/asio/detail/atomic_count.hpp +64 -0
- data/ext/third_party/asio/asio/include/asio/detail/base_from_completion_cond.hpp +69 -0
- data/ext/third_party/asio/asio/include/asio/detail/bind_handler.hpp +934 -0
- data/ext/third_party/asio/asio/include/asio/detail/blocking_executor_op.hpp +107 -0
- data/ext/third_party/asio/asio/include/asio/detail/buffer_resize_guard.hpp +66 -0
- data/ext/third_party/asio/asio/include/asio/detail/buffer_sequence_adapter.hpp +650 -0
- data/ext/third_party/asio/asio/include/asio/detail/buffered_stream_storage.hpp +126 -0
- data/ext/third_party/asio/asio/include/asio/detail/bulk_executor_op.hpp +88 -0
- data/ext/third_party/asio/asio/include/asio/detail/call_stack.hpp +125 -0
- data/ext/third_party/asio/asio/include/asio/detail/chrono.hpp +66 -0
- data/ext/third_party/asio/asio/include/asio/detail/chrono_time_traits.hpp +190 -0
- data/ext/third_party/asio/asio/include/asio/detail/completion_handler.hpp +88 -0
- data/ext/third_party/asio/asio/include/asio/detail/concurrency_hint.hpp +94 -0
- data/ext/third_party/asio/asio/include/asio/detail/conditionally_enabled_event.hpp +120 -0
- data/ext/third_party/asio/asio/include/asio/detail/conditionally_enabled_mutex.hpp +149 -0
- data/ext/third_party/asio/asio/include/asio/detail/config.hpp +1822 -0
- data/ext/third_party/asio/asio/include/asio/detail/consuming_buffers.hpp +414 -0
- data/ext/third_party/asio/asio/include/asio/detail/cstddef.hpp +31 -0
- data/ext/third_party/asio/asio/include/asio/detail/cstdint.hpp +60 -0
- data/ext/third_party/asio/asio/include/asio/detail/date_time_fwd.hpp +34 -0
- data/ext/third_party/asio/asio/include/asio/detail/deadline_timer_service.hpp +295 -0
- data/ext/third_party/asio/asio/include/asio/detail/dependent_type.hpp +36 -0
- data/ext/third_party/asio/asio/include/asio/detail/descriptor_ops.hpp +139 -0
- data/ext/third_party/asio/asio/include/asio/detail/descriptor_read_op.hpp +148 -0
- data/ext/third_party/asio/asio/include/asio/detail/descriptor_write_op.hpp +148 -0
- data/ext/third_party/asio/asio/include/asio/detail/dev_poll_reactor.hpp +218 -0
- data/ext/third_party/asio/asio/include/asio/detail/epoll_reactor.hpp +266 -0
- data/ext/third_party/asio/asio/include/asio/detail/event.hpp +48 -0
- data/ext/third_party/asio/asio/include/asio/detail/eventfd_select_interrupter.hpp +83 -0
- data/ext/third_party/asio/asio/include/asio/detail/executor_function.hpp +203 -0
- data/ext/third_party/asio/asio/include/asio/detail/executor_op.hpp +84 -0
- data/ext/third_party/asio/asio/include/asio/detail/fd_set_adapter.hpp +39 -0
- data/ext/third_party/asio/asio/include/asio/detail/fenced_block.hpp +80 -0
- data/ext/third_party/asio/asio/include/asio/detail/functional.hpp +38 -0
- data/ext/third_party/asio/asio/include/asio/detail/future.hpp +33 -0
- data/ext/third_party/asio/asio/include/asio/detail/gcc_arm_fenced_block.hpp +91 -0
- data/ext/third_party/asio/asio/include/asio/detail/gcc_hppa_fenced_block.hpp +68 -0
- data/ext/third_party/asio/asio/include/asio/detail/gcc_sync_fenced_block.hpp +65 -0
- data/ext/third_party/asio/asio/include/asio/detail/gcc_x86_fenced_block.hpp +99 -0
- data/ext/third_party/asio/asio/include/asio/detail/global.hpp +52 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_alloc_helpers.hpp +284 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_cont_helpers.hpp +45 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_invoke_helpers.hpp +80 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_tracking.hpp +264 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_type_requirements.hpp +556 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_work.hpp +438 -0
- data/ext/third_party/asio/asio/include/asio/detail/hash_map.hpp +331 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp +118 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/descriptor_ops.ipp +608 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/dev_poll_reactor.hpp +91 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/dev_poll_reactor.ipp +446 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/epoll_reactor.hpp +89 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/epoll_reactor.ipp +787 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp +169 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/handler_tracking.ipp +396 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/kqueue_reactor.hpp +93 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/kqueue_reactor.ipp +570 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/null_event.ipp +74 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/pipe_select_interrupter.ipp +129 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/posix_event.ipp +59 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/posix_mutex.ipp +46 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/posix_thread.ipp +84 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/posix_tss_ptr.ipp +46 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/reactive_descriptor_service.ipp +223 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/reactive_serial_port_service.ipp +149 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/reactive_socket_service_base.ipp +300 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/resolver_service_base.ipp +158 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/scheduler.ipp +654 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/select_reactor.hpp +100 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/select_reactor.ipp +338 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/service_registry.hpp +94 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/service_registry.ipp +197 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/signal_set_service.ipp +668 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/socket_ops.ipp +3962 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/socket_select_interrupter.ipp +185 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/strand_executor_service.hpp +385 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/strand_executor_service.ipp +134 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/strand_service.hpp +117 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/strand_service.ipp +178 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/throw_error.ipp +60 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/timer_queue_ptime.ipp +91 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/timer_queue_set.ipp +101 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_event.ipp +76 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_iocp_handle_service.ipp +525 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_iocp_io_context.hpp +103 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_iocp_io_context.ipp +603 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp +192 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp +801 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_mutex.ipp +84 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_object_handle_service.ipp +448 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_static_mutex.ipp +136 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_thread.ipp +150 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/win_tss_ptr.ipp +57 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp +626 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp +92 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp +121 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/winsock_init.ipp +82 -0
- data/ext/third_party/asio/asio/include/asio/detail/io_control.hpp +84 -0
- data/ext/third_party/asio/asio/include/asio/detail/io_object_impl.hpp +175 -0
- data/ext/third_party/asio/asio/include/asio/detail/is_buffer_sequence.hpp +312 -0
- data/ext/third_party/asio/asio/include/asio/detail/is_executor.hpp +126 -0
- data/ext/third_party/asio/asio/include/asio/detail/keyword_tss_ptr.hpp +70 -0
- data/ext/third_party/asio/asio/include/asio/detail/kqueue_reactor.hpp +242 -0
- data/ext/third_party/asio/asio/include/asio/detail/limits.hpp +26 -0
- data/ext/third_party/asio/asio/include/asio/detail/local_free_on_block_exit.hpp +59 -0
- data/ext/third_party/asio/asio/include/asio/detail/macos_fenced_block.hpp +62 -0
- data/ext/third_party/asio/asio/include/asio/detail/memory.hpp +73 -0
- data/ext/third_party/asio/asio/include/asio/detail/mutex.hpp +48 -0
- data/ext/third_party/asio/asio/include/asio/detail/non_const_lvalue.hpp +54 -0
- data/ext/third_party/asio/asio/include/asio/detail/noncopyable.hpp +43 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_event.hpp +106 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_fenced_block.hpp +47 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_global.hpp +59 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_mutex.hpp +64 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_reactor.hpp +68 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_signal_blocker.hpp +69 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_socket_service.hpp +519 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_static_mutex.hpp +60 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_thread.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/detail/null_tss_ptr.hpp +68 -0
- data/ext/third_party/asio/asio/include/asio/detail/object_pool.hpp +171 -0
- data/ext/third_party/asio/asio/include/asio/detail/old_win_sdk_compat.hpp +214 -0
- data/ext/third_party/asio/asio/include/asio/detail/op_queue.hpp +162 -0
- data/ext/third_party/asio/asio/include/asio/detail/operation.hpp +38 -0
- data/ext/third_party/asio/asio/include/asio/detail/pipe_select_interrupter.hpp +89 -0
- data/ext/third_party/asio/asio/include/asio/detail/pop_options.hpp +141 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_event.hpp +175 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_fd_set_adapter.hpp +118 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_global.hpp +80 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_mutex.hpp +76 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_signal_blocker.hpp +85 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_static_mutex.hpp +64 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_thread.hpp +109 -0
- data/ext/third_party/asio/asio/include/asio/detail/posix_tss_ptr.hpp +79 -0
- data/ext/third_party/asio/asio/include/asio/detail/push_options.hpp +185 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_descriptor_service.hpp +416 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_null_buffers_op.hpp +98 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_serial_port_service.hpp +237 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_accept_op.hpp +242 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_connect_op.hpp +123 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_recv_op.hpp +159 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp +164 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp +145 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_send_op.hpp +162 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_sendto_op.hpp +156 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_service.hpp +528 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_service_base.hpp +541 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_wait_op.hpp +98 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactor.hpp +32 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactor_fwd.hpp +40 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactor_op.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactor_op_queue.hpp +168 -0
- data/ext/third_party/asio/asio/include/asio/detail/recycling_allocator.hpp +106 -0
- data/ext/third_party/asio/asio/include/asio/detail/regex_fwd.hpp +35 -0
- data/ext/third_party/asio/asio/include/asio/detail/resolve_endpoint_op.hpp +140 -0
- data/ext/third_party/asio/asio/include/asio/detail/resolve_op.hpp +45 -0
- data/ext/third_party/asio/asio/include/asio/detail/resolve_query_op.hpp +150 -0
- data/ext/third_party/asio/asio/include/asio/detail/resolver_service.hpp +145 -0
- data/ext/third_party/asio/asio/include/asio/detail/resolver_service_base.hpp +143 -0
- data/ext/third_party/asio/asio/include/asio/detail/scheduler.hpp +232 -0
- data/ext/third_party/asio/asio/include/asio/detail/scheduler_operation.hpp +78 -0
- data/ext/third_party/asio/asio/include/asio/detail/scheduler_thread_info.hpp +40 -0
- data/ext/third_party/asio/asio/include/asio/detail/scoped_lock.hpp +101 -0
- data/ext/third_party/asio/asio/include/asio/detail/scoped_ptr.hpp +87 -0
- data/ext/third_party/asio/asio/include/asio/detail/select_interrupter.hpp +46 -0
- data/ext/third_party/asio/asio/include/asio/detail/select_reactor.hpp +238 -0
- data/ext/third_party/asio/asio/include/asio/detail/service_registry.hpp +164 -0
- data/ext/third_party/asio/asio/include/asio/detail/signal_blocker.hpp +44 -0
- data/ext/third_party/asio/asio/include/asio/detail/signal_handler.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/detail/signal_init.hpp +47 -0
- data/ext/third_party/asio/asio/include/asio/detail/signal_op.hpp +49 -0
- data/ext/third_party/asio/asio/include/asio/detail/signal_set_service.hpp +229 -0
- data/ext/third_party/asio/asio/include/asio/detail/socket_holder.hpp +98 -0
- data/ext/third_party/asio/asio/include/asio/detail/socket_ops.hpp +383 -0
- data/ext/third_party/asio/asio/include/asio/detail/socket_option.hpp +316 -0
- data/ext/third_party/asio/asio/include/asio/detail/socket_select_interrupter.hpp +91 -0
- data/ext/third_party/asio/asio/include/asio/detail/socket_types.hpp +416 -0
- data/ext/third_party/asio/asio/include/asio/detail/solaris_fenced_block.hpp +62 -0
- data/ext/third_party/asio/asio/include/asio/detail/source_location.hpp +45 -0
- data/ext/third_party/asio/asio/include/asio/detail/static_mutex.hpp +52 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_event.hpp +188 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_fenced_block.hpp +62 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_global.hpp +70 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_mutex.hpp +73 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_static_mutex.hpp +81 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_thread.hpp +71 -0
- data/ext/third_party/asio/asio/include/asio/detail/strand_executor_service.hpp +166 -0
- data/ext/third_party/asio/asio/include/asio/detail/strand_service.hpp +145 -0
- data/ext/third_party/asio/asio/include/asio/detail/string_view.hpp +47 -0
- data/ext/third_party/asio/asio/include/asio/detail/thread.hpp +60 -0
- data/ext/third_party/asio/asio/include/asio/detail/thread_context.hpp +42 -0
- data/ext/third_party/asio/asio/include/asio/detail/thread_group.hpp +95 -0
- data/ext/third_party/asio/asio/include/asio/detail/thread_info_base.hpp +183 -0
- data/ext/third_party/asio/asio/include/asio/detail/throw_error.hpp +53 -0
- data/ext/third_party/asio/asio/include/asio/detail/throw_exception.hpp +51 -0
- data/ext/third_party/asio/asio/include/asio/detail/timer_queue.hpp +360 -0
- data/ext/third_party/asio/asio/include/asio/detail/timer_queue_base.hpp +68 -0
- data/ext/third_party/asio/asio/include/asio/detail/timer_queue_ptime.hpp +99 -0
- data/ext/third_party/asio/asio/include/asio/detail/timer_queue_set.hpp +66 -0
- data/ext/third_party/asio/asio/include/asio/detail/timer_scheduler.hpp +35 -0
- data/ext/third_party/asio/asio/include/asio/detail/timer_scheduler_fwd.hpp +40 -0
- data/ext/third_party/asio/asio/include/asio/detail/tss_ptr.hpp +69 -0
- data/ext/third_party/asio/asio/include/asio/detail/type_traits.hpp +148 -0
- data/ext/third_party/asio/asio/include/asio/detail/variadic_templates.hpp +294 -0
- data/ext/third_party/asio/asio/include/asio/detail/wait_handler.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/detail/wait_op.hpp +45 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_event.hpp +164 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_fd_set_adapter.hpp +149 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_fenced_block.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_global.hpp +71 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_handle_read_op.hpp +117 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_handle_service.hpp +335 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_handle_write_op.hpp +110 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_io_context.hpp +342 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_null_buffers_op.hpp +127 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_operation.hpp +96 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_overlapped_op.hpp +96 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp +171 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_serial_port_service.hpp +232 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_accept_op.hpp +312 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_connect_op.hpp +135 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_recv_op.hpp +124 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp +133 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp +125 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_send_op.hpp +118 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_service.hpp +581 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_service_base.hpp +600 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_thread_info.hpp +34 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_wait_op.hpp +128 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_mutex.hpp +78 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_object_handle_service.hpp +195 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_static_mutex.hpp +74 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_thread.hpp +147 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_tss_ptr.hpp +79 -0
- data/ext/third_party/asio/asio/include/asio/detail/winapp_thread.hpp +124 -0
- data/ext/third_party/asio/asio/include/asio/detail/wince_thread.hpp +124 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_async_manager.hpp +305 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_async_op.hpp +65 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_resolve_op.hpp +125 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_resolver_service.hpp +212 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_socket_connect_op.hpp +98 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_socket_recv_op.hpp +119 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_socket_send_op.hpp +110 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_ssocket_service.hpp +250 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_ssocket_service_base.hpp +362 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_timer_scheduler.hpp +147 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_utils.hpp +106 -0
- data/ext/third_party/asio/asio/include/asio/detail/winsock_init.hpp +128 -0
- data/ext/third_party/asio/asio/include/asio/detail/work_dispatcher.hpp +148 -0
- data/ext/third_party/asio/asio/include/asio/detail/wrapped_handler.hpp +327 -0
- data/ext/third_party/asio/asio/include/asio/dispatch.hpp +121 -0
- data/ext/third_party/asio/asio/include/asio/error.hpp +356 -0
- data/ext/third_party/asio/asio/include/asio/error_code.hpp +202 -0
- data/ext/third_party/asio/asio/include/asio/execution.hpp +48 -0
- data/ext/third_party/asio/asio/include/asio/execution/allocator.hpp +249 -0
- data/ext/third_party/asio/asio/include/asio/execution/any_executor.hpp +2264 -0
- data/ext/third_party/asio/asio/include/asio/execution/bad_executor.hpp +47 -0
- data/ext/third_party/asio/asio/include/asio/execution/blocking.hpp +1351 -0
- data/ext/third_party/asio/asio/include/asio/execution/blocking_adaptation.hpp +1064 -0
- data/ext/third_party/asio/asio/include/asio/execution/bulk_execute.hpp +390 -0
- data/ext/third_party/asio/asio/include/asio/execution/bulk_guarantee.hpp +1018 -0
- data/ext/third_party/asio/asio/include/asio/execution/connect.hpp +486 -0
- data/ext/third_party/asio/asio/include/asio/execution/context.hpp +185 -0
- data/ext/third_party/asio/asio/include/asio/execution/context_as.hpp +201 -0
- data/ext/third_party/asio/asio/include/asio/execution/detail/as_invocable.hpp +152 -0
- data/ext/third_party/asio/asio/include/asio/execution/detail/as_operation.hpp +105 -0
- data/ext/third_party/asio/asio/include/asio/execution/detail/as_receiver.hpp +128 -0
- data/ext/third_party/asio/asio/include/asio/execution/detail/bulk_sender.hpp +261 -0
- data/ext/third_party/asio/asio/include/asio/execution/detail/submit_receiver.hpp +233 -0
- data/ext/third_party/asio/asio/include/asio/execution/detail/void_receiver.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/execution/execute.hpp +264 -0
- data/ext/third_party/asio/asio/include/asio/execution/executor.hpp +238 -0
- data/ext/third_party/asio/asio/include/asio/execution/impl/bad_executor.ipp +40 -0
- data/ext/third_party/asio/asio/include/asio/execution/impl/receiver_invocation_error.ipp +36 -0
- data/ext/third_party/asio/asio/include/asio/execution/invocable_archetype.hpp +71 -0
- data/ext/third_party/asio/asio/include/asio/execution/mapping.hpp +917 -0
- data/ext/third_party/asio/asio/include/asio/execution/occupancy.hpp +178 -0
- data/ext/third_party/asio/asio/include/asio/execution/operation_state.hpp +94 -0
- data/ext/third_party/asio/asio/include/asio/execution/outstanding_work.hpp +721 -0
- data/ext/third_party/asio/asio/include/asio/execution/prefer_only.hpp +327 -0
- data/ext/third_party/asio/asio/include/asio/execution/receiver.hpp +280 -0
- data/ext/third_party/asio/asio/include/asio/execution/receiver_invocation_error.hpp +48 -0
- data/ext/third_party/asio/asio/include/asio/execution/relationship.hpp +720 -0
- data/ext/third_party/asio/asio/include/asio/execution/schedule.hpp +290 -0
- data/ext/third_party/asio/asio/include/asio/execution/scheduler.hpp +86 -0
- data/ext/third_party/asio/asio/include/asio/execution/sender.hpp +311 -0
- data/ext/third_party/asio/asio/include/asio/execution/set_done.hpp +253 -0
- data/ext/third_party/asio/asio/include/asio/execution/set_error.hpp +253 -0
- data/ext/third_party/asio/asio/include/asio/execution/set_value.hpp +486 -0
- data/ext/third_party/asio/asio/include/asio/execution/start.hpp +250 -0
- data/ext/third_party/asio/asio/include/asio/execution/submit.hpp +450 -0
- data/ext/third_party/asio/asio/include/asio/execution_context.hpp +412 -0
- data/ext/third_party/asio/asio/include/asio/executor.hpp +347 -0
- data/ext/third_party/asio/asio/include/asio/executor_work_guard.hpp +287 -0
- data/ext/third_party/asio/asio/include/asio/generic/basic_endpoint.hpp +193 -0
- data/ext/third_party/asio/asio/include/asio/generic/datagram_protocol.hpp +123 -0
- data/ext/third_party/asio/asio/include/asio/generic/detail/endpoint.hpp +133 -0
- data/ext/third_party/asio/asio/include/asio/generic/detail/impl/endpoint.ipp +110 -0
- data/ext/third_party/asio/asio/include/asio/generic/raw_protocol.hpp +121 -0
- data/ext/third_party/asio/asio/include/asio/generic/seq_packet_protocol.hpp +122 -0
- data/ext/third_party/asio/asio/include/asio/generic/stream_protocol.hpp +127 -0
- data/ext/third_party/asio/asio/include/asio/handler_alloc_hook.hpp +104 -0
- data/ext/third_party/asio/asio/include/asio/handler_continuation_hook.hpp +54 -0
- data/ext/third_party/asio/asio/include/asio/handler_invoke_hook.hpp +111 -0
- data/ext/third_party/asio/asio/include/asio/high_resolution_timer.hpp +44 -0
- data/ext/third_party/asio/asio/include/asio/impl/awaitable.hpp +436 -0
- data/ext/third_party/asio/asio/include/asio/impl/buffered_read_stream.hpp +527 -0
- data/ext/third_party/asio/asio/include/asio/impl/buffered_write_stream.hpp +507 -0
- data/ext/third_party/asio/asio/include/asio/impl/co_spawn.hpp +298 -0
- data/ext/third_party/asio/asio/include/asio/impl/compose.hpp +635 -0
- data/ext/third_party/asio/asio/include/asio/impl/connect.hpp +916 -0
- data/ext/third_party/asio/asio/include/asio/impl/defer.hpp +248 -0
- data/ext/third_party/asio/asio/include/asio/impl/detached.hpp +130 -0
- data/ext/third_party/asio/asio/include/asio/impl/dispatch.hpp +243 -0
- data/ext/third_party/asio/asio/include/asio/impl/error.ipp +128 -0
- data/ext/third_party/asio/asio/include/asio/impl/error_code.ipp +206 -0
- data/ext/third_party/asio/asio/include/asio/impl/execution_context.hpp +109 -0
- data/ext/third_party/asio/asio/include/asio/impl/execution_context.ipp +82 -0
- data/ext/third_party/asio/asio/include/asio/impl/executor.hpp +301 -0
- data/ext/third_party/asio/asio/include/asio/impl/executor.ipp +43 -0
- data/ext/third_party/asio/asio/include/asio/impl/handler_alloc_hook.ipp +61 -0
- data/ext/third_party/asio/asio/include/asio/impl/io_context.hpp +440 -0
- data/ext/third_party/asio/asio/include/asio/impl/io_context.ipp +175 -0
- data/ext/third_party/asio/asio/include/asio/impl/multiple_exceptions.ipp +49 -0
- data/ext/third_party/asio/asio/include/asio/impl/post.hpp +248 -0
- data/ext/third_party/asio/asio/include/asio/impl/read.hpp +1202 -0
- data/ext/third_party/asio/asio/include/asio/impl/read_at.hpp +744 -0
- data/ext/third_party/asio/asio/include/asio/impl/read_until.hpp +3335 -0
- data/ext/third_party/asio/asio/include/asio/impl/redirect_error.hpp +390 -0
- data/ext/third_party/asio/asio/include/asio/impl/serial_port_base.hpp +59 -0
- data/ext/third_party/asio/asio/include/asio/impl/serial_port_base.ipp +554 -0
- data/ext/third_party/asio/asio/include/asio/impl/spawn.hpp +526 -0
- data/ext/third_party/asio/asio/include/asio/impl/src.hpp +85 -0
- data/ext/third_party/asio/asio/include/asio/impl/system_context.hpp +34 -0
- data/ext/third_party/asio/asio/include/asio/impl/system_context.ipp +92 -0
- data/ext/third_party/asio/asio/include/asio/impl/system_executor.hpp +186 -0
- data/ext/third_party/asio/asio/include/asio/impl/thread_pool.hpp +350 -0
- data/ext/third_party/asio/asio/include/asio/impl/thread_pool.ipp +141 -0
- data/ext/third_party/asio/asio/include/asio/impl/use_awaitable.hpp +279 -0
- data/ext/third_party/asio/asio/include/asio/impl/use_future.hpp +1028 -0
- data/ext/third_party/asio/asio/include/asio/impl/write.hpp +1104 -0
- data/ext/third_party/asio/asio/include/asio/impl/write_at.hpp +666 -0
- data/ext/third_party/asio/asio/include/asio/io_context.hpp +1530 -0
- data/ext/third_party/asio/asio/include/asio/io_context_strand.hpp +376 -0
- data/ext/third_party/asio/asio/include/asio/io_service.hpp +33 -0
- data/ext/third_party/asio/asio/include/asio/io_service_strand.hpp +20 -0
- data/ext/third_party/asio/asio/include/asio/ip/address.hpp +268 -0
- data/ext/third_party/asio/asio/include/asio/ip/address_v4.hpp +335 -0
- data/ext/third_party/asio/asio/include/asio/ip/address_v4_iterator.hpp +162 -0
- data/ext/third_party/asio/asio/include/asio/ip/address_v4_range.hpp +134 -0
- data/ext/third_party/asio/asio/include/asio/ip/address_v6.hpp +341 -0
- data/ext/third_party/asio/asio/include/asio/ip/address_v6_iterator.hpp +183 -0
- data/ext/third_party/asio/asio/include/asio/ip/address_v6_range.hpp +129 -0
- data/ext/third_party/asio/asio/include/asio/ip/bad_address_cast.hpp +53 -0
- data/ext/third_party/asio/asio/include/asio/ip/basic_endpoint.hpp +264 -0
- data/ext/third_party/asio/asio/include/asio/ip/basic_resolver.hpp +1030 -0
- data/ext/third_party/asio/asio/include/asio/ip/basic_resolver_entry.hpp +113 -0
- data/ext/third_party/asio/asio/include/asio/ip/basic_resolver_iterator.hpp +192 -0
- data/ext/third_party/asio/asio/include/asio/ip/basic_resolver_query.hpp +244 -0
- data/ext/third_party/asio/asio/include/asio/ip/basic_resolver_results.hpp +311 -0
- data/ext/third_party/asio/asio/include/asio/ip/detail/endpoint.hpp +141 -0
- data/ext/third_party/asio/asio/include/asio/ip/detail/impl/endpoint.ipp +199 -0
- data/ext/third_party/asio/asio/include/asio/ip/detail/socket_option.hpp +566 -0
- data/ext/third_party/asio/asio/include/asio/ip/host_name.hpp +42 -0
- data/ext/third_party/asio/asio/include/asio/ip/icmp.hpp +115 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/address.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/address.ipp +239 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/address_v4.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/address_v4.ipp +210 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/address_v6.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/address_v6.ipp +350 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/basic_endpoint.hpp +43 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/host_name.ipp +54 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/network_v4.hpp +54 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/network_v4.ipp +216 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/network_v6.hpp +53 -0
- data/ext/third_party/asio/asio/include/asio/ip/impl/network_v6.ipp +185 -0
- data/ext/third_party/asio/asio/include/asio/ip/multicast.hpp +191 -0
- data/ext/third_party/asio/asio/include/asio/ip/network_v4.hpp +261 -0
- data/ext/third_party/asio/asio/include/asio/ip/network_v6.hpp +235 -0
- data/ext/third_party/asio/asio/include/asio/ip/resolver_base.hpp +129 -0
- data/ext/third_party/asio/asio/include/asio/ip/resolver_query_base.hpp +43 -0
- data/ext/third_party/asio/asio/include/asio/ip/tcp.hpp +155 -0
- data/ext/third_party/asio/asio/include/asio/ip/udp.hpp +111 -0
- data/ext/third_party/asio/asio/include/asio/ip/unicast.hpp +70 -0
- data/ext/third_party/asio/asio/include/asio/ip/v6_only.hpp +69 -0
- data/ext/third_party/asio/asio/include/asio/is_applicable_property.hpp +61 -0
- data/ext/third_party/asio/asio/include/asio/is_executor.hpp +46 -0
- data/ext/third_party/asio/asio/include/asio/is_read_buffered.hpp +59 -0
- data/ext/third_party/asio/asio/include/asio/is_write_buffered.hpp +59 -0
- data/ext/third_party/asio/asio/include/asio/local/basic_endpoint.hpp +247 -0
- data/ext/third_party/asio/asio/include/asio/local/connect_pair.hpp +101 -0
- data/ext/third_party/asio/asio/include/asio/local/datagram_protocol.hpp +80 -0
- data/ext/third_party/asio/asio/include/asio/local/detail/endpoint.hpp +139 -0
- data/ext/third_party/asio/asio/include/asio/local/detail/impl/endpoint.ipp +136 -0
- data/ext/third_party/asio/asio/include/asio/local/stream_protocol.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/multiple_exceptions.hpp +58 -0
- data/ext/third_party/asio/asio/include/asio/packaged_task.hpp +126 -0
- data/ext/third_party/asio/asio/include/asio/placeholders.hpp +151 -0
- data/ext/third_party/asio/asio/include/asio/posix/basic_descriptor.hpp +697 -0
- data/ext/third_party/asio/asio/include/asio/posix/basic_stream_descriptor.hpp +470 -0
- data/ext/third_party/asio/asio/include/asio/posix/descriptor.hpp +37 -0
- data/ext/third_party/asio/asio/include/asio/posix/descriptor_base.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/posix/stream_descriptor.hpp +37 -0
- data/ext/third_party/asio/asio/include/asio/post.hpp +126 -0
- data/ext/third_party/asio/asio/include/asio/prefer.hpp +656 -0
- data/ext/third_party/asio/asio/include/asio/query.hpp +296 -0
- data/ext/third_party/asio/asio/include/asio/read.hpp +1288 -0
- data/ext/third_party/asio/asio/include/asio/read_at.hpp +694 -0
- data/ext/third_party/asio/asio/include/asio/read_until.hpp +2863 -0
- data/ext/third_party/asio/asio/include/asio/redirect_error.hpp +66 -0
- data/ext/third_party/asio/asio/include/asio/require.hpp +524 -0
- data/ext/third_party/asio/asio/include/asio/require_concept.hpp +310 -0
- data/ext/third_party/asio/asio/include/asio/serial_port.hpp +36 -0
- data/ext/third_party/asio/asio/include/asio/serial_port_base.hpp +167 -0
- data/ext/third_party/asio/asio/include/asio/signal_set.hpp +28 -0
- data/ext/third_party/asio/asio/include/asio/socket_base.hpp +559 -0
- data/ext/third_party/asio/asio/include/asio/spawn.hpp +344 -0
- data/ext/third_party/asio/asio/include/asio/ssl.hpp +28 -0
- data/ext/third_party/asio/asio/include/asio/ssl/context.hpp +761 -0
- data/ext/third_party/asio/asio/include/asio/ssl/context_base.hpp +209 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/buffered_handshake_op.hpp +119 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/engine.hpp +165 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/handshake_op.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/impl/engine.ipp +349 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/impl/openssl_init.ipp +165 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/io.hpp +415 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/openssl_init.hpp +101 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/openssl_types.hpp +34 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/password_callback.hpp +66 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/read_op.hpp +72 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/shutdown_op.hpp +69 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/stream_core.hpp +169 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/verify_callback.hpp +62 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp +76 -0
- data/ext/third_party/asio/asio/include/asio/ssl/error.hpp +125 -0
- data/ext/third_party/asio/asio/include/asio/ssl/host_name_verification.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/ssl/impl/context.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/ssl/impl/context.ipp +1238 -0
- data/ext/third_party/asio/asio/include/asio/ssl/impl/error.ipp +102 -0
- data/ext/third_party/asio/asio/include/asio/ssl/impl/host_name_verification.ipp +73 -0
- data/ext/third_party/asio/asio/include/asio/ssl/impl/rfc2818_verification.ipp +164 -0
- data/ext/third_party/asio/asio/include/asio/ssl/impl/src.hpp +29 -0
- data/ext/third_party/asio/asio/include/asio/ssl/rfc2818_verification.hpp +98 -0
- data/ext/third_party/asio/asio/include/asio/ssl/stream.hpp +900 -0
- data/ext/third_party/asio/asio/include/asio/ssl/stream_base.hpp +52 -0
- data/ext/third_party/asio/asio/include/asio/ssl/verify_context.hpp +67 -0
- data/ext/third_party/asio/asio/include/asio/ssl/verify_mode.hpp +63 -0
- data/ext/third_party/asio/asio/include/asio/static_thread_pool.hpp +31 -0
- data/ext/third_party/asio/asio/include/asio/steady_timer.hpp +42 -0
- data/ext/third_party/asio/asio/include/asio/strand.hpp +537 -0
- data/ext/third_party/asio/asio/include/asio/streambuf.hpp +33 -0
- data/ext/third_party/asio/asio/include/asio/system_context.hpp +90 -0
- data/ext/third_party/asio/asio/include/asio/system_error.hpp +131 -0
- data/ext/third_party/asio/asio/include/asio/system_executor.hpp +662 -0
- data/ext/third_party/asio/asio/include/asio/system_timer.hpp +42 -0
- data/ext/third_party/asio/asio/include/asio/this_coro.hpp +45 -0
- data/ext/third_party/asio/asio/include/asio/thread.hpp +92 -0
- data/ext/third_party/asio/asio/include/asio/thread_pool.hpp +1111 -0
- data/ext/third_party/asio/asio/include/asio/time_traits.hpp +86 -0
- data/ext/third_party/asio/asio/include/asio/traits/bulk_execute_free.hpp +114 -0
- data/ext/third_party/asio/asio/include/asio/traits/bulk_execute_member.hpp +114 -0
- data/ext/third_party/asio/asio/include/asio/traits/connect_free.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/traits/connect_member.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/traits/equality_comparable.hpp +100 -0
- data/ext/third_party/asio/asio/include/asio/traits/execute_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/execute_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/prefer_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/prefer_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/query_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/query_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/query_static_constexpr_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/require_concept_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/require_concept_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/require_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/require_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/schedule_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/schedule_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/set_done_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/set_done_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/set_error_free.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/traits/set_error_member.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/traits/set_value_free.hpp +234 -0
- data/ext/third_party/asio/asio/include/asio/traits/set_value_member.hpp +234 -0
- data/ext/third_party/asio/asio/include/asio/traits/start_free.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/start_member.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/static_query.hpp +108 -0
- data/ext/third_party/asio/asio/include/asio/traits/static_require.hpp +123 -0
- data/ext/third_party/asio/asio/include/asio/traits/static_require_concept.hpp +123 -0
- data/ext/third_party/asio/asio/include/asio/traits/submit_free.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/traits/submit_member.hpp +112 -0
- data/ext/third_party/asio/asio/include/asio/ts/buffer.hpp +24 -0
- data/ext/third_party/asio/asio/include/asio/ts/executor.hpp +35 -0
- data/ext/third_party/asio/asio/include/asio/ts/internet.hpp +40 -0
- data/ext/third_party/asio/asio/include/asio/ts/io_context.hpp +20 -0
- data/ext/third_party/asio/asio/include/asio/ts/net.hpp +26 -0
- data/ext/third_party/asio/asio/include/asio/ts/netfwd.hpp +262 -0
- data/ext/third_party/asio/asio/include/asio/ts/socket.hpp +27 -0
- data/ext/third_party/asio/asio/include/asio/ts/timer.hpp +26 -0
- data/ext/third_party/asio/asio/include/asio/unyield.hpp +21 -0
- data/ext/third_party/asio/asio/include/asio/use_awaitable.hpp +169 -0
- data/ext/third_party/asio/asio/include/asio/use_future.hpp +160 -0
- data/ext/third_party/asio/asio/include/asio/uses_executor.hpp +71 -0
- data/ext/third_party/asio/asio/include/asio/version.hpp +23 -0
- data/ext/third_party/asio/asio/include/asio/wait_traits.hpp +56 -0
- data/ext/third_party/asio/asio/include/asio/windows/basic_object_handle.hpp +435 -0
- data/ext/third_party/asio/asio/include/asio/windows/basic_overlapped_handle.hpp +361 -0
- data/ext/third_party/asio/asio/include/asio/windows/basic_random_access_handle.hpp +490 -0
- data/ext/third_party/asio/asio/include/asio/windows/basic_stream_handle.hpp +474 -0
- data/ext/third_party/asio/asio/include/asio/windows/object_handle.hpp +38 -0
- data/ext/third_party/asio/asio/include/asio/windows/overlapped_handle.hpp +39 -0
- data/ext/third_party/asio/asio/include/asio/windows/overlapped_ptr.hpp +145 -0
- data/ext/third_party/asio/asio/include/asio/windows/random_access_handle.hpp +37 -0
- data/ext/third_party/asio/asio/include/asio/windows/stream_handle.hpp +37 -0
- data/ext/third_party/asio/asio/include/asio/write.hpp +1246 -0
- data/ext/third_party/asio/asio/include/asio/write_at.hpp +702 -0
- data/ext/third_party/asio/asio/include/asio/yield.hpp +23 -0
- data/ext/third_party/gsl/CMakeLists.txt +127 -0
- data/ext/third_party/gsl/LICENSE +21 -0
- data/ext/third_party/gsl/ThirdPartyNotices.txt +41 -0
- data/ext/third_party/gsl/include/gsl/gsl +29 -0
- data/ext/third_party/gsl/include/gsl/gsl_algorithm +61 -0
- data/ext/third_party/gsl/include/gsl/gsl_assert +133 -0
- data/ext/third_party/gsl/include/gsl/gsl_byte +209 -0
- data/ext/third_party/gsl/include/gsl/gsl_narrow +52 -0
- data/ext/third_party/gsl/include/gsl/gsl_util +129 -0
- data/ext/third_party/gsl/include/gsl/multi_span +2263 -0
- data/ext/third_party/gsl/include/gsl/pointers +287 -0
- data/ext/third_party/gsl/include/gsl/span +816 -0
- data/ext/third_party/gsl/include/gsl/span_ext +198 -0
- data/ext/third_party/gsl/include/gsl/string_span +706 -0
- data/ext/third_party/http_parser/LICENSE-MIT +19 -0
- data/ext/third_party/http_parser/http_parser.c +2575 -0
- data/ext/third_party/http_parser/http_parser.h +449 -0
- data/ext/third_party/json/CMakeLists.txt +44 -0
- data/ext/third_party/json/LICENSE +21 -0
- data/ext/third_party/json/LICENSE.double-conversion +32 -0
- data/ext/third_party/json/LICENSE.itoa +19 -0
- data/ext/third_party/json/LICENSE.ryu +201 -0
- data/ext/third_party/json/include/tao/json.hpp +45 -0
- data/ext/third_party/json/include/tao/json/basic_value.hpp +942 -0
- data/ext/third_party/json/include/tao/json/binary.hpp +103 -0
- data/ext/third_party/json/include/tao/json/binary_view.hpp +31 -0
- data/ext/third_party/json/include/tao/json/binding.hpp +71 -0
- data/ext/third_party/json/include/tao/json/binding/constant.hpp +232 -0
- data/ext/third_party/json/include/tao/json/binding/element.hpp +182 -0
- data/ext/third_party/json/include/tao/json/binding/factory.hpp +251 -0
- data/ext/third_party/json/include/tao/json/binding/for_nothing_value.hpp +17 -0
- data/ext/third_party/json/include/tao/json/binding/for_unknown_key.hpp +17 -0
- data/ext/third_party/json/include/tao/json/binding/inherit.hpp +14 -0
- data/ext/third_party/json/include/tao/json/binding/internal/array.hpp +104 -0
- data/ext/third_party/json/include/tao/json/binding/internal/inherit.hpp +45 -0
- data/ext/third_party/json/include/tao/json/binding/internal/object.hpp +268 -0
- data/ext/third_party/json/include/tao/json/binding/internal/type_key.hpp +54 -0
- data/ext/third_party/json/include/tao/json/binding/member.hpp +32 -0
- data/ext/third_party/json/include/tao/json/binding/member_kind.hpp +17 -0
- data/ext/third_party/json/include/tao/json/binding/versions.hpp +129 -0
- data/ext/third_party/json/include/tao/json/cbor.hpp +19 -0
- data/ext/third_party/json/include/tao/json/cbor/consume_file.hpp +34 -0
- data/ext/third_party/json/include/tao/json/cbor/consume_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/cbor/events/from_binary.hpp +43 -0
- data/ext/third_party/json/include/tao/json/cbor/events/from_file.hpp +27 -0
- data/ext/third_party/json/include/tao/json/cbor/events/from_input.hpp +43 -0
- data/ext/third_party/json/include/tao/json/cbor/events/from_string.hpp +37 -0
- data/ext/third_party/json/include/tao/json/cbor/events/to_stream.hpp +161 -0
- data/ext/third_party/json/include/tao/json/cbor/events/to_string.hpp +31 -0
- data/ext/third_party/json/include/tao/json/cbor/from_binary.hpp +32 -0
- data/ext/third_party/json/include/tao/json/cbor/from_file.hpp +33 -0
- data/ext/third_party/json/include/tao/json/cbor/from_input.hpp +33 -0
- data/ext/third_party/json/include/tao/json/cbor/from_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/cbor/internal/grammar.hpp +418 -0
- data/ext/third_party/json/include/tao/json/cbor/internal/major.hpp +28 -0
- data/ext/third_party/json/include/tao/json/cbor/parts_parser.hpp +392 -0
- data/ext/third_party/json/include/tao/json/cbor/to_stream.hpp +27 -0
- data/ext/third_party/json/include/tao/json/cbor/to_string.hpp +28 -0
- data/ext/third_party/json/include/tao/json/consume.hpp +43 -0
- data/ext/third_party/json/include/tao/json/consume_file.hpp +33 -0
- data/ext/third_party/json/include/tao/json/consume_string.hpp +31 -0
- data/ext/third_party/json/include/tao/json/contrib/array_traits.hpp +43 -0
- data/ext/third_party/json/include/tao/json/contrib/deque_traits.hpp +41 -0
- data/ext/third_party/json/include/tao/json/contrib/diff.hpp +106 -0
- data/ext/third_party/json/include/tao/json/contrib/get.hpp +152 -0
- data/ext/third_party/json/include/tao/json/contrib/internal/array_traits.hpp +92 -0
- data/ext/third_party/json/include/tao/json/contrib/internal/indirect_traits.hpp +76 -0
- data/ext/third_party/json/include/tao/json/contrib/internal/object_traits.hpp +105 -0
- data/ext/third_party/json/include/tao/json/contrib/internal/type_traits.hpp +36 -0
- data/ext/third_party/json/include/tao/json/contrib/list_traits.hpp +41 -0
- data/ext/third_party/json/include/tao/json/contrib/map_traits.hpp +43 -0
- data/ext/third_party/json/include/tao/json/contrib/multimap_traits.hpp +43 -0
- data/ext/third_party/json/include/tao/json/contrib/multiset_traits.hpp +41 -0
- data/ext/third_party/json/include/tao/json/contrib/pair_traits.hpp +21 -0
- data/ext/third_party/json/include/tao/json/contrib/patch.hpp +105 -0
- data/ext/third_party/json/include/tao/json/contrib/pointer_traits.hpp +59 -0
- data/ext/third_party/json/include/tao/json/contrib/position.hpp +166 -0
- data/ext/third_party/json/include/tao/json/contrib/reference.hpp +113 -0
- data/ext/third_party/json/include/tao/json/contrib/schema.hpp +1874 -0
- data/ext/third_party/json/include/tao/json/contrib/set_traits.hpp +41 -0
- data/ext/third_party/json/include/tao/json/contrib/shared_ptr_traits.hpp +98 -0
- data/ext/third_party/json/include/tao/json/contrib/traits.hpp +121 -0
- data/ext/third_party/json/include/tao/json/contrib/tuple_traits.hpp +51 -0
- data/ext/third_party/json/include/tao/json/contrib/unique_ptr_traits.hpp +97 -0
- data/ext/third_party/json/include/tao/json/contrib/unordered_map_traits.hpp +43 -0
- data/ext/third_party/json/include/tao/json/contrib/unordered_set_traits.hpp +41 -0
- data/ext/third_party/json/include/tao/json/contrib/vector_bool_traits.hpp +45 -0
- data/ext/third_party/json/include/tao/json/contrib/vector_traits.hpp +51 -0
- data/ext/third_party/json/include/tao/json/events.hpp +47 -0
- data/ext/third_party/json/include/tao/json/events/apply.hpp +20 -0
- data/ext/third_party/json/include/tao/json/events/binary_to_base64.hpp +26 -0
- data/ext/third_party/json/include/tao/json/events/binary_to_base64url.hpp +28 -0
- data/ext/third_party/json/include/tao/json/events/binary_to_exception.hpp +27 -0
- data/ext/third_party/json/include/tao/json/events/binary_to_hex.hpp +26 -0
- data/ext/third_party/json/include/tao/json/events/compare.hpp +255 -0
- data/ext/third_party/json/include/tao/json/events/debug.hpp +145 -0
- data/ext/third_party/json/include/tao/json/events/discard.hpp +43 -0
- data/ext/third_party/json/include/tao/json/events/from_file.hpp +28 -0
- data/ext/third_party/json/include/tao/json/events/from_input.hpp +45 -0
- data/ext/third_party/json/include/tao/json/events/from_stream.hpp +33 -0
- data/ext/third_party/json/include/tao/json/events/from_string.hpp +38 -0
- data/ext/third_party/json/include/tao/json/events/from_value.hpp +202 -0
- data/ext/third_party/json/include/tao/json/events/hash.hpp +174 -0
- data/ext/third_party/json/include/tao/json/events/invalid_string_to_binary.hpp +50 -0
- data/ext/third_party/json/include/tao/json/events/invalid_string_to_exception.hpp +49 -0
- data/ext/third_party/json/include/tao/json/events/invalid_string_to_hex.hpp +48 -0
- data/ext/third_party/json/include/tao/json/events/key_camel_case_to_snake_case.hpp +62 -0
- data/ext/third_party/json/include/tao/json/events/key_snake_case_to_camel_case.hpp +57 -0
- data/ext/third_party/json/include/tao/json/events/limit_nesting_depth.hpp +82 -0
- data/ext/third_party/json/include/tao/json/events/limit_value_count.hpp +46 -0
- data/ext/third_party/json/include/tao/json/events/non_finite_to_exception.hpp +31 -0
- data/ext/third_party/json/include/tao/json/events/non_finite_to_null.hpp +32 -0
- data/ext/third_party/json/include/tao/json/events/non_finite_to_string.hpp +40 -0
- data/ext/third_party/json/include/tao/json/events/prefer_signed.hpp +32 -0
- data/ext/third_party/json/include/tao/json/events/prefer_unsigned.hpp +32 -0
- data/ext/third_party/json/include/tao/json/events/produce.hpp +22 -0
- data/ext/third_party/json/include/tao/json/events/ref.hpp +111 -0
- data/ext/third_party/json/include/tao/json/events/statistics.hpp +112 -0
- data/ext/third_party/json/include/tao/json/events/tee.hpp +386 -0
- data/ext/third_party/json/include/tao/json/events/to_pretty_stream.hpp +172 -0
- data/ext/third_party/json/include/tao/json/events/to_stream.hpp +142 -0
- data/ext/third_party/json/include/tao/json/events/to_string.hpp +33 -0
- data/ext/third_party/json/include/tao/json/events/to_value.hpp +137 -0
- data/ext/third_party/json/include/tao/json/events/transformer.hpp +70 -0
- data/ext/third_party/json/include/tao/json/events/validate_event_order.hpp +411 -0
- data/ext/third_party/json/include/tao/json/events/validate_keys.hpp +51 -0
- data/ext/third_party/json/include/tao/json/events/virtual_base.hpp +192 -0
- data/ext/third_party/json/include/tao/json/events/virtual_ref.hpp +176 -0
- data/ext/third_party/json/include/tao/json/external/double.hpp +1313 -0
- data/ext/third_party/json/include/tao/json/external/itoa.hpp +149 -0
- data/ext/third_party/json/include/tao/json/external/pegtl.hpp +44 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/apply_mode.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/argv_input.hpp +49 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/ascii.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/buffer_input.hpp +212 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/change_action.hpp +38 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/change_action_and_state.hpp +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/change_action_and_states.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/change_control.hpp +36 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/change_state.hpp +50 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/change_states.hpp +61 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/config.hpp +11 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/abnf.hpp +35 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/alphabet.hpp +67 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/analyze.hpp +176 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/analyze_traits.hpp +275 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/control_action.hpp +77 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/coverage.hpp +151 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/forward.hpp +16 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/http.hpp +272 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/internal.hpp +66 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/utf16.hpp +196 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/utf32.hpp +196 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/utf8.hpp +103 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/if_then.hpp +56 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/integer.hpp +431 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/endian.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/endian_gcc.hpp +206 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/endian_win.hpp +106 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/peek_mask_uint.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/peek_mask_uint8.hpp +33 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/peek_uint.hpp +45 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/peek_uint8.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/peek_utf16.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/peek_utf32.hpp +43 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/read_uint.hpp +77 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/internal/set_stack_guard.hpp +52 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/json.hpp +88 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/json_pointer.hpp +33 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/parse_tree.hpp +440 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/parse_tree_to_dot.hpp +105 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/print.hpp +75 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/print_coverage.hpp +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/raw_string.hpp +234 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/remove_first_state.hpp +69 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/remove_last_states.hpp +117 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/rep_one_min_max.hpp +94 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/rep_string.hpp +43 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/shuffle_states.hpp +193 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/state_control.hpp +118 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/to_string.hpp +38 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/trace.hpp +227 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/uint16.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/uint32.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/uint64.hpp +63 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/uint8.hpp +36 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/unescape.hpp +199 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/uri.hpp +106 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/utf16.hpp +49 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/utf32.hpp +49 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/cstream_input.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/demangle.hpp +138 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/disable_action.hpp +35 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/discard_input.hpp +37 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/discard_input_on_failure.hpp +39 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/discard_input_on_success.hpp +39 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/enable_action.hpp +35 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/eol.hpp +37 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/eol_pair.hpp +18 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/file_input.hpp +44 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/action.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/action_input.hpp +106 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/any.hpp +58 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/apply.hpp +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/apply0.hpp +51 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/apply0_single.hpp +34 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/apply_single.hpp +34 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/at.hpp +55 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/bof.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/bol.hpp +31 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/bump.hpp +45 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/bump_help.hpp +29 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/bytes.hpp +43 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/control.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/cr_crlf_eol.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/cr_eol.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/crlf_eol.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/cstream_reader.hpp +49 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/cstring_reader.hpp +40 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/dependent_false.hpp +16 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/disable.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/discard.hpp +34 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/enable.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/enable_control.hpp +25 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/eof.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/eol.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/eolf.hpp +33 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/failure.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_mapper_posix.hpp +134 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_mapper_win32.hpp +213 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_reader.hpp +113 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_apply.hpp +21 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_apply0.hpp +21 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_match.hpp +40 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_unwind.hpp +21 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/identifier.hpp +22 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/if_apply.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/if_must.hpp +47 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/if_must_else.hpp +21 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/if_then_else.hpp +51 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/input_pair.hpp +29 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/istream_reader.hpp +39 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/istring.hpp +72 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/iterator.hpp +49 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/lf_crlf_eol.hpp +37 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/lf_eol.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/list.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/list_must.hpp +20 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/list_tail.hpp +22 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/list_tail_pad.hpp +22 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/marker.hpp +80 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/minus.hpp +21 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/missing_apply.hpp +28 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/missing_apply0.hpp +26 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/must.hpp +64 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/not_at.hpp +55 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/one.hpp +55 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/opt.hpp +57 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/pad.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/pad_opt.hpp +20 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/path_to_string.hpp +26 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_char.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_utf8.hpp +89 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/pegtl_string.hpp +90 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/plus.hpp +60 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/raise.hpp +44 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/range.hpp +56 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/ranges.hpp +103 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rematch.hpp +72 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rep.hpp +67 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rep_min.hpp +20 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rep_min_max.hpp +81 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rep_opt.hpp +61 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/require.hpp +42 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/result_on_found.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rules.hpp +61 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/seq.hpp +58 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/sor.hpp +67 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/star.hpp +52 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/star_must.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/state.hpp +59 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/string.hpp +58 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/success.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/try_catch_type.hpp +64 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/until.hpp +88 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/istream_input.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/match.hpp +169 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/memory_input.hpp +365 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/mmap_input.hpp +79 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/must_if.hpp +64 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/normal.hpp +87 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/nothing.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/parse.hpp +51 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/parse_error.hpp +114 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/position.hpp +83 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/read_input.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/require_apply.hpp +16 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/require_apply0.hpp +16 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/rewind_mode.hpp +20 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/rules.hpp +68 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/string_input.hpp +64 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/tracking_mode.hpp +19 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/type_list.hpp +46 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/utf8.hpp +28 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/version.hpp +13 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/visit.hpp +66 -0
- data/ext/third_party/json/include/tao/json/external/ryu.hpp +1216 -0
- data/ext/third_party/json/include/tao/json/forward.hpp +44 -0
- data/ext/third_party/json/include/tao/json/from_file.hpp +32 -0
- data/ext/third_party/json/include/tao/json/from_input.hpp +32 -0
- data/ext/third_party/json/include/tao/json/from_stream.hpp +45 -0
- data/ext/third_party/json/include/tao/json/from_string.hpp +41 -0
- data/ext/third_party/json/include/tao/json/internal/action.hpp +268 -0
- data/ext/third_party/json/include/tao/json/internal/base64.hpp +55 -0
- data/ext/third_party/json/include/tao/json/internal/base64url.hpp +53 -0
- data/ext/third_party/json/include/tao/json/internal/dependent_false.hpp +14 -0
- data/ext/third_party/json/include/tao/json/internal/endian.hpp +60 -0
- data/ext/third_party/json/include/tao/json/internal/endian_gcc.hpp +198 -0
- data/ext/third_party/json/include/tao/json/internal/endian_win.hpp +103 -0
- data/ext/third_party/json/include/tao/json/internal/errors.hpp +85 -0
- data/ext/third_party/json/include/tao/json/internal/escape.hpp +77 -0
- data/ext/third_party/json/include/tao/json/internal/format.hpp +57 -0
- data/ext/third_party/json/include/tao/json/internal/grammar.hpp +229 -0
- data/ext/third_party/json/include/tao/json/internal/hexdump.hpp +31 -0
- data/ext/third_party/json/include/tao/json/internal/identity.hpp +22 -0
- data/ext/third_party/json/include/tao/json/internal/number_state.hpp +80 -0
- data/ext/third_party/json/include/tao/json/internal/number_traits.hpp +267 -0
- data/ext/third_party/json/include/tao/json/internal/pair.hpp +42 -0
- data/ext/third_party/json/include/tao/json/internal/parse_util.hpp +112 -0
- data/ext/third_party/json/include/tao/json/internal/sha256.hpp +218 -0
- data/ext/third_party/json/include/tao/json/internal/single.hpp +40 -0
- data/ext/third_party/json/include/tao/json/internal/string_t.hpp +35 -0
- data/ext/third_party/json/include/tao/json/internal/type_traits.hpp +96 -0
- data/ext/third_party/json/include/tao/json/internal/unescape_action.hpp +24 -0
- data/ext/third_party/json/include/tao/json/internal/uri_fragment.hpp +182 -0
- data/ext/third_party/json/include/tao/json/jaxn.hpp +19 -0
- data/ext/third_party/json/include/tao/json/jaxn/consume_file.hpp +34 -0
- data/ext/third_party/json/include/tao/json/jaxn/consume_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/from_file.hpp +28 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp +45 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/from_stream.hpp +33 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/from_string.hpp +39 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/to_pretty_stream.hpp +69 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/to_stream.hpp +67 -0
- data/ext/third_party/json/include/tao/json/jaxn/events/to_string.hpp +33 -0
- data/ext/third_party/json/include/tao/json/jaxn/from_file.hpp +33 -0
- data/ext/third_party/json/include/tao/json/jaxn/from_input.hpp +33 -0
- data/ext/third_party/json/include/tao/json/jaxn/from_stream.hpp +48 -0
- data/ext/third_party/json/include/tao/json/jaxn/from_string.hpp +42 -0
- data/ext/third_party/json/include/tao/json/jaxn/internal/action.hpp +355 -0
- data/ext/third_party/json/include/tao/json/jaxn/internal/bunescape_action.hpp +114 -0
- data/ext/third_party/json/include/tao/json/jaxn/internal/errors.hpp +108 -0
- data/ext/third_party/json/include/tao/json/jaxn/internal/grammar.hpp +375 -0
- data/ext/third_party/json/include/tao/json/jaxn/internal/integer.hpp +255 -0
- data/ext/third_party/json/include/tao/json/jaxn/internal/unescape_action.hpp +28 -0
- data/ext/third_party/json/include/tao/json/jaxn/is_identifier.hpp +27 -0
- data/ext/third_party/json/include/tao/json/jaxn/parts_parser.hpp +261 -0
- data/ext/third_party/json/include/tao/json/jaxn/to_stream.hpp +36 -0
- data/ext/third_party/json/include/tao/json/jaxn/to_string.hpp +33 -0
- data/ext/third_party/json/include/tao/json/message_extension.hpp +49 -0
- data/ext/third_party/json/include/tao/json/msgpack.hpp +19 -0
- data/ext/third_party/json/include/tao/json/msgpack/consume_file.hpp +34 -0
- data/ext/third_party/json/include/tao/json/msgpack/consume_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/msgpack/events/from_binary.hpp +43 -0
- data/ext/third_party/json/include/tao/json/msgpack/events/from_file.hpp +27 -0
- data/ext/third_party/json/include/tao/json/msgpack/events/from_input.hpp +43 -0
- data/ext/third_party/json/include/tao/json/msgpack/events/from_string.hpp +37 -0
- data/ext/third_party/json/include/tao/json/msgpack/events/to_stream.hpp +214 -0
- data/ext/third_party/json/include/tao/json/msgpack/events/to_string.hpp +31 -0
- data/ext/third_party/json/include/tao/json/msgpack/from_binary.hpp +32 -0
- data/ext/third_party/json/include/tao/json/msgpack/from_file.hpp +33 -0
- data/ext/third_party/json/include/tao/json/msgpack/from_input.hpp +33 -0
- data/ext/third_party/json/include/tao/json/msgpack/from_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/msgpack/internal/format.hpp +57 -0
- data/ext/third_party/json/include/tao/json/msgpack/internal/grammar.hpp +250 -0
- data/ext/third_party/json/include/tao/json/msgpack/parts_parser.hpp +311 -0
- data/ext/third_party/json/include/tao/json/msgpack/to_stream.hpp +27 -0
- data/ext/third_party/json/include/tao/json/msgpack/to_string.hpp +28 -0
- data/ext/third_party/json/include/tao/json/operators.hpp +490 -0
- data/ext/third_party/json/include/tao/json/parts_parser.hpp +302 -0
- data/ext/third_party/json/include/tao/json/pointer.hpp +432 -0
- data/ext/third_party/json/include/tao/json/produce.hpp +61 -0
- data/ext/third_party/json/include/tao/json/self_contained.hpp +131 -0
- data/ext/third_party/json/include/tao/json/span.hpp +496 -0
- data/ext/third_party/json/include/tao/json/stream.hpp +38 -0
- data/ext/third_party/json/include/tao/json/to_stream.hpp +42 -0
- data/ext/third_party/json/include/tao/json/to_string.hpp +23 -0
- data/ext/third_party/json/include/tao/json/traits.hpp +971 -0
- data/ext/third_party/json/include/tao/json/type.hpp +112 -0
- data/ext/third_party/json/include/tao/json/ubjson.hpp +19 -0
- data/ext/third_party/json/include/tao/json/ubjson/consume_file.hpp +34 -0
- data/ext/third_party/json/include/tao/json/ubjson/consume_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/ubjson/events/from_binary.hpp +43 -0
- data/ext/third_party/json/include/tao/json/ubjson/events/from_file.hpp +27 -0
- data/ext/third_party/json/include/tao/json/ubjson/events/from_input.hpp +43 -0
- data/ext/third_party/json/include/tao/json/ubjson/events/from_string.hpp +37 -0
- data/ext/third_party/json/include/tao/json/ubjson/events/to_stream.hpp +174 -0
- data/ext/third_party/json/include/tao/json/ubjson/events/to_string.hpp +31 -0
- data/ext/third_party/json/include/tao/json/ubjson/from_binary.hpp +32 -0
- data/ext/third_party/json/include/tao/json/ubjson/from_file.hpp +33 -0
- data/ext/third_party/json/include/tao/json/ubjson/from_input.hpp +33 -0
- data/ext/third_party/json/include/tao/json/ubjson/from_string.hpp +32 -0
- data/ext/third_party/json/include/tao/json/ubjson/internal/grammar.hpp +415 -0
- data/ext/third_party/json/include/tao/json/ubjson/internal/marker.hpp +46 -0
- data/ext/third_party/json/include/tao/json/ubjson/parts_parser.hpp +393 -0
- data/ext/third_party/json/include/tao/json/ubjson/to_stream.hpp +28 -0
- data/ext/third_party/json/include/tao/json/ubjson/to_string.hpp +29 -0
- data/ext/third_party/json/include/tao/json/utf8.hpp +57 -0
- data/ext/third_party/json/include/tao/json/value.hpp +12 -0
- data/ext/third_party/snappy/CMakeLists.txt +345 -0
- data/ext/third_party/snappy/COPYING +54 -0
- data/ext/third_party/snappy/cmake/SnappyConfig.cmake.in +33 -0
- data/ext/third_party/snappy/cmake/config.h.in +59 -0
- data/ext/third_party/snappy/snappy-c.cc +90 -0
- data/ext/third_party/snappy/snappy-c.h +138 -0
- data/ext/third_party/snappy/snappy-internal.h +315 -0
- data/ext/third_party/snappy/snappy-sinksource.cc +121 -0
- data/ext/third_party/snappy/snappy-sinksource.h +182 -0
- data/ext/third_party/snappy/snappy-stubs-internal.cc +42 -0
- data/ext/third_party/snappy/snappy-stubs-internal.h +493 -0
- data/ext/third_party/snappy/snappy-stubs-public.h.in +63 -0
- data/ext/third_party/snappy/snappy.cc +1774 -0
- data/ext/third_party/snappy/snappy.h +209 -0
- data/ext/third_party/spdlog/CMakeLists.txt +291 -0
- data/ext/third_party/spdlog/LICENSE +26 -0
- data/ext/third_party/spdlog/cmake/ide.cmake +18 -0
- data/ext/third_party/spdlog/cmake/pch.h.in +258 -0
- data/ext/third_party/spdlog/cmake/spdlog.pc.in +13 -0
- data/ext/third_party/spdlog/cmake/spdlogCPack.cmake +46 -0
- data/ext/third_party/spdlog/cmake/spdlogConfig.cmake.in +15 -0
- data/ext/third_party/spdlog/cmake/utils.cmake +61 -0
- data/ext/third_party/spdlog/cmake/version.rc.in +42 -0
- data/ext/third_party/spdlog/include/spdlog/async.h +93 -0
- data/ext/third_party/spdlog/include/spdlog/async_logger-inl.h +92 -0
- data/ext/third_party/spdlog/include/spdlog/async_logger.h +68 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/argv.h +44 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/env.h +38 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/helpers-inl.h +119 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/helpers.h +29 -0
- data/ext/third_party/spdlog/include/spdlog/common-inl.h +76 -0
- data/ext/third_party/spdlog/include/spdlog/common.h +245 -0
- data/ext/third_party/spdlog/include/spdlog/details/backtracer-inl.h +69 -0
- data/ext/third_party/spdlog/include/spdlog/details/backtracer.h +45 -0
- data/ext/third_party/spdlog/include/spdlog/details/circular_q.h +141 -0
- data/ext/third_party/spdlog/include/spdlog/details/console_globals.h +32 -0
- data/ext/third_party/spdlog/include/spdlog/details/file_helper-inl.h +132 -0
- data/ext/third_party/spdlog/include/spdlog/details/file_helper.h +59 -0
- data/ext/third_party/spdlog/include/spdlog/details/fmt_helper.h +116 -0
- data/ext/third_party/spdlog/include/spdlog/details/log_msg-inl.h +37 -0
- data/ext/third_party/spdlog/include/spdlog/details/log_msg.h +36 -0
- data/ext/third_party/spdlog/include/spdlog/details/log_msg_buffer-inl.h +58 -0
- data/ext/third_party/spdlog/include/spdlog/details/log_msg_buffer.h +33 -0
- data/ext/third_party/spdlog/include/spdlog/details/mpmc_blocking_q.h +120 -0
- data/ext/third_party/spdlog/include/spdlog/details/null_mutex.h +49 -0
- data/ext/third_party/spdlog/include/spdlog/details/os-inl.h +554 -0
- data/ext/third_party/spdlog/include/spdlog/details/os.h +111 -0
- data/ext/third_party/spdlog/include/spdlog/details/periodic_worker-inl.h +49 -0
- data/ext/third_party/spdlog/include/spdlog/details/periodic_worker.h +40 -0
- data/ext/third_party/spdlog/include/spdlog/details/registry-inl.h +313 -0
- data/ext/third_party/spdlog/include/spdlog/details/registry.h +115 -0
- data/ext/third_party/spdlog/include/spdlog/details/synchronous_factory.h +24 -0
- data/ext/third_party/spdlog/include/spdlog/details/tcp_client-windows.h +175 -0
- data/ext/third_party/spdlog/include/spdlog/details/tcp_client.h +146 -0
- data/ext/third_party/spdlog/include/spdlog/details/thread_pool-inl.h +124 -0
- data/ext/third_party/spdlog/include/spdlog/details/thread_pool.h +120 -0
- data/ext/third_party/spdlog/include/spdlog/details/windows_include.h +11 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bin_to_hex.h +216 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/LICENSE.rst +27 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/chrono.h +1123 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/color.h +566 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/compile.h +665 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/core.h +1882 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/format-inl.h +1453 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/format.h +3729 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/locale.h +78 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/os.h +450 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/ostream.h +167 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/posix.h +2 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/printf.h +751 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/ranges.h +386 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/chrono.h +20 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/fmt.h +27 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/ostr.h +20 -0
- data/ext/third_party/spdlog/include/spdlog/formatter.h +18 -0
- data/ext/third_party/spdlog/include/spdlog/fwd.h +14 -0
- data/ext/third_party/spdlog/include/spdlog/logger-inl.h +257 -0
- data/ext/third_party/spdlog/include/spdlog/logger.h +366 -0
- data/ext/third_party/spdlog/include/spdlog/pattern_formatter-inl.h +1373 -0
- data/ext/third_party/spdlog/include/spdlog/pattern_formatter.h +126 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/android_sink.h +119 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h +143 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/ansicolor_sink.h +118 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/base_sink-inl.h +63 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/base_sink.h +52 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/basic_file_sink-inl.h +43 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/basic_file_sink.h +58 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/daily_file_sink.h +204 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/dist_sink.h +97 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/dup_filter_sink.h +90 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/msvc_sink.h +49 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/null_sink.h +44 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/ostream_sink.h +50 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/ringbuffer_sink.h +74 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/rotating_file_sink-inl.h +131 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/rotating_file_sink.h +78 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/sink-inl.h +25 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/sink.h +35 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/stdout_color_sinks.h +45 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/stdout_sinks-inl.h +123 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/stdout_sinks.h +87 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/syslog_sink.h +109 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/systemd_sink.h +103 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/tcp_sink.h +81 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/win_eventlog_sink.h +266 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/wincolor_sink-inl.h +170 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/wincolor_sink.h +94 -0
- data/ext/third_party/spdlog/include/spdlog/spdlog-inl.h +125 -0
- data/ext/third_party/spdlog/include/spdlog/spdlog.h +295 -0
- data/ext/third_party/spdlog/include/spdlog/stopwatch.h +61 -0
- data/ext/third_party/spdlog/include/spdlog/tweakme.h +116 -0
- data/ext/third_party/spdlog/include/spdlog/version.h +10 -0
- data/ext/third_party/spdlog/src/async.cpp +13 -0
- data/ext/third_party/spdlog/src/cfg.cpp +8 -0
- data/ext/third_party/spdlog/src/color_sinks.cpp +51 -0
- data/ext/third_party/spdlog/src/file_sinks.cpp +20 -0
- data/ext/third_party/spdlog/src/fmt.cpp +63 -0
- data/ext/third_party/spdlog/src/spdlog.cpp +26 -0
- data/ext/third_party/spdlog/src/stdout_sinks.cpp +29 -0
- data/lib/active_support/cache/couchbase_store.rb +362 -0
- data/lib/couchbase.rb +20 -0
- data/lib/couchbase/analytics_options.rb +107 -0
- data/lib/couchbase/authenticator.rb +65 -0
- data/lib/couchbase/binary_collection.rb +128 -0
- data/lib/couchbase/binary_collection_options.rb +24 -0
- data/lib/couchbase/bucket.rb +144 -0
- data/lib/couchbase/cluster.rb +430 -0
- data/lib/couchbase/collection.rb +562 -0
- data/lib/couchbase/collection_options.rb +324 -0
- data/lib/couchbase/configuration.rb +57 -0
- data/lib/couchbase/datastructures.rb +24 -0
- data/lib/couchbase/datastructures/couchbase_list.rb +160 -0
- data/lib/couchbase/datastructures/couchbase_map.rb +194 -0
- data/lib/couchbase/datastructures/couchbase_queue.rb +134 -0
- data/lib/couchbase/datastructures/couchbase_set.rb +128 -0
- data/lib/couchbase/diagnostics.rb +181 -0
- data/lib/couchbase/errors.rb +345 -0
- data/lib/couchbase/json_transcoder.rb +32 -0
- data/lib/couchbase/libcouchbase.bundle +0 -0
- data/lib/couchbase/logger.rb +42 -0
- data/lib/couchbase/management.rb +27 -0
- data/lib/couchbase/management/analytics_index_manager.rb +433 -0
- data/lib/couchbase/management/bucket_manager.rb +292 -0
- data/lib/couchbase/management/collection_manager.rb +202 -0
- data/lib/couchbase/management/query_index_manager.rb +342 -0
- data/lib/couchbase/management/search_index_manager.rb +408 -0
- data/lib/couchbase/management/user_manager.rb +449 -0
- data/lib/couchbase/management/view_index_manager.rb +237 -0
- data/lib/couchbase/mutation_state.rb +63 -0
- data/lib/couchbase/options.rb +2104 -0
- data/lib/couchbase/query_options.rb +120 -0
- data/lib/couchbase/railtie.rb +45 -0
- data/lib/couchbase/scope.rb +127 -0
- data/lib/couchbase/search_options.rb +1487 -0
- data/lib/couchbase/subdoc.rb +290 -0
- data/lib/couchbase/utils.rb +21 -0
- data/lib/couchbase/utils/time.rb +52 -0
- data/lib/couchbase/version.rb +37 -0
- data/lib/couchbase/view_options.rb +65 -0
- data/lib/rails/generators/couchbase/config/config_generator.rb +27 -0
- metadata +1403 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
# Copyright 2020 Couchbase, Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Couchbase
|
16
|
+
class MutationToken
|
17
|
+
# @return [Integer]
|
18
|
+
attr_accessor :partition_id
|
19
|
+
# @return [Integer]
|
20
|
+
attr_accessor :partition_uuid
|
21
|
+
# @return [Integer]
|
22
|
+
attr_accessor :sequence_number
|
23
|
+
# @return [String] name of the bucket
|
24
|
+
attr_accessor :bucket_name
|
25
|
+
|
26
|
+
# @yieldparam [MutationToken] self
|
27
|
+
def initialize
|
28
|
+
yield self if block_given?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class MutationState
|
33
|
+
# @return [Array<MutationToken>]
|
34
|
+
attr_accessor :tokens
|
35
|
+
|
36
|
+
# Create a mutation state from one or more MutationTokens
|
37
|
+
#
|
38
|
+
# @param [Array<MutationToken>] mutation_tokens the mutation tokens
|
39
|
+
def initialize(*mutation_tokens)
|
40
|
+
@tokens = []
|
41
|
+
add(*mutation_tokens)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Add one or more Mutation tokens to this state
|
45
|
+
#
|
46
|
+
# @param [Array<MutationToken>] mutation_tokens the mutation tokens
|
47
|
+
def add(*mutation_tokens)
|
48
|
+
@tokens |= mutation_tokens
|
49
|
+
end
|
50
|
+
|
51
|
+
# @api private
|
52
|
+
def to_a
|
53
|
+
@tokens.map do |t|
|
54
|
+
{
|
55
|
+
bucket_name: t.bucket_name,
|
56
|
+
partition_id: t.partition_id,
|
57
|
+
partition_uuid: t.partition_uuid,
|
58
|
+
sequence_number: t.sequence_number,
|
59
|
+
}
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,2104 @@
|
|
1
|
+
# Copyright 2020-2021 Couchbase, Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "couchbase/utils/time"
|
16
|
+
|
17
|
+
module Couchbase
|
18
|
+
# Definition of the Option classes for data APIs
|
19
|
+
module Options # rubocop:disable Metrics/ModuleLength
|
20
|
+
# Base class for most of the options
|
21
|
+
class Base
|
22
|
+
attr_accessor :timeout # @return [Integer, #in_milliseconds, nil]
|
23
|
+
attr_accessor :retry_strategy # @return [Proc, nil]
|
24
|
+
attr_accessor :client_context # @return [Hash, nil]
|
25
|
+
attr_accessor :parent_span # @return [Span, nil]
|
26
|
+
|
27
|
+
# @param [Integer, #in_milliseconds, nil] timeout the time in milliseconds allowed for the operation to complete
|
28
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
29
|
+
# @param [Hash, nil] client_context the client context data, if set
|
30
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
31
|
+
#
|
32
|
+
# @yieldparam [Base]
|
33
|
+
def initialize(timeout: nil,
|
34
|
+
retry_strategy: nil,
|
35
|
+
client_context: nil,
|
36
|
+
parent_span: nil)
|
37
|
+
@timeout = timeout
|
38
|
+
@retry_strategy = retry_strategy
|
39
|
+
@client_context = client_context
|
40
|
+
@parent_span = parent_span
|
41
|
+
yield self if block_given?
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Options for {Collection#get}
|
46
|
+
class Get < Base
|
47
|
+
attr_accessor :with_expiry # @return [Boolean]
|
48
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
49
|
+
|
50
|
+
# Creates an instance of options for {Collection#get}
|
51
|
+
#
|
52
|
+
# @param [Array<String>] projections a list of paths that should be loaded if present.
|
53
|
+
# @param [Boolean] with_expiry if +true+ the expiration will be also fetched with {Collection#get}
|
54
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
55
|
+
#
|
56
|
+
# @param [Integer, #in_milliseconds, nil] timeout the time in milliseconds allowed for the operation to complete
|
57
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
58
|
+
# @param [Hash, nil] client_context the client context data, if set
|
59
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
60
|
+
#
|
61
|
+
# @yieldparam [Get] self
|
62
|
+
def initialize(projections: [],
|
63
|
+
with_expiry: false,
|
64
|
+
transcoder: JsonTranscoder.new,
|
65
|
+
timeout: nil,
|
66
|
+
retry_strategy: nil,
|
67
|
+
client_context: nil,
|
68
|
+
parent_span: nil)
|
69
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
70
|
+
@projections = projections
|
71
|
+
@with_expiry = with_expiry
|
72
|
+
@transcoder = transcoder
|
73
|
+
@preserve_array_indexes = false
|
74
|
+
yield self if block_given?
|
75
|
+
end
|
76
|
+
|
77
|
+
# Allows to specify a custom list paths to fetch from the document instead of the whole.
|
78
|
+
#
|
79
|
+
# Note that a maximum of 16 individual paths can be projected at a time due to a server limitation. If you need
|
80
|
+
# more than that, think about fetching less-generic paths or the full document straight away.
|
81
|
+
#
|
82
|
+
# @param [String, Array<String>] paths a path that should be loaded if present.
|
83
|
+
def project(*paths)
|
84
|
+
@projections ||= []
|
85
|
+
@projections |= paths.flatten # union with current projections
|
86
|
+
end
|
87
|
+
|
88
|
+
# @api private
|
89
|
+
# @return [Boolean] whether to use sparse arrays (default +false+)
|
90
|
+
attr_accessor :preserve_array_indexes
|
91
|
+
|
92
|
+
# @api private
|
93
|
+
# @return [Array<String>] list of paths to project
|
94
|
+
attr_accessor :projections
|
95
|
+
|
96
|
+
# @api private
|
97
|
+
# @return [Boolean]
|
98
|
+
def need_projected_get?
|
99
|
+
@with_expiry || !@projections&.empty?
|
100
|
+
end
|
101
|
+
|
102
|
+
# @api private
|
103
|
+
def to_backend
|
104
|
+
options = {
|
105
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
106
|
+
}
|
107
|
+
options.update(with_expiry: true) if @with_expiry
|
108
|
+
unless @projections&.empty?
|
109
|
+
options.update({
|
110
|
+
projections: @projections,
|
111
|
+
preserve_array_indexes: @preserve_array_indexes,
|
112
|
+
})
|
113
|
+
end
|
114
|
+
options
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Options for {Collection#get_multi}
|
119
|
+
class GetMulti < Base
|
120
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
121
|
+
|
122
|
+
# Creates an instance of options for {Collection#get_multi}
|
123
|
+
#
|
124
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
125
|
+
#
|
126
|
+
# @param [Integer, #in_milliseconds, nil] timeout the time in milliseconds allowed for the operation to complete
|
127
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
128
|
+
# @param [Hash, nil] client_context the client context data, if set
|
129
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
130
|
+
#
|
131
|
+
# @yieldparam [Get] self
|
132
|
+
def initialize(transcoder: JsonTranscoder.new,
|
133
|
+
timeout: nil,
|
134
|
+
retry_strategy: nil,
|
135
|
+
client_context: nil,
|
136
|
+
parent_span: nil)
|
137
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
138
|
+
@transcoder = transcoder
|
139
|
+
yield self if block_given?
|
140
|
+
end
|
141
|
+
|
142
|
+
# @api private
|
143
|
+
def to_backend
|
144
|
+
{
|
145
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
146
|
+
}
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Options for {Collection#get_and_lock}
|
151
|
+
class GetAndLock < Base
|
152
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
153
|
+
|
154
|
+
# Creates an instance of options for {Collection#get_and_lock}
|
155
|
+
#
|
156
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
157
|
+
#
|
158
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
159
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
160
|
+
# @param [Hash, nil] client_context the client context data, if set
|
161
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
162
|
+
#
|
163
|
+
# @yieldparam [GetAndLock] self
|
164
|
+
def initialize(transcoder: JsonTranscoder.new,
|
165
|
+
timeout: nil,
|
166
|
+
retry_strategy: nil,
|
167
|
+
client_context: nil,
|
168
|
+
parent_span: nil)
|
169
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
170
|
+
@transcoder = transcoder
|
171
|
+
yield self if block_given?
|
172
|
+
end
|
173
|
+
|
174
|
+
# @api private
|
175
|
+
def to_backend
|
176
|
+
{
|
177
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
178
|
+
}
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Options for {Collection#get_and_touch}
|
183
|
+
class GetAndTouch < Base
|
184
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
185
|
+
|
186
|
+
# Creates an instance of options for {Collection#get_and_touch}
|
187
|
+
#
|
188
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
189
|
+
#
|
190
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
191
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
192
|
+
# @param [Hash, nil] client_context the client context data, if set
|
193
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
194
|
+
#
|
195
|
+
# @yieldparam [GetAndTouch] self
|
196
|
+
def initialize(transcoder: JsonTranscoder.new,
|
197
|
+
timeout: nil,
|
198
|
+
retry_strategy: nil,
|
199
|
+
client_context: nil,
|
200
|
+
parent_span: nil)
|
201
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
202
|
+
@transcoder = transcoder
|
203
|
+
yield self if block_given?
|
204
|
+
end
|
205
|
+
|
206
|
+
# @api private
|
207
|
+
def to_backend
|
208
|
+
{
|
209
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
210
|
+
}
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
# Options for {Collection#get_all_replicas}
|
215
|
+
class GetAllReplicas < Base
|
216
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
217
|
+
|
218
|
+
# Creates an instance of options for {Collection#get_all_replicas}
|
219
|
+
#
|
220
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
221
|
+
#
|
222
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
223
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
224
|
+
# @param [Hash, nil] client_context the client context data, if set
|
225
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
226
|
+
#
|
227
|
+
# @yieldparam [GetAllReplicas] self
|
228
|
+
def initialize(transcoder: JsonTranscoder.new,
|
229
|
+
timeout: nil,
|
230
|
+
retry_strategy: nil,
|
231
|
+
client_context: nil,
|
232
|
+
parent_span: nil)
|
233
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
234
|
+
@transcoder = transcoder
|
235
|
+
yield self if block_given?
|
236
|
+
end
|
237
|
+
|
238
|
+
# @api private
|
239
|
+
def to_backend
|
240
|
+
{
|
241
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
242
|
+
}
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
# Options for {Collection#get_any_replica}
|
247
|
+
class GetAnyReplica < Base
|
248
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
|
249
|
+
|
250
|
+
# Creates an instance of options for {Collection#get_any_replica}
|
251
|
+
#
|
252
|
+
# @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
|
253
|
+
#
|
254
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
255
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
256
|
+
# @param [Hash, nil] client_context the client context data, if set
|
257
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
258
|
+
#
|
259
|
+
# @yieldparam [GetAnyReplica] self
|
260
|
+
def initialize(transcoder: JsonTranscoder.new,
|
261
|
+
timeout: nil,
|
262
|
+
retry_strategy: nil,
|
263
|
+
client_context: nil,
|
264
|
+
parent_span: nil)
|
265
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
266
|
+
@transcoder = transcoder
|
267
|
+
yield self if block_given?
|
268
|
+
end
|
269
|
+
|
270
|
+
# @api private
|
271
|
+
def to_backend
|
272
|
+
{
|
273
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
274
|
+
}
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# Options for {Collection#exists}
|
279
|
+
class Exists < Base
|
280
|
+
# Creates an instance of options for {Collection#exists}
|
281
|
+
#
|
282
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
283
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
284
|
+
# @param [Hash, nil] client_context the client context data, if set
|
285
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
286
|
+
#
|
287
|
+
# @yieldparam [Exists self
|
288
|
+
def initialize(timeout: nil,
|
289
|
+
retry_strategy: nil,
|
290
|
+
client_context: nil,
|
291
|
+
parent_span: nil)
|
292
|
+
super
|
293
|
+
yield self if block_given?
|
294
|
+
end
|
295
|
+
|
296
|
+
# @api private
|
297
|
+
def to_backend
|
298
|
+
{
|
299
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
300
|
+
}
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# Options for {Collection#touch}
|
305
|
+
class Touch < Base
|
306
|
+
# Creates an instance of options for {Collection#touch}
|
307
|
+
#
|
308
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
309
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
310
|
+
# @param [Hash, nil] client_context the client context data, if set
|
311
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
312
|
+
#
|
313
|
+
# @yieldparam [TouchOptions] self
|
314
|
+
def initialize(timeout: nil,
|
315
|
+
retry_strategy: nil,
|
316
|
+
client_context: nil,
|
317
|
+
parent_span: nil)
|
318
|
+
super
|
319
|
+
yield self if block_given?
|
320
|
+
end
|
321
|
+
|
322
|
+
# @api private
|
323
|
+
def to_backend
|
324
|
+
{
|
325
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
326
|
+
}
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
# Options for {Collection#unlock}
|
331
|
+
class Unlock < Base
|
332
|
+
# Creates an instance of options for {Collection#unlock}
|
333
|
+
#
|
334
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
335
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
336
|
+
# @param [Hash, nil] client_context the client context data, if set
|
337
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
338
|
+
#
|
339
|
+
# @yieldparam [Unlock] self
|
340
|
+
def initialize(timeout: nil,
|
341
|
+
retry_strategy: nil,
|
342
|
+
client_context: nil,
|
343
|
+
parent_span: nil)
|
344
|
+
super
|
345
|
+
yield self if block_given?
|
346
|
+
end
|
347
|
+
|
348
|
+
# @api private
|
349
|
+
def to_backend
|
350
|
+
{
|
351
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
352
|
+
}
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
# Options for {Collection#remove}
|
357
|
+
class Remove < Base
|
358
|
+
attr_accessor :cas # @return [Integer, nil]
|
359
|
+
attr_accessor :durability_level # @return [Symbol]
|
360
|
+
|
361
|
+
# Creates an instance of options for {Collection#remove}
|
362
|
+
#
|
363
|
+
# @param [Integer, nil] cas CAS value for optimistic locking
|
364
|
+
# @param [Symbol] durability_level level of durability
|
365
|
+
# +:none+::
|
366
|
+
# no enhanced durability required for the mutation
|
367
|
+
# +:majority+::
|
368
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
369
|
+
# (that is, held in the memory allocated to the bucket)
|
370
|
+
# +:majority_and_persist_to_active+::
|
371
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
372
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
373
|
+
# node hosting the active partition (vBucket) for the data.
|
374
|
+
# +:persist_to_majority+::
|
375
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
376
|
+
# Accordingly, it will be written to disk on those nodes.
|
377
|
+
#
|
378
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
379
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
380
|
+
# @param [Hash, nil] client_context the client context data, if set
|
381
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
382
|
+
#
|
383
|
+
# @yieldparam [Remove]
|
384
|
+
def initialize(cas: nil,
|
385
|
+
durability_level: :none,
|
386
|
+
timeout: nil,
|
387
|
+
retry_strategy: nil,
|
388
|
+
client_context: nil,
|
389
|
+
parent_span: nil)
|
390
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
391
|
+
@cas = cas
|
392
|
+
@durability_level = durability_level
|
393
|
+
yield self if block_given?
|
394
|
+
end
|
395
|
+
|
396
|
+
# @api private
|
397
|
+
def to_backend
|
398
|
+
{
|
399
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
400
|
+
durability_level: @durability_level,
|
401
|
+
cas: @cas,
|
402
|
+
}
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
406
|
+
# Options for {Collection#remove_multi}
|
407
|
+
class RemoveMulti < Base
|
408
|
+
attr_accessor :durability_level # @return [Symbol]
|
409
|
+
|
410
|
+
# Creates an instance of options for {Collection#remove}
|
411
|
+
#
|
412
|
+
# @param [Symbol] durability_level level of durability
|
413
|
+
# +:none+::
|
414
|
+
# no enhanced durability required for the mutation
|
415
|
+
# +:majority+::
|
416
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
417
|
+
# (that is, held in the memory allocated to the bucket)
|
418
|
+
# +:majority_and_persist_to_active+::
|
419
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
420
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
421
|
+
# node hosting the active partition (vBucket) for the data.
|
422
|
+
# +:persist_to_majority+::
|
423
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
424
|
+
# Accordingly, it will be written to disk on those nodes.
|
425
|
+
#
|
426
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
427
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
428
|
+
# @param [Hash, nil] client_context the client context data, if set
|
429
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
430
|
+
#
|
431
|
+
# @yieldparam [Remove]
|
432
|
+
def initialize(durability_level: :none,
|
433
|
+
timeout: nil,
|
434
|
+
retry_strategy: nil,
|
435
|
+
client_context: nil,
|
436
|
+
parent_span: nil)
|
437
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
438
|
+
@durability_level = durability_level
|
439
|
+
yield self if block_given?
|
440
|
+
end
|
441
|
+
|
442
|
+
# @api private
|
443
|
+
def to_backend
|
444
|
+
{
|
445
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
446
|
+
durability_level: @durability_level,
|
447
|
+
}
|
448
|
+
end
|
449
|
+
end
|
450
|
+
|
451
|
+
# Options for {Collection#insert}
|
452
|
+
class Insert < Base
|
453
|
+
attr_accessor :expiry # @return [Integer, #in_seconds, nil]
|
454
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #encode(Object)]
|
455
|
+
attr_accessor :durability_level # @return [Symbol]
|
456
|
+
|
457
|
+
# Creates an instance of options for {Collection#insert}
|
458
|
+
#
|
459
|
+
# @param [Integer, #in_seconds, Time, nil] expiry expiration time to associate with the document
|
460
|
+
# @param [JsonTranscoder, #encode(Object)] transcoder used for encoding
|
461
|
+
# @param [Symbol] durability_level level of durability
|
462
|
+
# +:none+::
|
463
|
+
# no enhanced durability required for the mutation
|
464
|
+
# +:majority+::
|
465
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
466
|
+
# (that is, held in the memory allocated to the bucket)
|
467
|
+
# +:majority_and_persist_to_active+::
|
468
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
469
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
470
|
+
# node hosting the active partition (vBucket) for the data.
|
471
|
+
# +:persist_to_majority+::
|
472
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
473
|
+
# Accordingly, it will be written to disk on those nodes.
|
474
|
+
#
|
475
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
476
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
477
|
+
# @param [Hash, nil] client_context the client context data, if set
|
478
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
479
|
+
#
|
480
|
+
# @yieldparam [Insert]
|
481
|
+
def initialize(expiry: nil,
|
482
|
+
transcoder: JsonTranscoder.new,
|
483
|
+
durability_level: :none,
|
484
|
+
timeout: nil,
|
485
|
+
retry_strategy: nil,
|
486
|
+
client_context: nil,
|
487
|
+
parent_span: nil)
|
488
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
489
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
490
|
+
@transcoder = transcoder
|
491
|
+
@durability_level = durability_level
|
492
|
+
yield self if block_given?
|
493
|
+
end
|
494
|
+
|
495
|
+
# @api private
|
496
|
+
def to_backend
|
497
|
+
{
|
498
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
499
|
+
expiry: @expiry,
|
500
|
+
durability_level: @durability_level,
|
501
|
+
}
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
# Options for {Collection#upsert}
|
506
|
+
class Upsert < Base
|
507
|
+
attr_accessor :expiry # @return [Integer, #in_seconds, nil]
|
508
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #encode(Object)]
|
509
|
+
attr_accessor :durability_level # @return [Symbol]
|
510
|
+
|
511
|
+
# Creates an instance of options for {Collection#upsert}
|
512
|
+
#
|
513
|
+
# @param [Integer, #in_seconds, Time, nil] expiry expiration time to associate with the document
|
514
|
+
# @param [JsonTranscoder, #encode(Object)] transcoder used for encoding
|
515
|
+
# @param [Symbol] durability_level level of durability
|
516
|
+
# +:none+::
|
517
|
+
# no enhanced durability required for the mutation
|
518
|
+
# +:majority+::
|
519
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
520
|
+
# (that is, held in the memory allocated to the bucket)
|
521
|
+
# +:majority_and_persist_to_active+::
|
522
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
523
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
524
|
+
# node hosting the active partition (vBucket) for the data.
|
525
|
+
# +:persist_to_majority+::
|
526
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
527
|
+
# Accordingly, it will be written to disk on those nodes.
|
528
|
+
#
|
529
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
530
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
531
|
+
# @param [Hash, nil] client_context the client context data, if set
|
532
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
533
|
+
#
|
534
|
+
# @yieldparam [Upsert]
|
535
|
+
def initialize(expiry: nil,
|
536
|
+
transcoder: JsonTranscoder.new,
|
537
|
+
durability_level: :none,
|
538
|
+
timeout: nil,
|
539
|
+
retry_strategy: nil,
|
540
|
+
client_context: nil,
|
541
|
+
parent_span: nil)
|
542
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
543
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
544
|
+
@transcoder = transcoder
|
545
|
+
@durability_level = durability_level
|
546
|
+
yield self if block_given?
|
547
|
+
end
|
548
|
+
|
549
|
+
def to_backend
|
550
|
+
{
|
551
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
552
|
+
expiry: @expiry,
|
553
|
+
durability_level: @durability_level,
|
554
|
+
}
|
555
|
+
end
|
556
|
+
end
|
557
|
+
|
558
|
+
# Options for {Collection#upsert_multi}
|
559
|
+
class UpsertMulti < Base
|
560
|
+
attr_accessor :expiry # @return [Integer, #in_seconds, nil]
|
561
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #encode(Object)]
|
562
|
+
attr_accessor :durability_level # @return [Symbol]
|
563
|
+
|
564
|
+
# Creates an instance of options for {Collection#upsert}
|
565
|
+
#
|
566
|
+
# @param [Integer, #in_seconds, Time, nil] expiry expiration time to associate with the document
|
567
|
+
# @param [JsonTranscoder, #encode(Object)] transcoder used for encoding
|
568
|
+
# @param [Symbol] durability_level level of durability
|
569
|
+
# +:none+::
|
570
|
+
# no enhanced durability required for the mutation
|
571
|
+
# +:majority+::
|
572
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
573
|
+
# (that is, held in the memory allocated to the bucket)
|
574
|
+
# +:majority_and_persist_to_active+::
|
575
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
576
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
577
|
+
# node hosting the active partition (vBucket) for the data.
|
578
|
+
# +:persist_to_majority+::
|
579
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
580
|
+
# Accordingly, it will be written to disk on those nodes.
|
581
|
+
#
|
582
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
583
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
584
|
+
# @param [Hash, nil] client_context the client context data, if set
|
585
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
586
|
+
#
|
587
|
+
# @yieldparam [Upsert]
|
588
|
+
def initialize(expiry: nil,
|
589
|
+
transcoder: JsonTranscoder.new,
|
590
|
+
durability_level: :none,
|
591
|
+
timeout: nil,
|
592
|
+
retry_strategy: nil,
|
593
|
+
client_context: nil,
|
594
|
+
parent_span: nil)
|
595
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
596
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
597
|
+
@transcoder = transcoder
|
598
|
+
@durability_level = durability_level
|
599
|
+
yield self if block_given?
|
600
|
+
end
|
601
|
+
|
602
|
+
def to_backend
|
603
|
+
{
|
604
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
605
|
+
expiry: @expiry,
|
606
|
+
durability_level: @durability_level,
|
607
|
+
}
|
608
|
+
end
|
609
|
+
end
|
610
|
+
|
611
|
+
# Options for {Collection#replace}
|
612
|
+
class Replace < Base
|
613
|
+
attr_accessor :expiry # @return [Integer, #in_seconds, nil]
|
614
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #encode(Object)]
|
615
|
+
attr_accessor :cas # @return [Integer, nil]
|
616
|
+
attr_accessor :durability_level # @return [Symbol]
|
617
|
+
|
618
|
+
# Creates an instance of options for {Collection#replace}
|
619
|
+
#
|
620
|
+
# @param [Integer, #in_seconds, nil] expiry expiration time to associate with the document
|
621
|
+
# @param [JsonTranscoder, #encode(Object)] transcoder used for encoding
|
622
|
+
# @param [Integer, nil] cas a CAS value that will be taken into account on the server side for optimistic concurrency
|
623
|
+
# @param [Symbol] durability_level level of durability
|
624
|
+
# +:none+::
|
625
|
+
# no enhanced durability required for the mutation
|
626
|
+
# +:majority+::
|
627
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
628
|
+
# (that is, held in the memory allocated to the bucket)
|
629
|
+
# +:majority_and_persist_to_active+::
|
630
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
631
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
632
|
+
# node hosting the active partition (vBucket) for the data.
|
633
|
+
# +:persist_to_majority+::
|
634
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
635
|
+
# Accordingly, it will be written to disk on those nodes.
|
636
|
+
#
|
637
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
638
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
639
|
+
# @param [Hash, nil] client_context the client context data, if set
|
640
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
641
|
+
#
|
642
|
+
# @yieldparam [Replace]
|
643
|
+
def initialize(expiry: nil,
|
644
|
+
transcoder: JsonTranscoder.new,
|
645
|
+
cas: nil,
|
646
|
+
durability_level: :none,
|
647
|
+
timeout: nil,
|
648
|
+
retry_strategy: nil,
|
649
|
+
client_context: nil,
|
650
|
+
parent_span: nil)
|
651
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
652
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
653
|
+
@transcoder = transcoder
|
654
|
+
@cas = cas
|
655
|
+
@durability_level = durability_level
|
656
|
+
yield self if block_given?
|
657
|
+
end
|
658
|
+
|
659
|
+
def to_backend
|
660
|
+
{
|
661
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
662
|
+
expiry: @expiry,
|
663
|
+
durability_level: @durability_level,
|
664
|
+
cas: @cas,
|
665
|
+
}
|
666
|
+
end
|
667
|
+
end
|
668
|
+
|
669
|
+
# Options for {Collection#mutate_in}
|
670
|
+
class MutateIn < Base
|
671
|
+
attr_accessor :expiry # @return [Integer, #in_seconds, nil]
|
672
|
+
attr_accessor :store_semantics # @return [Symbol]
|
673
|
+
attr_accessor :cas # @return [Integer, nil]
|
674
|
+
attr_accessor :access_deleted # @return [Boolean]
|
675
|
+
attr_accessor :create_as_deleted # @return [Boolean]
|
676
|
+
attr_accessor :durability_level # @return [Symbol]
|
677
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #encode(Object)]
|
678
|
+
|
679
|
+
# Creates an instance of options for {Collection#mutate_in}
|
680
|
+
#
|
681
|
+
# @param [Integer, #in_seconds, Time, nil] expiry expiration time to associate with the document
|
682
|
+
# @param [Symbol] store_semantics describes how the outer document store semantics on subdoc should act
|
683
|
+
# +:replace+:: replace the document, fail if it does not exist. This is the default
|
684
|
+
# +:upsert+:: replace the document or create if it does not exist
|
685
|
+
# +:insert+:: create the document, fail if it exists
|
686
|
+
# @param [Integer, nil] cas a CAS value that will be taken into account on the server side for optimistic concurrency
|
687
|
+
# @param [Boolean] access_deleted for internal use only: allows access to deleted documents that are in "tombstone" form
|
688
|
+
# @param [Boolean] create_as_deleted for internal use only: allows creating documents in "tombstone" form
|
689
|
+
# @param [Symbol] durability_level level of durability
|
690
|
+
# +:none+::
|
691
|
+
# no enhanced durability required for the mutation
|
692
|
+
# +:majority+::
|
693
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
694
|
+
# (that is, held in the memory allocated to the bucket)
|
695
|
+
# +:majority_and_persist_to_active+::
|
696
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
697
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
698
|
+
# node hosting the active partition (vBucket) for the data.
|
699
|
+
# +:persist_to_majority+::
|
700
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
701
|
+
# Accordingly, it will be written to disk on those nodes.
|
702
|
+
# @param [JsonTranscoder, #encode(Object)] transcoder used for encoding
|
703
|
+
#
|
704
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
705
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
706
|
+
# @param [Hash, nil] client_context the client context data, if set
|
707
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
708
|
+
#
|
709
|
+
# @yieldparam [MutateIn]
|
710
|
+
def initialize(expiry: nil,
|
711
|
+
store_semantics: :replace,
|
712
|
+
cas: nil,
|
713
|
+
access_deleted: false,
|
714
|
+
create_as_deleted: false,
|
715
|
+
durability_level: :none,
|
716
|
+
transcoder: JsonTranscoder.new,
|
717
|
+
timeout: nil,
|
718
|
+
retry_strategy: nil,
|
719
|
+
client_context: nil,
|
720
|
+
parent_span: nil)
|
721
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
722
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
723
|
+
@store_semantics = store_semantics
|
724
|
+
@cas = cas
|
725
|
+
@access_deleted = access_deleted
|
726
|
+
@create_as_deleted = create_as_deleted
|
727
|
+
@durability_level = durability_level
|
728
|
+
@transcoder = transcoder
|
729
|
+
yield self if block_given?
|
730
|
+
end
|
731
|
+
|
732
|
+
# @api private
|
733
|
+
def to_backend
|
734
|
+
{
|
735
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
736
|
+
expiry: @expiry,
|
737
|
+
durability_level: @durability_level,
|
738
|
+
cas: @cas,
|
739
|
+
store_semantics: @store_semantics,
|
740
|
+
access_deleted: @access_deleted,
|
741
|
+
create_as_deleted: @create_as_deleted,
|
742
|
+
}
|
743
|
+
end
|
744
|
+
end
|
745
|
+
|
746
|
+
# Options for {Collection#lookup_in}
|
747
|
+
class LookupIn < Base
|
748
|
+
attr_accessor :access_deleted # @return [Boolean]
|
749
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String)]
|
750
|
+
|
751
|
+
# Creates an instance of options for {Collection#lookup_in}
|
752
|
+
#
|
753
|
+
# @param [Boolean] access_deleted for internal use only: allows access to deleted documents that are in "tombstone" form
|
754
|
+
# @param [JsonTranscoder, #decode(String)] transcoder used for encoding
|
755
|
+
#
|
756
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
757
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
758
|
+
# @param [Hash, nil] client_context the client context data, if set
|
759
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
760
|
+
#
|
761
|
+
# @yieldparam [LookupIn] self
|
762
|
+
def initialize(access_deleted: false,
|
763
|
+
transcoder: JsonTranscoder.new,
|
764
|
+
timeout: nil,
|
765
|
+
retry_strategy: nil,
|
766
|
+
client_context: nil,
|
767
|
+
parent_span: nil)
|
768
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
769
|
+
@access_deleted = access_deleted
|
770
|
+
@transcoder = transcoder
|
771
|
+
yield self if block_given?
|
772
|
+
end
|
773
|
+
|
774
|
+
# @api private
|
775
|
+
def to_backend
|
776
|
+
{
|
777
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
778
|
+
access_deleted: @access_deleted,
|
779
|
+
}
|
780
|
+
end
|
781
|
+
end
|
782
|
+
|
783
|
+
# Options for {BinaryCollection#append}
|
784
|
+
class Append < Base
|
785
|
+
attr_accessor :cas # @return [Integer]
|
786
|
+
|
787
|
+
# Creates an instance of options for {BinaryCollection#append}
|
788
|
+
#
|
789
|
+
# @param [Integer] cas The default CAS used (0 means no CAS in this context)
|
790
|
+
#
|
791
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
792
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
793
|
+
# @param [Hash, nil] client_context the client context data, if set
|
794
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
795
|
+
#
|
796
|
+
# @yieldparam [Append] self
|
797
|
+
def initialize(cas: nil,
|
798
|
+
timeout: nil,
|
799
|
+
retry_strategy: nil,
|
800
|
+
client_context: nil,
|
801
|
+
parent_span: nil)
|
802
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
803
|
+
@cas = cas
|
804
|
+
yield self if block_given?
|
805
|
+
end
|
806
|
+
|
807
|
+
# @api private
|
808
|
+
def to_backend
|
809
|
+
{
|
810
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
811
|
+
cas: @cas,
|
812
|
+
}
|
813
|
+
end
|
814
|
+
end
|
815
|
+
|
816
|
+
# Options for {BinaryCollection#prepend}
|
817
|
+
class Prepend < Base
|
818
|
+
# @return [Integer] The default CAS used (0 means no CAS in this context)
|
819
|
+
attr_accessor :cas
|
820
|
+
|
821
|
+
# Creates an instance of options for {BinaryCollection#prepend}
|
822
|
+
#
|
823
|
+
# @param [Integer] cas The default CAS used (0 means no CAS in this context)
|
824
|
+
#
|
825
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
826
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
827
|
+
# @param [Hash, nil] client_context the client context data, if set
|
828
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
829
|
+
#
|
830
|
+
# @yieldparam [Prepend] self
|
831
|
+
def initialize(cas: nil,
|
832
|
+
timeout: nil,
|
833
|
+
retry_strategy: nil,
|
834
|
+
client_context: nil,
|
835
|
+
parent_span: nil)
|
836
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
837
|
+
@cas = cas
|
838
|
+
yield self if block_given?
|
839
|
+
end
|
840
|
+
|
841
|
+
# @api private
|
842
|
+
def to_backend
|
843
|
+
{
|
844
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
845
|
+
cas: @cas,
|
846
|
+
}
|
847
|
+
end
|
848
|
+
end
|
849
|
+
|
850
|
+
# Options for {BinaryCollection#increment}
|
851
|
+
class Increment < Base
|
852
|
+
attr_reader :delta # @return [Integer]
|
853
|
+
attr_accessor :initial # @return [Integer]
|
854
|
+
attr_accessor :expiry # @return [Integer, #in_seconds]
|
855
|
+
attr_accessor :durability_level # @return [Symbol]
|
856
|
+
|
857
|
+
# Creates an instance of options for {BinaryCollection#increment}
|
858
|
+
#
|
859
|
+
# @param [Integer] delta the delta for the operation
|
860
|
+
# @param [Integer] initial if present, holds the initial value
|
861
|
+
# @param [Integer, #in_seconds, Time, nil] expiry if set, holds the expiration for the operation
|
862
|
+
# @param [Symbol] durability_level level of durability
|
863
|
+
# +:none+::
|
864
|
+
# no enhanced durability required for the mutation
|
865
|
+
# +:majority+::
|
866
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
867
|
+
# (that is, held in the memory allocated to the bucket)
|
868
|
+
# +:majority_and_persist_to_active+::
|
869
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
870
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
871
|
+
# node hosting the active partition (vBucket) for the data.
|
872
|
+
# +:persist_to_majority+::
|
873
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
874
|
+
# Accordingly, it will be written to disk on those nodes.
|
875
|
+
#
|
876
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
877
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
878
|
+
# @param [Hash, nil] client_context the client context data, if set
|
879
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
880
|
+
#
|
881
|
+
# @yieldparam [Increment] self
|
882
|
+
def initialize(delta: 1,
|
883
|
+
initial: nil,
|
884
|
+
expiry: nil,
|
885
|
+
durability_level: :none,
|
886
|
+
timeout: nil,
|
887
|
+
retry_strategy: nil,
|
888
|
+
client_context: nil,
|
889
|
+
parent_span: nil)
|
890
|
+
raise ArgumentError, "the delta cannot be less than 0" if delta.negative?
|
891
|
+
|
892
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
893
|
+
@delta = delta
|
894
|
+
@initial = initial
|
895
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
896
|
+
@durability_level = durability_level
|
897
|
+
yield self if block_given?
|
898
|
+
end
|
899
|
+
|
900
|
+
# @param [Integer] value delta for the operation
|
901
|
+
def delta=(value)
|
902
|
+
raise ArgumentError, "the delta cannot be less than 0" if delta.negative?
|
903
|
+
|
904
|
+
@delta = value
|
905
|
+
end
|
906
|
+
|
907
|
+
# @api private
|
908
|
+
def to_backend
|
909
|
+
{
|
910
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
911
|
+
delta: @delta,
|
912
|
+
initial_value: @initial,
|
913
|
+
expiry: @expiry,
|
914
|
+
durability_level: @durability_level,
|
915
|
+
}
|
916
|
+
end
|
917
|
+
end
|
918
|
+
|
919
|
+
# Options for {BinaryCollection#decrement}
|
920
|
+
class Decrement < Base
|
921
|
+
attr_reader :delta # @return [Integer]
|
922
|
+
attr_accessor :initial # @return [Integer]
|
923
|
+
attr_accessor :expiry # @return [Integer, #in_seconds]
|
924
|
+
attr_accessor :durability_level # @return [Symbol]
|
925
|
+
|
926
|
+
# Creates an instance of options for {BinaryCollection#decrement}
|
927
|
+
#
|
928
|
+
# @param [Integer] delta the delta for the operation
|
929
|
+
# @param [Integer] initial if present, holds the initial value
|
930
|
+
# @param [Integer, #in_seconds, Time, nil] expiry if set, holds the expiration for the operation
|
931
|
+
# @param [Symbol] durability_level level of durability
|
932
|
+
# +:none+::
|
933
|
+
# no enhanced durability required for the mutation
|
934
|
+
# +:majority+::
|
935
|
+
# the mutation must be replicated to a majority of the Data Service nodes
|
936
|
+
# (that is, held in the memory allocated to the bucket)
|
937
|
+
# +:majority_and_persist_to_active+::
|
938
|
+
# The mutation must be replicated to a majority of the Data Service nodes.
|
939
|
+
# Additionally, it must be persisted (that is, written and synchronised to disk) on the
|
940
|
+
# node hosting the active partition (vBucket) for the data.
|
941
|
+
# +:persist_to_majority+::
|
942
|
+
# The mutation must be persisted to a majority of the Data Service nodes.
|
943
|
+
# Accordingly, it will be written to disk on those nodes.
|
944
|
+
#
|
945
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
946
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
947
|
+
# @param [Hash, nil] client_context the client context data, if set
|
948
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
949
|
+
#
|
950
|
+
# @yieldparam [Decrement] self
|
951
|
+
def initialize(delta: 1,
|
952
|
+
initial: nil,
|
953
|
+
expiry: nil,
|
954
|
+
durability_level: :none,
|
955
|
+
timeout: nil,
|
956
|
+
retry_strategy: nil,
|
957
|
+
client_context: nil,
|
958
|
+
parent_span: nil)
|
959
|
+
raise ArgumentError, "the delta cannot be less than 0" if delta.negative?
|
960
|
+
|
961
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
962
|
+
@delta = delta
|
963
|
+
@initial = initial
|
964
|
+
@expiry = Utils::Time.extract_expiry_time(expiry)
|
965
|
+
@durability_level = durability_level
|
966
|
+
yield self if block_given?
|
967
|
+
end
|
968
|
+
|
969
|
+
# @param [Integer] value delta for the operation
|
970
|
+
def delta=(value)
|
971
|
+
raise ArgumentError, "the delta cannot be less than 0" if delta.negative?
|
972
|
+
|
973
|
+
@delta = value
|
974
|
+
end
|
975
|
+
|
976
|
+
# @api private
|
977
|
+
def to_backend
|
978
|
+
{
|
979
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
980
|
+
delta: @delta,
|
981
|
+
initial_value: @initial,
|
982
|
+
expiry: @expiry,
|
983
|
+
durability_level: @durability_level,
|
984
|
+
}
|
985
|
+
end
|
986
|
+
end
|
987
|
+
|
988
|
+
# Options for {Datastructures::CouchbaseList#initialize}
|
989
|
+
class CouchbaseList
|
990
|
+
attr_accessor :get_options # @return [Get]
|
991
|
+
attr_accessor :remove_options # @return [Remove]
|
992
|
+
attr_accessor :lookup_in_options # @return [LookupIn]
|
993
|
+
attr_accessor :mutate_in_options # @return [MutateIn]
|
994
|
+
|
995
|
+
# Creates an instance of options for {CouchbaseList#initialize}
|
996
|
+
#
|
997
|
+
# @param [Get] get_options
|
998
|
+
# @param [Remove] remove_options
|
999
|
+
# @param [LookupIn] lookup_in_options
|
1000
|
+
# @param [MutateIn] mutate_in_options
|
1001
|
+
#
|
1002
|
+
# @yieldparam [CouchbaseList]
|
1003
|
+
def initialize(get_options: Get.new,
|
1004
|
+
remove_options: Remove.new,
|
1005
|
+
lookup_in_options: LookupIn.new,
|
1006
|
+
mutate_in_options: MutateIn.new(store_semantics: :upsert))
|
1007
|
+
@get_options = get_options
|
1008
|
+
@remove_options = remove_options
|
1009
|
+
@lookup_in_options = lookup_in_options
|
1010
|
+
@mutate_in_options = mutate_in_options
|
1011
|
+
yield self if block_given?
|
1012
|
+
end
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
# Options for {Datastructures::CouchbaseMap#initialize}
|
1016
|
+
class CouchbaseMap
|
1017
|
+
attr_accessor :get_options # @return [Get]
|
1018
|
+
attr_accessor :remove_options # @return [Remove]
|
1019
|
+
attr_accessor :lookup_in_options # @return [LookupIn]
|
1020
|
+
attr_accessor :mutate_in_options # @return [MutateIn]
|
1021
|
+
|
1022
|
+
# Creates an instance of options for {CouchbaseMap#initialize}
|
1023
|
+
#
|
1024
|
+
# @param [Get] get_options
|
1025
|
+
# @param [Remove] remove_options
|
1026
|
+
# @param [LookupIn] lookup_in_options
|
1027
|
+
# @param [MutateIn] mutate_in_options
|
1028
|
+
#
|
1029
|
+
# @yieldparam [CouchbaseMap]
|
1030
|
+
def initialize(get_options: Get.new,
|
1031
|
+
remove_options: Remove.new,
|
1032
|
+
lookup_in_options: LookupIn.new,
|
1033
|
+
mutate_in_options: MutateIn.new(store_semantics: :upsert))
|
1034
|
+
@get_options = get_options
|
1035
|
+
@remove_options = remove_options
|
1036
|
+
@lookup_in_options = lookup_in_options
|
1037
|
+
@mutate_in_options = mutate_in_options
|
1038
|
+
yield self if block_given?
|
1039
|
+
end
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
# Options for {Datastructures::CouchbaseQueue#initialize}
|
1043
|
+
class CouchbaseQueue
|
1044
|
+
attr_accessor :get_options # @return [Get]
|
1045
|
+
attr_accessor :remove_options # @return [Remove]
|
1046
|
+
attr_accessor :lookup_in_options # @return [LookupIn]
|
1047
|
+
attr_accessor :mutate_in_options # @return [MutateIn]
|
1048
|
+
|
1049
|
+
# Creates an instance of options for {CouchbaseQueue#initialize}
|
1050
|
+
#
|
1051
|
+
# @param [Get] get_options
|
1052
|
+
# @param [Remove] remove_options
|
1053
|
+
# @param [LookupIn] lookup_in_options
|
1054
|
+
# @param [MutateIn] mutate_in_options
|
1055
|
+
#
|
1056
|
+
# @yieldparam [CouchbaseQueue]
|
1057
|
+
def initialize(get_options: Get.new,
|
1058
|
+
remove_options: Remove.new,
|
1059
|
+
lookup_in_options: LookupIn.new,
|
1060
|
+
mutate_in_options: MutateIn.new(store_semantics: :upsert))
|
1061
|
+
@get_options = get_options
|
1062
|
+
@remove_options = remove_options
|
1063
|
+
@lookup_in_options = lookup_in_options
|
1064
|
+
@mutate_in_options = mutate_in_options
|
1065
|
+
yield self if block_given?
|
1066
|
+
end
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
# Options for {Datastructures::CouchbaseSet#initialize}
|
1070
|
+
class CouchbaseSet
|
1071
|
+
attr_accessor :get_options # @return [Get]
|
1072
|
+
attr_accessor :remove_options # @return [Remove]
|
1073
|
+
attr_accessor :lookup_in_options # @return [LookupIn]
|
1074
|
+
attr_accessor :mutate_in_options # @return [MutateIn]
|
1075
|
+
|
1076
|
+
# Creates an instance of options for {CouchbaseSet#initialize}
|
1077
|
+
#
|
1078
|
+
# @param [Get] get_options
|
1079
|
+
# @param [Remove] remove_options
|
1080
|
+
# @param [LookupIn] lookup_in_options
|
1081
|
+
# @param [MutateIn] mutate_in_options
|
1082
|
+
#
|
1083
|
+
# @yieldparam [CouchbaseSet]
|
1084
|
+
def initialize(get_options: Get.new,
|
1085
|
+
remove_options: Remove.new,
|
1086
|
+
lookup_in_options: LookupIn.new,
|
1087
|
+
mutate_in_options: MutateIn.new(store_semantics: :upsert))
|
1088
|
+
@get_options = get_options
|
1089
|
+
@remove_options = remove_options
|
1090
|
+
@lookup_in_options = lookup_in_options
|
1091
|
+
@mutate_in_options = mutate_in_options
|
1092
|
+
yield self if block_given?
|
1093
|
+
end
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
# Options for {Couchbase::Cluster.connect}
|
1097
|
+
class Cluster
|
1098
|
+
attr_accessor :authenticator # @return [PasswordAuthenticator, CertificateAuthenticator]
|
1099
|
+
|
1100
|
+
# Creates an instance of options for {Couchbase::Cluster.connect}
|
1101
|
+
#
|
1102
|
+
# @param [PasswordAuthenticator, CertificateAuthenticator] authenticator
|
1103
|
+
#
|
1104
|
+
# @yieldparam [Cluster] self
|
1105
|
+
def initialize(authenticator: nil)
|
1106
|
+
@authenticator = authenticator
|
1107
|
+
yield self if block_given?
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
# @param [String] username
|
1111
|
+
# @param [String] password
|
1112
|
+
def authenticate(username, password)
|
1113
|
+
@authenticator = PasswordAuthenticator.new(username, password)
|
1114
|
+
end
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# Options for {Couchbase::Cluster#diagnostics}
|
1118
|
+
class Diagnostics
|
1119
|
+
attr_accessor :report_id # @return [String]
|
1120
|
+
|
1121
|
+
# Creates an instance of options for {Couchbase::Cluster#diagnostics}
|
1122
|
+
#
|
1123
|
+
# @param [String] report_id Holds custom report ID.
|
1124
|
+
#
|
1125
|
+
# @yieldparam [Diagnostics] self
|
1126
|
+
def initialize(report_id: nil)
|
1127
|
+
@report_id = report_id
|
1128
|
+
yield self if block_given?
|
1129
|
+
end
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
# Options for {Couchbase::Bucket#ping}
|
1133
|
+
class Ping
|
1134
|
+
attr_accessor :report_id # @return [String]
|
1135
|
+
attr_accessor :service_types # @return [Array<Symbol>]
|
1136
|
+
attr_accessor :timeout # @return [Integer, #in_milliseconds]
|
1137
|
+
|
1138
|
+
# Creates an instance of options for {Couchbase::Bucket#ping}
|
1139
|
+
#
|
1140
|
+
# @param [String] report_id Holds custom report id.
|
1141
|
+
# @@param [Array<Symbol>] service_types The service types to limit this diagnostics request
|
1142
|
+
# @param [Integer, #in_milliseconds] timeout
|
1143
|
+
#
|
1144
|
+
# @yieldparam [Ping] self
|
1145
|
+
def initialize(report_id: nil,
|
1146
|
+
service_types: [:kv, :query, :analytics, :search, :views, :management],
|
1147
|
+
timeout: nil)
|
1148
|
+
@report_id = report_id
|
1149
|
+
@service_types = service_types
|
1150
|
+
@timeout = timeout
|
1151
|
+
yield self if block_given?
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
# @api private
|
1155
|
+
def to_backend
|
1156
|
+
{
|
1157
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
1158
|
+
service_types: @service_types,
|
1159
|
+
report_id: @report_id,
|
1160
|
+
}
|
1161
|
+
end
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Options for {Couchbase::Cluster#analytics_query}
|
1165
|
+
class Analytics < Base
|
1166
|
+
attr_accessor :client_context_id # @return [String]
|
1167
|
+
attr_accessor :scan_consistency # @return [Symbol]
|
1168
|
+
attr_accessor :readonly # @return [Boolean]
|
1169
|
+
attr_accessor :priority # @return [Boolean]
|
1170
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String)]
|
1171
|
+
attr_accessor :scope_qualifier # @return [String]
|
1172
|
+
|
1173
|
+
# Creates new instance of options for {Couchbase::Cluster#analytics_query}
|
1174
|
+
#
|
1175
|
+
# @param [String] client_context_id provides a custom client context ID for this query
|
1176
|
+
# @param [Symbol] scan_consistency specifies level of consistency for the query
|
1177
|
+
# +:not_bounded+::
|
1178
|
+
# The index will return whatever state it has to the analytics query engine at the time of query.
|
1179
|
+
#
|
1180
|
+
# This is the default (for single-statement requests). No timestamp vector is used in the index scan.
|
1181
|
+
# This is also the fastest mode, because we avoid the cost of obtaining the vector, and we also avoid
|
1182
|
+
# any wait for the index
|
1183
|
+
# +:request_plus+::
|
1184
|
+
# The index will wait until all mutations have been processed at the time of request before being processed
|
1185
|
+
# in the analytics query engine.
|
1186
|
+
#
|
1187
|
+
# This implements strong consistency per request. Before processing the request, a current vector is obtained.
|
1188
|
+
# The vector is used as a lower bound for the statements in the request.
|
1189
|
+
# @param [Boolean] readonly allows explicitly marking a query as being readonly and not mutating any documents on
|
1190
|
+
# the server side.
|
1191
|
+
# @param [Boolean] priority allows to give certain requests higher priority than others
|
1192
|
+
# @param [JsonTranscoder] transcoder to decode rows
|
1193
|
+
# @param [Array<#to_json>, nil] positional_parameters parameters to be used as substitution for numbered macros
|
1194
|
+
# like +$1+, +$2+ in query string
|
1195
|
+
# @param [Hash<String => #to_json>, nil] named_parameters parameters to be used as substitution for named macros
|
1196
|
+
# like +$name+ in query string
|
1197
|
+
# @param [String, nil] scope_qualifier Associate scope qualifier (also known as +query_context+) with the query.
|
1198
|
+
# The qualifier must be in form +{bucket_name}.{scope_name}+ or +default:{bucket_name}.{scope_name}+.
|
1199
|
+
#
|
1200
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
1201
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
1202
|
+
# @param [Hash, nil] client_context the client context data, if set
|
1203
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
1204
|
+
#
|
1205
|
+
# @note Either +positional_parameters+ or +named_parameters+ may be specified.
|
1206
|
+
#
|
1207
|
+
# @yieldparam [Analytics] self
|
1208
|
+
def initialize(client_context_id: nil,
|
1209
|
+
scan_consistency: nil,
|
1210
|
+
readonly: false,
|
1211
|
+
priority: nil,
|
1212
|
+
transcoder: JsonTranscoder.new,
|
1213
|
+
positional_parameters: nil,
|
1214
|
+
named_parameters: nil,
|
1215
|
+
scope_qualifier: nil,
|
1216
|
+
timeout: nil,
|
1217
|
+
retry_strategy: nil,
|
1218
|
+
client_context: nil,
|
1219
|
+
parent_span: nil)
|
1220
|
+
raise ArgumentError, "Cannot pass positional and named parameters at the same time" if positional_parameters && named_parameters
|
1221
|
+
|
1222
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
1223
|
+
@client_context_id = client_context_id
|
1224
|
+
@scan_consistency = scan_consistency
|
1225
|
+
@readonly = readonly
|
1226
|
+
@priority = priority
|
1227
|
+
@transcoder = transcoder
|
1228
|
+
@positional_parameters = positional_parameters
|
1229
|
+
@named_parameters = named_parameters
|
1230
|
+
@scope_qualifier = scope_qualifier
|
1231
|
+
@raw_parameters = {}
|
1232
|
+
yield self if block_given?
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
# Sets positional parameters for the query
|
1236
|
+
#
|
1237
|
+
# @param [Array] positional the list of parameters that have to be substituted in the statement
|
1238
|
+
def positional_parameters(positional)
|
1239
|
+
@positional_parameters = positional
|
1240
|
+
@named_parameters = nil
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
# Sets named parameters for the query
|
1244
|
+
#
|
1245
|
+
# @param [Hash] named the key/value map of the parameters to substitute in the statement
|
1246
|
+
def named_parameters(named)
|
1247
|
+
@named_parameters = named
|
1248
|
+
@positional_parameters = nil
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# Allows providing custom JSON key/value pairs for advanced usage
|
1252
|
+
#
|
1253
|
+
# @param [String] key the parameter name (key of the JSON property)
|
1254
|
+
# @param [Object] value the parameter value (value of the JSON property)
|
1255
|
+
def raw(key, value)
|
1256
|
+
@raw_parameters[key] = JSON.generate(value)
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
# @api private
|
1260
|
+
def to_backend(scope_name: nil, bucket_name: nil)
|
1261
|
+
{
|
1262
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
1263
|
+
client_context_id: @client_context_id,
|
1264
|
+
scan_consistency: @scan_consistency,
|
1265
|
+
readonly: @readonly,
|
1266
|
+
priority: @priority,
|
1267
|
+
positional_parameters: export_positional_parameters,
|
1268
|
+
named_parameters: export_named_parameters,
|
1269
|
+
raw_parameters: @raw_parameters,
|
1270
|
+
scope_qualifier: @scope_qualifier,
|
1271
|
+
scope_name: scope_name,
|
1272
|
+
bucket_name: bucket_name,
|
1273
|
+
}
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
private
|
1277
|
+
|
1278
|
+
# @api private
|
1279
|
+
# @return [Array<String>, nil]
|
1280
|
+
def export_positional_parameters
|
1281
|
+
@positional_parameters&.map { |p| JSON.dump(p) }
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
# @api private
|
1285
|
+
# @return [Hash<String => String>, nil]
|
1286
|
+
def export_named_parameters
|
1287
|
+
@named_parameters&.each_with_object({}) { |(n, v), o| o[n.to_s] = JSON.dump(v) }
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
# @api private
|
1291
|
+
# @return [Hash<String => #to_json>]
|
1292
|
+
attr_reader :raw_parameters
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# Options for {Couchbase::Cluster#query}
|
1296
|
+
class Query < Base
|
1297
|
+
attr_accessor :adhoc # @return [Boolean]
|
1298
|
+
attr_accessor :client_context_id # @return [String]
|
1299
|
+
attr_accessor :max_parallelism # @return [Integer]
|
1300
|
+
attr_accessor :readonly # @return [Boolean]
|
1301
|
+
attr_accessor :scan_wait # @return [Integer, #in_milliseconds]
|
1302
|
+
attr_accessor :scan_cap # @return [Integer]
|
1303
|
+
attr_accessor :pipeline_batch # @return [Integer]
|
1304
|
+
attr_accessor :pipeline_cap # @return [Integer]
|
1305
|
+
attr_accessor :metrics # @return [Boolean]
|
1306
|
+
attr_accessor :profile # @return [Symbol]
|
1307
|
+
attr_accessor :flex_index # @return [Boolean]
|
1308
|
+
attr_accessor :scope_qualifier # @return [String]
|
1309
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String)]
|
1310
|
+
|
1311
|
+
# Creates new instance of options for {Couchbase::Cluster#query}
|
1312
|
+
#
|
1313
|
+
# @param [Boolean] adhoc allows turning this request into a prepared statement query
|
1314
|
+
# @param [String, nil] client_context_id provides a custom client context ID for this query
|
1315
|
+
# @param [Integer, nil] max_parallelism allows overriding the default maximum parallelism for the query execution
|
1316
|
+
# on the server side.
|
1317
|
+
# @param [Boolean, nil] readonly allows explicitly marking a query as being readonly and not mutating any
|
1318
|
+
# documents on the server side.
|
1319
|
+
# @param [Integer, #in_milliseconds, nil] scan_wait The maximum duration (in milliseconds) the query engine
|
1320
|
+
# is willing to wait before failing. Allows customizing how long (in milliseconds) the query engine is willing
|
1321
|
+
# to wait until the index catches up to whatever scan consistency is asked for in this query. Note that if
|
1322
|
+
# +:not_bounded+ consistency level is used, this method doesn't do anything at all. If no value is provided to
|
1323
|
+
# this method, the server default is used.
|
1324
|
+
# @param [Integer, nil] scan_cap customize the maximum buffered channel size between the indexer and the query
|
1325
|
+
# service
|
1326
|
+
# @param [Integer, nil] pipeline_cap customize the number of items execution operators can batch for fetch
|
1327
|
+
# from the Key Value layer on the server.
|
1328
|
+
# @param [Integer, nil] pipeline_batch customize the maximum number of items each execution operator can buffer
|
1329
|
+
# between various operators on the server.
|
1330
|
+
# @param [Boolean, nil] metrics enables per-request metrics in the trailing section of the query
|
1331
|
+
# @param [Symbol] profile customize server profile level for this query
|
1332
|
+
# +:off+::
|
1333
|
+
# No profiling information is added to the query response
|
1334
|
+
# +:phases+::
|
1335
|
+
# The query response includes a profile section with stats and details about various phases of the query plan
|
1336
|
+
# and execution. Three phase times will be included in the +system:active_requests+ and
|
1337
|
+
# +system:completed_requests+ monitoring keyspaces.
|
1338
|
+
# +:timings+::
|
1339
|
+
# Besides the phase times, the profile section of the query response document will include a full query plan
|
1340
|
+
# with timing and information about the number of processed documents at each phase. This information will be
|
1341
|
+
# included in the system:active_requests and system:completed_requests keyspaces.
|
1342
|
+
# @param [Symbol, nil] scan_consistency Sets the mutation tokens this query should be consistent with. Overrides
|
1343
|
+
# +mutation_state+.
|
1344
|
+
# +:not_bounded+::
|
1345
|
+
# The indexer will return whatever state it has to the query engine at the time of query. This is the default
|
1346
|
+
# (for single-statement requests).
|
1347
|
+
# +:request_plus+::
|
1348
|
+
# The indexer will wait until all mutations have been processed at the time of request before returning to
|
1349
|
+
# the query engine.
|
1350
|
+
# @param [Boolean, nil] flex_index Tells the query engine to use a flex index (utilizing the search service)
|
1351
|
+
# @param [String, nil] scope_qualifier Associate scope qualifier (also known as +query_context+) with the query.
|
1352
|
+
# The qualifier must be in form +{bucket_name}.{scope_name}+ or +default:{bucket_name}.{scope_name}+.
|
1353
|
+
# @param [JsonTranscoder] transcoder to decode rows
|
1354
|
+
# @param [Array<#to_json>, nil] positional_parameters parameters to be used as substitution for numbered macros
|
1355
|
+
# like +$1+, +$2+ in query string
|
1356
|
+
# @param [Hash<String => #to_json>, nil] named_parameters parameters to be used as substitution for named macros
|
1357
|
+
# like +$name+ in query string.
|
1358
|
+
#
|
1359
|
+
# @param [MutationState, nil] mutation_state Sets the mutation tokens this query should be consistent with.
|
1360
|
+
# Overrides +scan_consistency+.
|
1361
|
+
#
|
1362
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
1363
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
1364
|
+
# @param [Hash, nil] client_context the client context data, if set
|
1365
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
1366
|
+
#
|
1367
|
+
# @note Either +positional_parameters+ or +named_parameters+ may be specified.
|
1368
|
+
#
|
1369
|
+
# @yieldparam [Query] self
|
1370
|
+
def initialize(adhoc: true,
|
1371
|
+
client_context_id: nil,
|
1372
|
+
max_parallelism: nil,
|
1373
|
+
readonly: false,
|
1374
|
+
scan_wait: nil,
|
1375
|
+
scan_cap: nil,
|
1376
|
+
pipeline_cap: nil,
|
1377
|
+
pipeline_batch: nil,
|
1378
|
+
metrics: nil,
|
1379
|
+
profile: :off,
|
1380
|
+
flex_index: nil,
|
1381
|
+
scope_qualifier: nil,
|
1382
|
+
scan_consistency: :not_bounded,
|
1383
|
+
mutation_state: nil,
|
1384
|
+
transcoder: JsonTranscoder.new,
|
1385
|
+
positional_parameters: nil,
|
1386
|
+
named_parameters: nil,
|
1387
|
+
timeout: nil,
|
1388
|
+
retry_strategy: nil,
|
1389
|
+
client_context: nil,
|
1390
|
+
parent_span: nil)
|
1391
|
+
raise ArgumentError, "Cannot pass positional and named parameters at the same time" if positional_parameters && named_parameters
|
1392
|
+
|
1393
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
1394
|
+
@adhoc = adhoc
|
1395
|
+
@client_context_id = client_context_id
|
1396
|
+
@max_parallelism = max_parallelism
|
1397
|
+
@readonly = readonly
|
1398
|
+
@scan_wait = scan_wait
|
1399
|
+
@scan_cap = scan_cap
|
1400
|
+
@pipeline_cap = pipeline_cap
|
1401
|
+
@pipeline_batch = pipeline_batch
|
1402
|
+
@metrics = metrics
|
1403
|
+
@profile = profile
|
1404
|
+
@flex_index = flex_index
|
1405
|
+
@scope_qualifier = scope_qualifier
|
1406
|
+
@scan_consistency = scan_consistency
|
1407
|
+
@mutation_state = mutation_state
|
1408
|
+
@transcoder = transcoder
|
1409
|
+
@positional_parameters = positional_parameters
|
1410
|
+
@named_parameters = named_parameters
|
1411
|
+
@raw_parameters = {}
|
1412
|
+
yield self if block_given?
|
1413
|
+
end
|
1414
|
+
|
1415
|
+
# Allows providing custom JSON key/value pairs for advanced usage
|
1416
|
+
#
|
1417
|
+
# @param [String] key the parameter name (key of the JSON property)
|
1418
|
+
# @param [Object] value the parameter value (value of the JSON property)
|
1419
|
+
def raw(key, value)
|
1420
|
+
@raw_parameters[key] = JSON.generate(value)
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
# Customizes the consistency guarantees for this query
|
1424
|
+
#
|
1425
|
+
# @note overrides consistency level set by {#consistent_with}
|
1426
|
+
#
|
1427
|
+
# [+:not_bounded+] The indexer will return whatever state it has to the query engine at the time of query. This is the default (for
|
1428
|
+
# single-statement requests).
|
1429
|
+
#
|
1430
|
+
# [+:request_plus+] The indexer will wait until all mutations have been processed at the time of request before returning to the query
|
1431
|
+
# engine.
|
1432
|
+
#
|
1433
|
+
# @param [:not_bounded, :request_plus] level the index scan consistency to be used for this query
|
1434
|
+
def scan_consistency=(level)
|
1435
|
+
@mutation_state = nil if @mutation_state
|
1436
|
+
@scan_consistency = level
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
# Sets the mutation tokens this query should be consistent with
|
1440
|
+
#
|
1441
|
+
# @note overrides consistency level set by {#scan_consistency=}
|
1442
|
+
#
|
1443
|
+
# @param [MutationState] mutation_state the mutation state containing the mutation tokens
|
1444
|
+
def consistent_with(mutation_state)
|
1445
|
+
@scan_consistency = nil if @scan_consistency
|
1446
|
+
@mutation_state = mutation_state
|
1447
|
+
end
|
1448
|
+
|
1449
|
+
# Sets positional parameters for the query
|
1450
|
+
#
|
1451
|
+
# @param [Array] positional the list of parameters that have to be substituted in the statement
|
1452
|
+
def positional_parameters(positional)
|
1453
|
+
@positional_parameters = positional
|
1454
|
+
@named_parameters = nil
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
# @api private
|
1458
|
+
# @return [Array<String>, nil]
|
1459
|
+
def export_positional_parameters
|
1460
|
+
@positional_parameters&.map { |p| JSON.dump(p) }
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
# Sets named parameters for the query
|
1464
|
+
#
|
1465
|
+
# @param [Hash] named the key/value map of the parameters to substitute in the statement
|
1466
|
+
def named_parameters(named)
|
1467
|
+
@named_parameters = named
|
1468
|
+
@positional_parameters = nil
|
1469
|
+
end
|
1470
|
+
|
1471
|
+
# @api private
|
1472
|
+
# @return [Hash<String => String>, nil]
|
1473
|
+
def export_named_parameters
|
1474
|
+
@named_parameters&.each_with_object({}) { |(n, v), o| o[n.to_s] = JSON.dump(v) }
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
# @api private
|
1478
|
+
# @return [MutationState]
|
1479
|
+
attr_reader :mutation_state
|
1480
|
+
|
1481
|
+
# @api private
|
1482
|
+
# @return [Hash<String => #to_json>]
|
1483
|
+
attr_reader :raw_parameters
|
1484
|
+
|
1485
|
+
# @api private
|
1486
|
+
def to_backend(scope_name: nil, bucket_name: nil)
|
1487
|
+
{
|
1488
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
1489
|
+
adhoc: @adhoc,
|
1490
|
+
client_context_id: @client_context_id,
|
1491
|
+
max_parallelism: @max_parallelism,
|
1492
|
+
readonly: @readonly,
|
1493
|
+
flex_index: @flex_index,
|
1494
|
+
scan_wait: @scan_wait.respond_to?(:in_milliseconds) ? @scan_wait.public_send(:in_milliseconds) : @scan_wait,
|
1495
|
+
scan_cap: @scan_cap,
|
1496
|
+
pipeline_batch: @pipeline_batch,
|
1497
|
+
pipeline_cap: @pipeline_cap,
|
1498
|
+
metrics: @metrics,
|
1499
|
+
profile: @profile,
|
1500
|
+
positional_parameters: export_positional_parameters,
|
1501
|
+
named_parameters: export_named_parameters,
|
1502
|
+
raw_parameters: @raw_parameters,
|
1503
|
+
scan_consistency: @scan_consistency,
|
1504
|
+
mutation_state: @mutation_state&.to_a,
|
1505
|
+
scope_qualifier: @scope_qualifier,
|
1506
|
+
scope_name: scope_name,
|
1507
|
+
bucket_name: bucket_name,
|
1508
|
+
}
|
1509
|
+
end
|
1510
|
+
end
|
1511
|
+
|
1512
|
+
# Options for {Couchbase::Cluster#search_query}
|
1513
|
+
class Search < Base
|
1514
|
+
attr_accessor :limit # @return [Integer]
|
1515
|
+
attr_accessor :skip # @return [Integer]
|
1516
|
+
attr_accessor :explain # @return [Boolean]
|
1517
|
+
attr_accessor :highlight_style # @return [Symbol]
|
1518
|
+
attr_accessor :highlight_fields # @return [Array<String>]
|
1519
|
+
attr_accessor :fields # @return [Array<String>]
|
1520
|
+
attr_accessor :disable_scoring # @return [Boolean]
|
1521
|
+
attr_accessor :sort # @return [Array<String, Cluster::SearchSort>]
|
1522
|
+
attr_accessor :facets # @return [Hash<String => Cluster::SearchFacet>]
|
1523
|
+
attr_accessor :transcoder # @return [JsonTranscoder, #decode(String)]
|
1524
|
+
|
1525
|
+
# @param [Integer] limit limits the number of matches returned from the complete result set.
|
1526
|
+
# @param [Integer] skip indicates how many matches are skipped on the result set before starting to return the
|
1527
|
+
# matches
|
1528
|
+
# @param [Boolean] explain triggers inclusion of additional search result score explanations.
|
1529
|
+
# @param [:html, :ansi, nil] highlight_style the style of highlighting in the result excerpts (if not specified,
|
1530
|
+
# the server default will be used)
|
1531
|
+
# @param [Array<String>] highlight_fields list of the fields to highlight
|
1532
|
+
# @param [Array<String>] fields list of field values which should be retrieved for result documents, provided they
|
1533
|
+
# were stored while indexing
|
1534
|
+
# @param [MutationState] mutation_state the mutation tokens this query should be consistent with
|
1535
|
+
# @param [Boolean] disable_scoring If set to true, the server will not perform any scoring on the hits
|
1536
|
+
# @param [Array<String, Cluster::SearchSort>] sort Ordering rules to apply to the results. The list might contain
|
1537
|
+
# either strings or special objects, that derive from {Cluster::SearchSort}. In case of String, the value
|
1538
|
+
# represents the name of the field with optional +-+ in front of the name, which will turn on descending mode
|
1539
|
+
# for this field. One field is special is +"_score"+ which will sort results by their score. When nothing
|
1540
|
+
# specified, the Server will order results by their score descending, which is equivalent of +"-_score"+.
|
1541
|
+
# @param [Hash<String => Cluster::SearchFacet>] facets facets allow to aggregate information collected on a
|
1542
|
+
# particular result set
|
1543
|
+
# @param [JsonTranscoder, #decode(String)] transcoder to use for the results
|
1544
|
+
#
|
1545
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
1546
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
1547
|
+
# @param [Hash, nil] client_context the client context data, if set
|
1548
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
1549
|
+
#
|
1550
|
+
# @yieldparam [Search] self
|
1551
|
+
def initialize(limit: nil,
|
1552
|
+
skip: nil,
|
1553
|
+
explain: false,
|
1554
|
+
highlight_style: nil,
|
1555
|
+
highlight_fields: nil,
|
1556
|
+
fields: nil,
|
1557
|
+
mutation_state: nil,
|
1558
|
+
disable_scoring: false,
|
1559
|
+
sort: nil,
|
1560
|
+
facets: nil,
|
1561
|
+
transcoder: JsonTranscoder.new,
|
1562
|
+
timeout: nil,
|
1563
|
+
retry_strategy: nil,
|
1564
|
+
client_context: nil,
|
1565
|
+
parent_span: nil)
|
1566
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
1567
|
+
@limit = limit
|
1568
|
+
@skip = skip
|
1569
|
+
@explain = explain
|
1570
|
+
@highlight_style = highlight_style
|
1571
|
+
@highlight_fields = highlight_fields
|
1572
|
+
@fields = fields
|
1573
|
+
@disable_scoring = disable_scoring
|
1574
|
+
@sort = sort
|
1575
|
+
@facets = facets
|
1576
|
+
@transcoder = transcoder
|
1577
|
+
@scan_consistency = :not_bounded
|
1578
|
+
@mutation_state = mutation_state
|
1579
|
+
yield self if block_given?
|
1580
|
+
end
|
1581
|
+
|
1582
|
+
# Sets the mutation tokens this query should be consistent with
|
1583
|
+
#
|
1584
|
+
# @note overrides consistency level set by {#scan_consistency=}
|
1585
|
+
#
|
1586
|
+
# @param [MutationState] mutation_state the mutation state containing the mutation tokens
|
1587
|
+
#
|
1588
|
+
# @return [void]
|
1589
|
+
def consistent_with(mutation_state)
|
1590
|
+
@scan_consistency = nil if @scan_consistency
|
1591
|
+
@mutation_state = mutation_state
|
1592
|
+
end
|
1593
|
+
|
1594
|
+
# Customizes the consistency guarantees for this query
|
1595
|
+
#
|
1596
|
+
# @note overrides consistency level set by {#consistent_with}
|
1597
|
+
#
|
1598
|
+
# @param [:not_bounded] level the scan consistency to be used for this query
|
1599
|
+
# +:not_bounded+:: The engine will return whatever state it has at the time of query
|
1600
|
+
#
|
1601
|
+
# @return [void]
|
1602
|
+
def scan_consistency=(level)
|
1603
|
+
@mutation_state = nil if @mutation_state
|
1604
|
+
@scan_consistency = level
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# @api private
|
1608
|
+
# @return [MutationState]
|
1609
|
+
attr_reader :mutation_state
|
1610
|
+
|
1611
|
+
# @api private
|
1612
|
+
# @return [Symbol
|
1613
|
+
attr_reader :scan_consistency
|
1614
|
+
|
1615
|
+
# @api private
|
1616
|
+
def to_backend
|
1617
|
+
{
|
1618
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
1619
|
+
limit: @limit,
|
1620
|
+
skip: @skip,
|
1621
|
+
explain: @explain,
|
1622
|
+
disable_scoring: @disable_scoring,
|
1623
|
+
highlight_style: @highlight_style,
|
1624
|
+
highlight_fields: @highlight_fields,
|
1625
|
+
fields: @fields,
|
1626
|
+
sort: @sort&.map { |v| JSON.generate(v) },
|
1627
|
+
facets: @facets&.map { |(k, v)| [k, JSON.generate(v)] },
|
1628
|
+
scan_consistency: @scan_consistency,
|
1629
|
+
mutation_state: @mutation_state&.to_a,
|
1630
|
+
}
|
1631
|
+
end
|
1632
|
+
end
|
1633
|
+
|
1634
|
+
# Options for {Couchbase::Cluster#view_query}
|
1635
|
+
class View < Base
|
1636
|
+
attr_accessor :scan_consistency # @return [Symbol]
|
1637
|
+
attr_accessor :namespace # @return [Symbol]
|
1638
|
+
attr_accessor :skip # @return [Integer]
|
1639
|
+
attr_accessor :limit # @return [Integer]
|
1640
|
+
attr_accessor :start_key # @return [#to_json, nil]
|
1641
|
+
attr_accessor :end_key # @return [#to_json, nil]
|
1642
|
+
attr_accessor :start_key_doc_id # @return [String, nil]
|
1643
|
+
attr_accessor :end_key_doc_id # @return [String, nil]
|
1644
|
+
attr_accessor :inclusive_end # @return [Boolean, nil]
|
1645
|
+
attr_accessor :group # @return [Boolean, nil]
|
1646
|
+
attr_accessor :group_level # @return [Integer, nil]
|
1647
|
+
attr_accessor :key # @return [#to_json, nil]
|
1648
|
+
attr_accessor :keys # @return [Array<#to_json>, nil]
|
1649
|
+
attr_accessor :order # @return [Symbol, nil]
|
1650
|
+
attr_accessor :reduce # @return [Boolean, nil]
|
1651
|
+
attr_accessor :on_error # @return [Symbol, nil]
|
1652
|
+
attr_accessor :debug # @return [Boolean, nil]
|
1653
|
+
|
1654
|
+
# @param [:not_bounded, :request_plus, :update_after] scan_consistency Specifies the level of consistency for the query
|
1655
|
+
# @param [:production, :development] namespace
|
1656
|
+
# @param [Integer, nil] skip Specifies the number of results to skip from the start of the result set
|
1657
|
+
# @param [Integer, nil] limit Specifies the maximum number of results to return
|
1658
|
+
# @param [#to_json, nil] start_key Specifies the key, to which the engine has to skip before result generation
|
1659
|
+
# @param [#to_json, nil] end_key Specifies the key, at which the result generation has to be stopped
|
1660
|
+
# @param [String, nil] start_key_doc_id Specifies the document id in case {#start_key} gives multiple results within the index
|
1661
|
+
# @param [String, nil] end_key_doc_id Specifies the document id in case {#end_key} gives multiple results within the index
|
1662
|
+
# @param [Boolean, nil] inclusive_end Specifies whether the {#end_key}/#{#end_key_doc_id} values should be inclusive
|
1663
|
+
# @param [Boolean, nil] group Specifies whether to enable grouping of the results
|
1664
|
+
# @param [Integer, nil] group_level Specifies the depth within the key to group the results
|
1665
|
+
# @param [#to_json, nil] key Specifies the key to fetch from the index
|
1666
|
+
# @param [Array<#to_json>, nil] keys Specifies set of the keys to fetch from the index
|
1667
|
+
# @param [:ascending, :descending, nil] order Specifies the order of the results that should be returned
|
1668
|
+
# @param [Boolean, nil] reduce Specifies whether to enable the reduction function associated with this particular
|
1669
|
+
# view index
|
1670
|
+
# @param [:stop, :continue, nil] on_error Specifies the behaviour of the view engine should an error occur during
|
1671
|
+
# the gathering of view index results which would result in only partial results being available
|
1672
|
+
# @param [Boolean, nil] debug allows to return debug information as part of the view response
|
1673
|
+
#
|
1674
|
+
# @param [Integer, #in_milliseconds, nil] timeout
|
1675
|
+
# @param [Proc, nil] retry_strategy the custom retry strategy, if set
|
1676
|
+
# @param [Hash, nil] client_context the client context data, if set
|
1677
|
+
# @param [Span, nil] parent_span if set holds the parent span, that should be used for this request
|
1678
|
+
#
|
1679
|
+
# @yieldparam [View] self
|
1680
|
+
def initialize(scan_consistency: :not_bounded,
|
1681
|
+
namespace: :production,
|
1682
|
+
skip: nil,
|
1683
|
+
limit: nil,
|
1684
|
+
start_key: nil,
|
1685
|
+
end_key: nil,
|
1686
|
+
start_key_doc_id: nil,
|
1687
|
+
end_key_doc_id: nil,
|
1688
|
+
inclusive_end: nil,
|
1689
|
+
group: nil,
|
1690
|
+
group_level: nil,
|
1691
|
+
key: nil,
|
1692
|
+
keys: nil,
|
1693
|
+
order: nil,
|
1694
|
+
reduce: nil,
|
1695
|
+
on_error: nil,
|
1696
|
+
debug: false,
|
1697
|
+
timeout: nil,
|
1698
|
+
retry_strategy: nil,
|
1699
|
+
client_context: nil,
|
1700
|
+
parent_span: nil)
|
1701
|
+
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
|
1702
|
+
|
1703
|
+
@scan_consistency = scan_consistency
|
1704
|
+
@namespace = namespace
|
1705
|
+
@skip = skip
|
1706
|
+
@limit = limit
|
1707
|
+
@start_key = start_key
|
1708
|
+
@end_key = end_key
|
1709
|
+
@start_key_doc_id = start_key_doc_id
|
1710
|
+
@end_key_doc_id = end_key_doc_id
|
1711
|
+
@inclusive_end = inclusive_end
|
1712
|
+
@group = group
|
1713
|
+
@group_level = group_level
|
1714
|
+
@key = key
|
1715
|
+
@keys = keys
|
1716
|
+
@order = order
|
1717
|
+
@reduce = reduce
|
1718
|
+
@on_error = on_error
|
1719
|
+
@debug = debug
|
1720
|
+
yield self if block_given?
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
# Allows providing custom JSON key/value pairs for advanced usage
|
1724
|
+
#
|
1725
|
+
# @param [String] key the parameter name (key of the JSON property)
|
1726
|
+
# @param [Object] value the parameter value (value of the JSON property)
|
1727
|
+
def raw(key, value)
|
1728
|
+
@raw_parameters[key] = JSON.generate(value)
|
1729
|
+
end
|
1730
|
+
|
1731
|
+
# @api private
|
1732
|
+
def to_backend
|
1733
|
+
{
|
1734
|
+
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
|
1735
|
+
scan_consistency: @scan_consistency,
|
1736
|
+
skip: @skip,
|
1737
|
+
limit: @limit,
|
1738
|
+
start_key: (JSON.generate(@start_key) unless @start_key.nil?),
|
1739
|
+
end_key: (JSON.generate(@end_key) unless @end_key.nil?),
|
1740
|
+
start_key_doc_id: @start_key_doc_id,
|
1741
|
+
end_key_doc_id: @end_key_doc_id,
|
1742
|
+
inclusive_end: @inclusive_end,
|
1743
|
+
group: @group,
|
1744
|
+
group_level: @group_level,
|
1745
|
+
key: (JSON.generate(@key) unless @key.nil?),
|
1746
|
+
keys: @keys&.map { |key| JSON.generate(key) },
|
1747
|
+
order: @order,
|
1748
|
+
reduce: @reduce,
|
1749
|
+
on_error: @on_error,
|
1750
|
+
debug: @debug,
|
1751
|
+
}
|
1752
|
+
end
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
# @api private
|
1756
|
+
# TODO: deprecate in 3.1
|
1757
|
+
CommonOptions = ::Couchbase::Options::Base
|
1758
|
+
|
1759
|
+
# rubocop:disable Naming/MethodName constructor shortcuts
|
1760
|
+
module_function
|
1761
|
+
|
1762
|
+
# Construct {Get} options for {Collection#get}
|
1763
|
+
#
|
1764
|
+
# @example Get partial document using projections
|
1765
|
+
# res = collection.get("customer123", Options::Get(projections: ["name", "addresses.billing"]))
|
1766
|
+
# res.content
|
1767
|
+
#
|
1768
|
+
# # {"addresses"=>
|
1769
|
+
# # {"billing"=>
|
1770
|
+
# # {"country"=>"United Kingdom",
|
1771
|
+
# # "line1"=>"123 Any Street",
|
1772
|
+
# # "line2"=>"Anytown"}},
|
1773
|
+
# # "name"=>"Douglas Reynholm"}
|
1774
|
+
#
|
1775
|
+
# @return [Get]
|
1776
|
+
def Get(**args)
|
1777
|
+
Get.new(**args)
|
1778
|
+
end
|
1779
|
+
|
1780
|
+
# Construct {GetMulti} options for {Collection#get_multi}
|
1781
|
+
#
|
1782
|
+
# @example Fetch "foo" and "bar" in a batch
|
1783
|
+
# res = collection.get(["foo", "bar"], Options::GetMulti(timeout: 3_000))
|
1784
|
+
# res[0].content #=> content of "foo"
|
1785
|
+
# res[1].content #=> content of "bar"
|
1786
|
+
#
|
1787
|
+
# @return [GetMulti]
|
1788
|
+
def GetMulti(**args)
|
1789
|
+
GetMulti.new(**args)
|
1790
|
+
end
|
1791
|
+
|
1792
|
+
# Construct {GetAndLock} options for {Collection#get_and_lock}
|
1793
|
+
#
|
1794
|
+
# @example Retrieve document and lock for 10 seconds
|
1795
|
+
# collection.get_and_lock("customer123", 10, Options::GetAndLock(timeout: 3_000))
|
1796
|
+
#
|
1797
|
+
# @return [GetAndLock]
|
1798
|
+
def GetAndLock(**args)
|
1799
|
+
GetAndLock.new(**args)
|
1800
|
+
end
|
1801
|
+
|
1802
|
+
# Construct {GetAndTouch} options for {Collection#get_and_touch}
|
1803
|
+
#
|
1804
|
+
# @example Retrieve document and prolong its expiration for 10 seconds
|
1805
|
+
# collection.get_and_touch("customer123", 10, Options::GetAndTouch(timeout: 3_000))
|
1806
|
+
#
|
1807
|
+
# @return [GetAndTouch]
|
1808
|
+
def GetAndTouch(**args)
|
1809
|
+
GetAndTouch.new(**args)
|
1810
|
+
end
|
1811
|
+
|
1812
|
+
# Construct {GetAllReplicas} options for {Collection#get_any_replica}
|
1813
|
+
#
|
1814
|
+
# @return [GetAllReplicas]
|
1815
|
+
def GetAllReplicas(**args)
|
1816
|
+
GetAllReplicas.new(**args)
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
# Construct {GetAnyReplica} options for {Collection#get_all_replicas}
|
1820
|
+
#
|
1821
|
+
# @return [GetAnyReplica]
|
1822
|
+
def GetAnyReplica(**args)
|
1823
|
+
GetAnyReplica.new(**args)
|
1824
|
+
end
|
1825
|
+
|
1826
|
+
# Construct {Exists} options for {Collection#exists}
|
1827
|
+
#
|
1828
|
+
# @example Check if the document exists without fetching its contents
|
1829
|
+
# res = collection.exists("customer123", Options::Exists(timeout: 3_000))
|
1830
|
+
# res.exists? #=> true
|
1831
|
+
#
|
1832
|
+
# @return [Exists]
|
1833
|
+
def Exists(**args)
|
1834
|
+
Exists.new(**args)
|
1835
|
+
end
|
1836
|
+
|
1837
|
+
# Construct {Touch} options for {Collection#touch}
|
1838
|
+
#
|
1839
|
+
# @example Reset expiration timer for document to 30 seconds (and use custom operation timeout)
|
1840
|
+
# res = collection.touch("customer123", 30, Options::Touch(timeout: 3_000))
|
1841
|
+
#
|
1842
|
+
# @return [Touch]
|
1843
|
+
def Touch(**args)
|
1844
|
+
Touch.new(**args)
|
1845
|
+
end
|
1846
|
+
|
1847
|
+
# Construct {Unlock} options for {Collection#touch}
|
1848
|
+
#
|
1849
|
+
# @example Lock (pessimistically) and unlock document
|
1850
|
+
# res = collection.get_and_lock("customer123", 10, Options::Unlock(timeout: 3_000))
|
1851
|
+
# collection.unlock("customer123", res.cas)
|
1852
|
+
#
|
1853
|
+
# @return [Unlock]
|
1854
|
+
def Unlock(**args)
|
1855
|
+
Unlock.new(**args)
|
1856
|
+
end
|
1857
|
+
|
1858
|
+
# Construct {Remove} options for {Collection#remove}
|
1859
|
+
#
|
1860
|
+
# @example Remove the document in collection, but apply optimistic lock
|
1861
|
+
# res = collection.upsert("mydoc", {"foo" => 42})
|
1862
|
+
# res.cas #=> 7751414725654
|
1863
|
+
#
|
1864
|
+
# begin
|
1865
|
+
# res = collection.remove("customer123", Options::Remove(cas: 3735928559))
|
1866
|
+
# rescue Error::CasMismatch
|
1867
|
+
# puts "Failed to remove the document, it might be changed by other application"
|
1868
|
+
# end
|
1869
|
+
#
|
1870
|
+
# @return [Remove]
|
1871
|
+
def Remove(**args)
|
1872
|
+
Remove.new(**args)
|
1873
|
+
end
|
1874
|
+
|
1875
|
+
# Construct {RemoveMulti} options for {Collection#remove_multi}
|
1876
|
+
#
|
1877
|
+
# @example Remove two documents in collection. For "mydoc" apply optimistic lock
|
1878
|
+
# res = collection.upsert("mydoc", {"foo" => 42})
|
1879
|
+
# res.cas #=> 7751414725654
|
1880
|
+
#
|
1881
|
+
# res = collection.remove_multi(["foo", ["mydoc", res.cas]], Options::RemoveMulti(timeout: 3_000))
|
1882
|
+
# if res[1].error.is_a?(Error::CasMismatch)
|
1883
|
+
# puts "Failed to remove the document, it might be changed by other application"
|
1884
|
+
# end
|
1885
|
+
#
|
1886
|
+
# @return [RemoveMulti]
|
1887
|
+
def RemoveMulti(**args)
|
1888
|
+
RemoveMulti.new(**args)
|
1889
|
+
end
|
1890
|
+
|
1891
|
+
# Construct {Insert} options for {Collection#insert}
|
1892
|
+
#
|
1893
|
+
# @example Insert new document in collection
|
1894
|
+
# res = collection.insert("mydoc", {"foo" => 42}, Options::Insert(expiry: 20))
|
1895
|
+
# res.cas #=> 242287264414742
|
1896
|
+
#
|
1897
|
+
# @return [Insert]
|
1898
|
+
def Insert(**args)
|
1899
|
+
Insert.new(**args)
|
1900
|
+
end
|
1901
|
+
|
1902
|
+
# Construct {Upsert} options for {Collection#upsert}
|
1903
|
+
#
|
1904
|
+
# @example Upsert new document in collection
|
1905
|
+
# res = collection.upsert("mydoc", {"foo" => 42}, Options::Upsert(expiry: 20))
|
1906
|
+
# res.cas #=> 242287264414742
|
1907
|
+
#
|
1908
|
+
# @return [Upsert]
|
1909
|
+
def Upsert(**args)
|
1910
|
+
Upsert.new(**args)
|
1911
|
+
end
|
1912
|
+
|
1913
|
+
# Construct {UpsertMulti} options for {Collection#upsert_multi}
|
1914
|
+
#
|
1915
|
+
# @example Upsert two documents with IDs "foo" and "bar" into a collection with expiration 20 seconds.
|
1916
|
+
# res = collection.upsert_multi([
|
1917
|
+
# "foo", {"foo" => 42},
|
1918
|
+
# "bar", {"bar" => "some value"}
|
1919
|
+
# ], Options::UpsertMulti(expiry: 20))
|
1920
|
+
# res[0].cas #=> 7751414725654
|
1921
|
+
# res[1].cas #=> 7751418925851
|
1922
|
+
#
|
1923
|
+
# @return [UpsertMulti]
|
1924
|
+
def UpsertMulti(**args)
|
1925
|
+
UpsertMulti.new(**args)
|
1926
|
+
end
|
1927
|
+
|
1928
|
+
# Construct {Replace} options for {Collection#replace}
|
1929
|
+
#
|
1930
|
+
# @example Replace new document in collection with optimistic locking
|
1931
|
+
# res = collection.get("mydoc")
|
1932
|
+
# res = collection.replace("mydoc", {"foo" => 42}, Options::Replace(cas: res.cas))
|
1933
|
+
# res.cas #=> 242287264414742
|
1934
|
+
#
|
1935
|
+
# @return [Replace]
|
1936
|
+
def Replace(**args)
|
1937
|
+
Replace.new(**args)
|
1938
|
+
end
|
1939
|
+
|
1940
|
+
# Construct {MutateIn} options for {Collection#mutate_in}
|
1941
|
+
#
|
1942
|
+
# @example Append number into subarray of the document
|
1943
|
+
# mutation_specs = [
|
1944
|
+
# MutateInSpec::array_append("purchases.complete", [42])
|
1945
|
+
# ]
|
1946
|
+
# collection.mutate_in("customer123", mutation_specs, Options::MutateIn(expiry: 10))
|
1947
|
+
#
|
1948
|
+
# @return [MutateIn]
|
1949
|
+
def MutateIn(**args)
|
1950
|
+
MutateIn.new(**args)
|
1951
|
+
end
|
1952
|
+
|
1953
|
+
# Construct {LookupIn} options for {Collection#lookup_in}
|
1954
|
+
#
|
1955
|
+
# @example Get list of IDs of completed purchases
|
1956
|
+
# lookup_specs = [
|
1957
|
+
# LookupInSpec::get("purchases.complete")
|
1958
|
+
# ]
|
1959
|
+
# collection.lookup_in("customer123", lookup_specs, Options::LookupIn(timeout: 3_000))
|
1960
|
+
#
|
1961
|
+
# @return [LookupIn]
|
1962
|
+
def LookupIn(**args)
|
1963
|
+
LookupIn.new(**args)
|
1964
|
+
end
|
1965
|
+
|
1966
|
+
# Construct {Append} options for {BinaryCollection#append}
|
1967
|
+
#
|
1968
|
+
# @example Append "bar" to the content of the existing document
|
1969
|
+
# collection.upsert("mydoc", "foo")
|
1970
|
+
# collection.binary.append("mydoc", "bar", Options::Append(timeout: 3_000))
|
1971
|
+
# collection.get("mydoc", Options::Get(transcoder: nil)).content #=> "foobar"
|
1972
|
+
#
|
1973
|
+
# @return [Append]
|
1974
|
+
def Append(**args)
|
1975
|
+
Append.new(**args)
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
# Construct {Prepend} options for {BinaryCollection#prepend}
|
1979
|
+
#
|
1980
|
+
# @example Prepend "bar" to the content of the existing document
|
1981
|
+
# collection.upsert("mydoc", "foo")
|
1982
|
+
# collection.binary.prepend("mydoc", "bar", Options::Prepend(timeout: 3_000))
|
1983
|
+
# collection.get("mydoc", Options::Get(transcoder: nil)).content #=> "barfoo"
|
1984
|
+
#
|
1985
|
+
# @return [Prepend]
|
1986
|
+
def Prepend(**args)
|
1987
|
+
Prepend.new(**args)
|
1988
|
+
end
|
1989
|
+
|
1990
|
+
# Construct {Diagnostics} options for {Cluster#diagnostics}
|
1991
|
+
#
|
1992
|
+
# @return [Diagnostics]
|
1993
|
+
def Diagnostics(**args)
|
1994
|
+
Diagnostics.new(**args)
|
1995
|
+
end
|
1996
|
+
|
1997
|
+
# Construct {Ping} options for {Bucket#ping}
|
1998
|
+
#
|
1999
|
+
# @return [Ping]
|
2000
|
+
def Ping(**args)
|
2001
|
+
Ping.new(**args)
|
2002
|
+
end
|
2003
|
+
|
2004
|
+
# Construct {Cluster} options for {Cluster.connect}
|
2005
|
+
#
|
2006
|
+
# @example Pass authenticator object to Options
|
2007
|
+
# Cluster.connect("couchbase://localhost",
|
2008
|
+
# Options::Cluster(authenticator: PasswordAuthenticator.new("Administrator", "password")))
|
2009
|
+
#
|
2010
|
+
# @example Shorter version, more useful for interactive sessions
|
2011
|
+
# Cluster.connect("couchbase://localhost", "Administrator", "password")
|
2012
|
+
#
|
2013
|
+
# @example Authentication with TLS client certificate (note +couchbases://+ schema)
|
2014
|
+
# Cluster.connect("couchbases://localhost?trust_certificate=/tmp/ca.pem",
|
2015
|
+
# Options::Cluster(authenticator: CertificateAuthenticator.new("/tmp/certificate.pem", "/tmp/private.key")))
|
2016
|
+
#
|
2017
|
+
# @see https://docs.couchbase.com/server/current/manage/manage-security/configure-client-certificates.html
|
2018
|
+
#
|
2019
|
+
# @return [Cluster]
|
2020
|
+
def Cluster(**args)
|
2021
|
+
Cluster.new(**args)
|
2022
|
+
end
|
2023
|
+
|
2024
|
+
# Construct {Increment} options for {BinaryCollection#increment}
|
2025
|
+
#
|
2026
|
+
# @example Increment value by 10, and initialize to 0 if it does not exist
|
2027
|
+
# res = collection.binary.increment("raw_counter", Options::Increment(delta: 10, initial: 0))
|
2028
|
+
# res.content #=> 0
|
2029
|
+
# res = collection.binary.increment("raw_counter", Options::Increment(delta: 10, initial: 0))
|
2030
|
+
# res.content #=> 10
|
2031
|
+
#
|
2032
|
+
# @return [Increment]
|
2033
|
+
def Increment(**args)
|
2034
|
+
Increment.new(**args)
|
2035
|
+
end
|
2036
|
+
|
2037
|
+
# Construct {Decrement} options for {BinaryCollection#decrement}
|
2038
|
+
#
|
2039
|
+
# @example Decrement value by 2, and initialize to 100 if it does not exist
|
2040
|
+
# res = collection.binary.decrement("raw_counter", Options::Decrement(delta: 2, initial: 100))
|
2041
|
+
# res.value #=> 100
|
2042
|
+
# res = collection.binary.decrement("raw_counter", Options::Decrement(delta: 2, initial: 100))
|
2043
|
+
# res.value #=> 98
|
2044
|
+
#
|
2045
|
+
# @return [Decrement]
|
2046
|
+
def Decrement(**args)
|
2047
|
+
Decrement.new(**args)
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
# Construct {Analytics} options for {Cluster#analytics_query}
|
2051
|
+
#
|
2052
|
+
# @example Select name of the given user
|
2053
|
+
# cluster.analytics_query("SELECT u.name AS uname FROM GleambookUsers u WHERE u.id = $user_id ",
|
2054
|
+
# Options::Analytics(named_parameters: {user_id: 2}))
|
2055
|
+
#
|
2056
|
+
# @return [Analytics]
|
2057
|
+
def Analytics(**args)
|
2058
|
+
Analytics.new(**args)
|
2059
|
+
end
|
2060
|
+
|
2061
|
+
# Construct {Query} options for {Cluster#query}
|
2062
|
+
#
|
2063
|
+
# @example Select first ten hotels from travel sample dataset
|
2064
|
+
# cluster.query("SELECT * FROM `travel-sample` WHERE type = $type LIMIT 10",
|
2065
|
+
# Options::Query(named_parameters: {type: "hotel"}, metrics: true))
|
2066
|
+
#
|
2067
|
+
# @return [Query]
|
2068
|
+
def Query(**args)
|
2069
|
+
Query.new(**args)
|
2070
|
+
end
|
2071
|
+
|
2072
|
+
# Construct {Search} options for {Cluster#search_query}
|
2073
|
+
#
|
2074
|
+
# @example Return first 10 results of "hop beer" query and request highlighting
|
2075
|
+
# cluster.search_query("beer_index", Cluster::SearchQuery.match_phrase("hop beer"),
|
2076
|
+
# Options::Search(
|
2077
|
+
# limit: 10,
|
2078
|
+
# fields: %w[name],
|
2079
|
+
# highlight_style: :html,
|
2080
|
+
# highlight_fields: %w[name description]
|
2081
|
+
# ))
|
2082
|
+
#
|
2083
|
+
# @return [Search]
|
2084
|
+
def Search(**args)
|
2085
|
+
Search.new(**args)
|
2086
|
+
end
|
2087
|
+
|
2088
|
+
# Construct {View} options for {Bucket#view_query}
|
2089
|
+
#
|
2090
|
+
# @example Make sure the view engine catch up with all mutations and return keys starting from +["random_brewery:"]+
|
2091
|
+
# bucket.view_query("beer", "brewery_beers",
|
2092
|
+
# Options::View(
|
2093
|
+
# start_key: ["random_brewery:"],
|
2094
|
+
# scan_consistency: :request_plus
|
2095
|
+
# ))
|
2096
|
+
#
|
2097
|
+
# @return [View]
|
2098
|
+
def View(**args)
|
2099
|
+
View.new(**args)
|
2100
|
+
end
|
2101
|
+
|
2102
|
+
# rubocop:enable Naming/MethodName
|
2103
|
+
end
|
2104
|
+
end
|