couchbase 1.3.15 → 3.0.0.alpha.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/tests-6.0.3.yml +52 -0
- data/.github/workflows/tests-dev-preview.yml +55 -0
- data/.github/workflows/tests.yml +50 -0
- data/.gitignore +17 -12
- data/.gitmodules +21 -0
- data/.idea/.gitignore +5 -0
- data/.idea/dictionaries/gem_terms.xml +18 -0
- data/.idea/inspectionProfiles/Project_Default.xml +8 -0
- data/.idea/vcs.xml +13 -0
- data/.yardopts +1 -5
- data/Gemfile +22 -2
- data/LICENSE.txt +202 -0
- data/README.md +60 -0
- data/Rakefile +46 -15
- data/bin/check-cluster +31 -0
- data/bin/console +21 -0
- data/bin/fetch-stats +19 -0
- data/bin/init-cluster +82 -0
- data/bin/jenkins/build-extension +35 -0
- data/bin/jenkins/install-dependencies +47 -0
- data/bin/jenkins/test-with-cbdyncluster +58 -0
- data/bin/setup +24 -0
- data/couchbase.gemspec +64 -41
- data/examples/analytics.rb +221 -0
- data/examples/crud.rb +20 -0
- data/examples/managing_analytics_indexes.rb +72 -0
- data/examples/managing_buckets.rb +47 -0
- data/examples/managing_collections.rb +58 -0
- data/examples/managing_query_indexes.rb +63 -0
- data/examples/managing_search_indexes.rb +62 -0
- data/examples/managing_view_indexes.rb +54 -0
- data/examples/query.rb +18 -0
- data/examples/query_with_consistency.rb +76 -0
- data/examples/search.rb +187 -0
- data/examples/search_with_consistency.rb +84 -0
- data/examples/subdocument.rb +51 -0
- data/examples/view.rb +50 -0
- data/ext/.clang-format +15 -0
- data/ext/.clang-tidy +22 -0
- data/ext/.cmake-format.yaml +8 -0
- data/ext/.gitignore +2 -0
- data/ext/.idea/.name +1 -0
- data/ext/.idea/dictionaries/couchbase_terms.xml +14 -0
- data/ext/.idea/ext.iml +2 -0
- data/ext/.idea/misc.xml +4 -0
- data/ext/.idea/modules.xml +8 -0
- data/ext/.idea/vcs.xml +12 -0
- data/ext/CMakeLists.txt +163 -0
- data/ext/LICENSE.txt +202 -0
- data/ext/build_version.hxx.in +26 -0
- data/ext/couchbase/bucket.hxx +95 -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 +176 -0
- data/ext/couchbase/collections_manifest.hxx +88 -0
- data/ext/couchbase/configuration.hxx +256 -0
- data/ext/couchbase/configuration_monitor.hxx +93 -0
- data/ext/couchbase/couchbase.cxx +5449 -0
- data/ext/couchbase/document_id.hxx +38 -0
- data/ext/couchbase/error_map.hxx +61 -0
- data/ext/couchbase/errors.hxx +691 -0
- data/ext/couchbase/io/dns_client.hxx +215 -0
- data/ext/couchbase/io/dns_codec.hxx +207 -0
- data/ext/couchbase/io/dns_config.hxx +116 -0
- data/ext/couchbase/io/dns_message.hxx +555 -0
- data/ext/couchbase/io/http_message.hxx +38 -0
- data/ext/couchbase/io/http_parser.hxx +174 -0
- data/ext/couchbase/io/http_session.hxx +321 -0
- data/ext/couchbase/io/http_session_manager.hxx +127 -0
- data/ext/couchbase/io/mcbp_message.hxx +58 -0
- data/ext/couchbase/io/mcbp_parser.hxx +101 -0
- data/ext/couchbase/io/mcbp_session.hxx +931 -0
- data/ext/couchbase/mutation_token.hxx +38 -0
- data/ext/couchbase/operations.hxx +91 -0
- data/ext/couchbase/operations/analytics_dataset_create.hxx +117 -0
- data/ext/couchbase/operations/analytics_dataset_drop.hxx +103 -0
- data/ext/couchbase/operations/analytics_dataset_get_all.hxx +107 -0
- data/ext/couchbase/operations/analytics_dataverse_create.hxx +104 -0
- data/ext/couchbase/operations/analytics_dataverse_drop.hxx +104 -0
- data/ext/couchbase/operations/analytics_get_pending_mutations.hxx +91 -0
- data/ext/couchbase/operations/analytics_index_create.hxx +128 -0
- data/ext/couchbase/operations/analytics_index_drop.hxx +110 -0
- data/ext/couchbase/operations/analytics_index_get_all.hxx +106 -0
- data/ext/couchbase/operations/analytics_link_connect.hxx +102 -0
- data/ext/couchbase/operations/analytics_link_disconnect.hxx +101 -0
- data/ext/couchbase/operations/bucket_create.hxx +139 -0
- data/ext/couchbase/operations/bucket_drop.hxx +66 -0
- data/ext/couchbase/operations/bucket_flush.hxx +66 -0
- data/ext/couchbase/operations/bucket_get.hxx +70 -0
- data/ext/couchbase/operations/bucket_get_all.hxx +63 -0
- data/ext/couchbase/operations/bucket_settings.hxx +111 -0
- data/ext/couchbase/operations/bucket_update.hxx +116 -0
- data/ext/couchbase/operations/cluster_developer_preview_enable.hxx +61 -0
- data/ext/couchbase/operations/collection_create.hxx +91 -0
- data/ext/couchbase/operations/collection_drop.hxx +83 -0
- data/ext/couchbase/operations/command.hxx +163 -0
- data/ext/couchbase/operations/design_document.hxx +59 -0
- data/ext/couchbase/operations/document_analytics.hxx +292 -0
- data/ext/couchbase/operations/document_decrement.hxx +82 -0
- data/ext/couchbase/operations/document_exists.hxx +82 -0
- data/ext/couchbase/operations/document_get.hxx +64 -0
- data/ext/couchbase/operations/document_get_and_lock.hxx +66 -0
- data/ext/couchbase/operations/document_get_and_touch.hxx +66 -0
- data/ext/couchbase/operations/document_get_projected.hxx +244 -0
- data/ext/couchbase/operations/document_increment.hxx +84 -0
- data/ext/couchbase/operations/document_insert.hxx +76 -0
- data/ext/couchbase/operations/document_lookup_in.hxx +106 -0
- data/ext/couchbase/operations/document_mutate_in.hxx +139 -0
- data/ext/couchbase/operations/document_query.hxx +335 -0
- data/ext/couchbase/operations/document_remove.hxx +69 -0
- data/ext/couchbase/operations/document_replace.hxx +78 -0
- data/ext/couchbase/operations/document_search.hxx +356 -0
- data/ext/couchbase/operations/document_touch.hxx +62 -0
- data/ext/couchbase/operations/document_unlock.hxx +62 -0
- data/ext/couchbase/operations/document_upsert.hxx +76 -0
- data/ext/couchbase/operations/document_view.hxx +228 -0
- data/ext/couchbase/operations/query_index_build_deferred.hxx +86 -0
- data/ext/couchbase/operations/query_index_create.hxx +135 -0
- data/ext/couchbase/operations/query_index_drop.hxx +109 -0
- data/ext/couchbase/operations/query_index_get_all.hxx +107 -0
- data/ext/couchbase/operations/scope_create.hxx +82 -0
- data/ext/couchbase/operations/scope_drop.hxx +80 -0
- data/ext/couchbase/operations/scope_get_all.hxx +74 -0
- data/ext/couchbase/operations/search_index.hxx +79 -0
- data/ext/couchbase/operations/search_index_analyze_document.hxx +92 -0
- data/ext/couchbase/operations/search_index_control_ingest.hxx +80 -0
- data/ext/couchbase/operations/search_index_control_plan_freeze.hxx +80 -0
- data/ext/couchbase/operations/search_index_control_query.hxx +80 -0
- data/ext/couchbase/operations/search_index_drop.hxx +77 -0
- data/ext/couchbase/operations/search_index_get.hxx +80 -0
- data/ext/couchbase/operations/search_index_get_all.hxx +82 -0
- data/ext/couchbase/operations/search_index_get_documents_count.hxx +81 -0
- data/ext/couchbase/operations/search_index_upsert.hxx +106 -0
- data/ext/couchbase/operations/view_index_drop.hxx +67 -0
- data/ext/couchbase/operations/view_index_get.hxx +90 -0
- data/ext/couchbase/operations/view_index_get_all.hxx +125 -0
- data/ext/couchbase/operations/view_index_upsert.hxx +87 -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/uuid.cc +96 -0
- data/ext/couchbase/platform/uuid.h +56 -0
- data/ext/couchbase/protocol/client_opcode.hxx +264 -0
- data/ext/couchbase/protocol/client_request.hxx +160 -0
- data/ext/couchbase/protocol/client_response.hxx +218 -0
- data/ext/couchbase/protocol/cmd_cluster_map_change_notification.hxx +81 -0
- data/ext/couchbase/protocol/cmd_decrement.hxx +187 -0
- data/ext/couchbase/protocol/cmd_exists.hxx +171 -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 +124 -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 +156 -0
- data/ext/couchbase/protocol/cmd_increment.hxx +187 -0
- data/ext/couchbase/protocol/cmd_info.hxx +36 -0
- data/ext/couchbase/protocol/cmd_insert.hxx +172 -0
- data/ext/couchbase/protocol/cmd_lookup_in.hxx +219 -0
- data/ext/couchbase/protocol/cmd_mutate_in.hxx +365 -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 +67 -0
- data/ext/couchbase/protocol/frame_info_id.hxx +187 -0
- data/ext/couchbase/protocol/hello_feature.hxx +255 -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 +333 -0
- data/ext/couchbase/protocol/unsigned_leb128.h +195 -0
- data/ext/couchbase/service_type.hxx +60 -0
- data/ext/couchbase/timeout_defaults.hxx +34 -0
- data/ext/couchbase/utils/byteswap.hxx +33 -0
- data/ext/couchbase/utils/connection_string.hxx +231 -0
- data/ext/couchbase/utils/crc32.hxx +48 -0
- data/ext/couchbase/utils/url_codec.hxx +225 -0
- data/ext/couchbase/version.hxx +24 -0
- data/ext/extconf.rb +47 -0
- data/ext/test/main.cxx +58 -0
- data/ext/third_party/asio/.appveyor.yml +107 -0
- data/ext/third_party/asio/.cirrus.yml +16 -0
- data/ext/third_party/asio/.gitignore +3 -0
- data/ext/third_party/asio/.travis.yml +323 -0
- data/ext/third_party/asio/asio/.gitignore +23 -0
- data/ext/third_party/asio/asio/COPYING +4 -0
- data/ext/third_party/asio/asio/INSTALL +5 -0
- data/ext/third_party/asio/asio/LICENSE_1_0.txt +23 -0
- data/ext/third_party/asio/asio/Makefile.am +19 -0
- data/ext/third_party/asio/asio/README +4 -0
- data/ext/third_party/asio/asio/asio.manifest +4865 -0
- data/ext/third_party/asio/asio/autogen.sh +55 -0
- data/ext/third_party/asio/asio/boost_asio.manifest +5193 -0
- data/ext/third_party/asio/asio/boostify.pl +603 -0
- data/ext/third_party/asio/asio/configure.ac +182 -0
- data/ext/third_party/asio/asio/include/.gitignore +2 -0
- data/ext/third_party/asio/asio/include/Makefile.am +484 -0
- data/ext/third_party/asio/asio/include/asio.hpp +147 -0
- data/ext/third_party/asio/asio/include/asio/associated_allocator.hpp +131 -0
- data/ext/third_party/asio/asio/include/asio/associated_executor.hpp +149 -0
- data/ext/third_party/asio/asio/include/asio/async_result.hpp +589 -0
- data/ext/third_party/asio/asio/include/asio/awaitable.hpp +123 -0
- data/ext/third_party/asio/asio/include/asio/basic_datagram_socket.hpp +1210 -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 +1202 -0
- data/ext/third_party/asio/asio/include/asio/basic_seq_packet_socket.hpp +756 -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 +2495 -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 +1049 -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 +763 -0
- data/ext/third_party/asio/asio/include/asio/bind_executor.hpp +580 -0
- data/ext/third_party/asio/asio/include/asio/buffer.hpp +2494 -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 +100 -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 +127 -0
- data/ext/third_party/asio/asio/include/asio/detached.hpp +62 -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 +45 -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 +816 -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 +544 -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/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 +83 -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 +112 -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 +1499 -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 +280 -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 +121 -0
- data/ext/third_party/asio/asio/include/asio/detail/descriptor_read_op.hpp +130 -0
- data/ext/third_party/asio/asio/include/asio/detail/descriptor_write_op.hpp +130 -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 +104 -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 +242 -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 +57 -0
- data/ext/third_party/asio/asio/include/asio/detail/handler_tracking.hpp +238 -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 +113 -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 +474 -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 +358 -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 +152 -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 +617 -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 +667 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/socket_ops.ipp +3575 -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 +179 -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 +118 -0
- data/ext/third_party/asio/asio/include/asio/detail/impl/strand_service.ipp +177 -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 +594 -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_executor.hpp +167 -0
- data/ext/third_party/asio/asio/include/asio/detail/io_object_impl.hpp +193 -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 +70 -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 +100 -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 +162 -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 +391 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_null_buffers_op.hpp +92 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_serial_port_service.hpp +238 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_accept_op.hpp +230 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_connect_op.hpp +116 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_recv_op.hpp +137 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp +142 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp +135 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_send_op.hpp +136 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_sendto_op.hpp +134 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_service.hpp +505 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_socket_service_base.hpp +518 -0
- data/ext/third_party/asio/asio/include/asio/detail/reactive_wait_op.hpp +92 -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 +65 -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 +138 -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 +148 -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 +224 -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 +88 -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 +337 -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/static_mutex.hpp +52 -0
- data/ext/third_party/asio/asio/include/asio/detail/std_event.hpp +176 -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 +142 -0
- data/ext/third_party/asio/asio/include/asio/detail/strand_service.hpp +142 -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 +125 -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 +89 -0
- data/ext/third_party/asio/asio/include/asio/detail/variadic_templates.hpp +151 -0
- data/ext/third_party/asio/asio/include/asio/detail/wait_handler.hpp +87 -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 +151 -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 +113 -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 +106 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_io_context.hpp +338 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_null_buffers_op.hpp +123 -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 +92 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp +159 -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 +308 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_connect_op.hpp +130 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_recv_op.hpp +120 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp +129 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp +121 -0
- data/ext/third_party/asio/asio/include/asio/detail/win_iocp_socket_send_op.hpp +114 -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 +123 -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 +121 -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 +94 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_socket_recv_op.hpp +115 -0
- data/ext/third_party/asio/asio/include/asio/detail/winrt_socket_send_op.hpp +106 -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 +73 -0
- data/ext/third_party/asio/asio/include/asio/detail/wrapped_handler.hpp +291 -0
- data/ext/third_party/asio/asio/include/asio/dispatch.hpp +118 -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_context.hpp +412 -0
- data/ext/third_party/asio/asio/include/asio/executor.hpp +341 -0
- data/ext/third_party/asio/asio/include/asio/executor_work_guard.hpp +170 -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 +81 -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 +85 -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 +422 -0
- data/ext/third_party/asio/asio/include/asio/impl/buffered_read_stream.hpp +491 -0
- data/ext/third_party/asio/asio/include/asio/impl/buffered_write_stream.hpp +471 -0
- data/ext/third_party/asio/asio/include/asio/impl/co_spawn.hpp +160 -0
- data/ext/third_party/asio/asio/include/asio/impl/compose.hpp +533 -0
- data/ext/third_party/asio/asio/include/asio/impl/connect.hpp +872 -0
- data/ext/third_party/asio/asio/include/asio/impl/defer.hpp +113 -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 +113 -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 +387 -0
- data/ext/third_party/asio/asio/include/asio/impl/executor.ipp +38 -0
- data/ext/third_party/asio/asio/include/asio/impl/handler_alloc_hook.ipp +52 -0
- data/ext/third_party/asio/asio/include/asio/impl/io_context.hpp +353 -0
- data/ext/third_party/asio/asio/include/asio/impl/io_context.ipp +175 -0
- data/ext/third_party/asio/asio/include/asio/impl/post.hpp +113 -0
- data/ext/third_party/asio/asio/include/asio/impl/read.hpp +1135 -0
- data/ext/third_party/asio/asio/include/asio/impl/read_at.hpp +699 -0
- data/ext/third_party/asio/asio/include/asio/impl/read_until.hpp +3150 -0
- data/ext/third_party/asio/asio/include/asio/impl/redirect_error.hpp +372 -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 +490 -0
- data/ext/third_party/asio/asio/include/asio/impl/src.cpp +25 -0
- data/ext/third_party/asio/asio/include/asio/impl/src.hpp +82 -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 +80 -0
- data/ext/third_party/asio/asio/include/asio/impl/system_executor.hpp +85 -0
- data/ext/third_party/asio/asio/include/asio/impl/thread_pool.hpp +127 -0
- data/ext/third_party/asio/asio/include/asio/impl/thread_pool.ipp +87 -0
- data/ext/third_party/asio/asio/include/asio/impl/use_awaitable.hpp +276 -0
- data/ext/third_party/asio/asio/include/asio/impl/use_future.hpp +887 -0
- data/ext/third_party/asio/asio/include/asio/impl/write.hpp +1043 -0
- data/ext/third_party/asio/asio/include/asio/impl/write_at.hpp +624 -0
- data/ext/third_party/asio/asio/include/asio/io_context.hpp +872 -0
- data/ext/third_party/asio/asio/include/asio/io_context_strand.hpp +374 -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_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/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 +123 -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/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 +336 -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 +114 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/engine.hpp +160 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/handshake_op.hpp +62 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/impl/engine.ipp +336 -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 +381 -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 +67 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/shutdown_op.hpp +64 -0
- data/ext/third_party/asio/asio/include/asio/ssl/detail/stream_core.hpp +135 -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 +67 -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 +885 -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/steady_timer.hpp +42 -0
- data/ext/third_party/asio/asio/include/asio/strand.hpp +314 -0
- data/ext/third_party/asio/asio/include/asio/streambuf.hpp +33 -0
- data/ext/third_party/asio/asio/include/asio/system_context.hpp +81 -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 +129 -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 +235 -0
- data/ext/third_party/asio/asio/include/asio/time_traits.hpp +86 -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 +34 -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 +203 -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 +110 -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 +143 -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/asio/asio/release.pl +440 -0
- data/ext/third_party/asio/asio/src/.gitignore +11 -0
- data/ext/third_party/asio/asio/src/Makefile.am +23 -0
- data/ext/third_party/asio/asio/src/Makefile.mgw +204 -0
- data/ext/third_party/asio/asio/src/Makefile.msc +497 -0
- data/ext/third_party/asio/asio/src/asio.cpp +11 -0
- data/ext/third_party/asio/asio/src/asio_ssl.cpp +11 -0
- data/ext/third_party/asio/asio/src/doc/.gitignore +5 -0
- data/ext/third_party/asio/asio/src/doc/Jamfile.v2 +62 -0
- data/ext/third_party/asio/asio/src/doc/asio.png +0 -0
- data/ext/third_party/asio/asio/src/doc/asio.qbk +127 -0
- data/ext/third_party/asio/asio/src/doc/asioref.sty +90 -0
- data/ext/third_party/asio/asio/src/doc/asioref.xsl +94 -0
- data/ext/third_party/asio/asio/src/doc/boost_bind_dox.txt +5 -0
- data/ext/third_party/asio/asio/src/doc/doxy2qbk.pl +22 -0
- data/ext/third_party/asio/asio/src/doc/examples.qbk +564 -0
- data/ext/third_party/asio/asio/src/doc/history.qbk +1794 -0
- data/ext/third_party/asio/asio/src/doc/index.xml +13 -0
- data/ext/third_party/asio/asio/src/doc/makepdf.pl +26 -0
- data/ext/third_party/asio/asio/src/doc/net_ts.qbk +479 -0
- data/ext/third_party/asio/asio/src/doc/noncopyable_dox.txt +3 -0
- data/ext/third_party/asio/asio/src/doc/overview.qbk +103 -0
- data/ext/third_party/asio/asio/src/doc/overview/allocation.qbk +89 -0
- data/ext/third_party/asio/asio/src/doc/overview/async.qbk +185 -0
- data/ext/third_party/asio/asio/src/doc/overview/async_op1.dot +78 -0
- data/ext/third_party/asio/asio/src/doc/overview/async_op1.png +0 -0
- data/ext/third_party/asio/asio/src/doc/overview/async_op2.dot +78 -0
- data/ext/third_party/asio/asio/src/doc/overview/async_op2.png +0 -0
- data/ext/third_party/asio/asio/src/doc/overview/basics.qbk +106 -0
- data/ext/third_party/asio/asio/src/doc/overview/bsd_sockets.qbk +270 -0
- data/ext/third_party/asio/asio/src/doc/overview/buffers.qbk +163 -0
- data/ext/third_party/asio/asio/src/doc/overview/concurrency_hint.qbk +88 -0
- data/ext/third_party/asio/asio/src/doc/overview/coroutine.qbk +51 -0
- data/ext/third_party/asio/asio/src/doc/overview/coroutines_ts.qbk +97 -0
- data/ext/third_party/asio/asio/src/doc/overview/cpp2011.qbk +271 -0
- data/ext/third_party/asio/asio/src/doc/overview/handler_tracking.qbk +220 -0
- data/ext/third_party/asio/asio/src/doc/overview/implementation.qbk +305 -0
- data/ext/third_party/asio/asio/src/doc/overview/iostreams.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/overview/line_based.qbk +118 -0
- data/ext/third_party/asio/asio/src/doc/overview/other_protocols.qbk +94 -0
- data/ext/third_party/asio/asio/src/doc/overview/posix.qbk +152 -0
- data/ext/third_party/asio/asio/src/doc/overview/proactor.dot +100 -0
- data/ext/third_party/asio/asio/src/doc/overview/proactor.png +0 -0
- data/ext/third_party/asio/asio/src/doc/overview/protocols.qbk +149 -0
- data/ext/third_party/asio/asio/src/doc/overview/rationale.qbk +54 -0
- data/ext/third_party/asio/asio/src/doc/overview/reactor.qbk +44 -0
- data/ext/third_party/asio/asio/src/doc/overview/serial_ports.qbk +45 -0
- data/ext/third_party/asio/asio/src/doc/overview/signals.qbk +44 -0
- data/ext/third_party/asio/asio/src/doc/overview/spawn.qbk +102 -0
- data/ext/third_party/asio/asio/src/doc/overview/ssl.qbk +124 -0
- data/ext/third_party/asio/asio/src/doc/overview/strands.qbk +114 -0
- data/ext/third_party/asio/asio/src/doc/overview/streams.qbk +62 -0
- data/ext/third_party/asio/asio/src/doc/overview/sync_op.dot +67 -0
- data/ext/third_party/asio/asio/src/doc/overview/sync_op.png +0 -0
- data/ext/third_party/asio/asio/src/doc/overview/threads.qbk +67 -0
- data/ext/third_party/asio/asio/src/doc/overview/timers.qbk +52 -0
- data/ext/third_party/asio/asio/src/doc/overview/windows.qbk +126 -0
- data/ext/third_party/asio/asio/src/doc/project-root.jam +1 -0
- data/ext/third_party/asio/asio/src/doc/quickref.xml +561 -0
- data/ext/third_party/asio/asio/src/doc/reference.dox +264 -0
- data/ext/third_party/asio/asio/src/doc/reference.qbk +125973 -0
- data/ext/third_party/asio/asio/src/doc/reference.xsl +1831 -0
- data/ext/third_party/asio/asio/src/doc/release_checklist.htm +68 -0
- data/ext/third_party/asio/asio/src/doc/requirements/AcceptHandler.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/requirements/AcceptableProtocol.qbk +25 -0
- data/ext/third_party/asio/asio/src/doc/requirements/AsyncRandomAccessReadDevice.qbk +56 -0
- data/ext/third_party/asio/asio/src/doc/requirements/AsyncRandomAccessWriteDevice.qbk +57 -0
- data/ext/third_party/asio/asio/src/doc/requirements/AsyncReadStream.qbk +50 -0
- data/ext/third_party/asio/asio/src/doc/requirements/AsyncWriteStream.qbk +48 -0
- data/ext/third_party/asio/asio/src/doc/requirements/BufferedHandshakeHandler.qbk +55 -0
- data/ext/third_party/asio/asio/src/doc/requirements/CompletionCondition.qbk +42 -0
- data/ext/third_party/asio/asio/src/doc/requirements/CompletionHandler.qbk +63 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ConnectCondition.qbk +34 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ConnectHandler.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ConstBufferSequence.qbk +53 -0
- data/ext/third_party/asio/asio/src/doc/requirements/DynamicBuffer.qbk +16 -0
- data/ext/third_party/asio/asio/src/doc/requirements/DynamicBuffer_v1.qbk +93 -0
- data/ext/third_party/asio/asio/src/doc/requirements/DynamicBuffer_v2.qbk +94 -0
- data/ext/third_party/asio/asio/src/doc/requirements/Endpoint.qbk +97 -0
- data/ext/third_party/asio/asio/src/doc/requirements/EndpointSequence.qbk +30 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ExecutionContext.qbk +36 -0
- data/ext/third_party/asio/asio/src/doc/requirements/Executor.qbk +141 -0
- data/ext/third_party/asio/asio/src/doc/requirements/GettableSerialPortOption.qbk +33 -0
- data/ext/third_party/asio/asio/src/doc/requirements/GettableSocketOption.qbk +67 -0
- data/ext/third_party/asio/asio/src/doc/requirements/Handler.qbk +64 -0
- data/ext/third_party/asio/asio/src/doc/requirements/HandshakeHandler.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/requirements/InternetProtocol.qbk +47 -0
- data/ext/third_party/asio/asio/src/doc/requirements/IoControlCommand.qbk +34 -0
- data/ext/third_party/asio/asio/src/doc/requirements/IoObjectService.qbk +62 -0
- data/ext/third_party/asio/asio/src/doc/requirements/IteratorConnectHandler.qbk +81 -0
- data/ext/third_party/asio/asio/src/doc/requirements/LegacyCompletionHandler.qbk +65 -0
- data/ext/third_party/asio/asio/src/doc/requirements/MoveAcceptHandler.qbk +61 -0
- data/ext/third_party/asio/asio/src/doc/requirements/MutableBufferSequence.qbk +54 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ProtoAllocator.qbk +19 -0
- data/ext/third_party/asio/asio/src/doc/requirements/Protocol.qbk +56 -0
- data/ext/third_party/asio/asio/src/doc/requirements/RangeConnectHandler.qbk +82 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ReadHandler.qbk +79 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ResolveHandler.qbk +82 -0
- data/ext/third_party/asio/asio/src/doc/requirements/Service.qbk +40 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SettableSerialPortOption.qbk +33 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SettableSocketOption.qbk +54 -0
- data/ext/third_party/asio/asio/src/doc/requirements/ShutdownHandler.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SignalHandler.qbk +79 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SyncRandomAccessReadDevice.qbk +49 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SyncRandomAccessWriteDevice.qbk +49 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SyncReadStream.qbk +41 -0
- data/ext/third_party/asio/asio/src/doc/requirements/SyncWriteStream.qbk +39 -0
- data/ext/third_party/asio/asio/src/doc/requirements/TimeTraits.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/requirements/WaitHandler.qbk +72 -0
- data/ext/third_party/asio/asio/src/doc/requirements/WaitTraits.qbk +52 -0
- data/ext/third_party/asio/asio/src/doc/requirements/WriteHandler.qbk +79 -0
- data/ext/third_party/asio/asio/src/doc/requirements/asynchronous_operations.qbk +300 -0
- data/ext/third_party/asio/asio/src/doc/requirements/asynchronous_socket_operations.qbk +39 -0
- data/ext/third_party/asio/asio/src/doc/requirements/read_write_operations.qbk +34 -0
- data/ext/third_party/asio/asio/src/doc/requirements/synchronous_socket_operations.qbk +37 -0
- data/ext/third_party/asio/asio/src/doc/std_exception_dox.txt +7 -0
- data/ext/third_party/asio/asio/src/doc/tutorial.dox +226 -0
- data/ext/third_party/asio/asio/src/doc/tutorial.qbk +2387 -0
- data/ext/third_party/asio/asio/src/doc/tutorial.xsl +437 -0
- data/ext/third_party/asio/asio/src/doc/using.qbk +309 -0
- data/ext/third_party/asio/asio/tsify.pl +574 -0
- data/ext/third_party/gsl/.clang-format +34 -0
- data/ext/third_party/gsl/.github/workflows/main.yml +94 -0
- data/ext/third_party/gsl/.gitignore +16 -0
- data/ext/third_party/gsl/.travis.yml +551 -0
- data/ext/third_party/gsl/CMakeLists.txt +119 -0
- data/ext/third_party/gsl/CMakeSettings.json +18 -0
- data/ext/third_party/gsl/CONTRIBUTING.md +29 -0
- data/ext/third_party/gsl/GSL.natvis +98 -0
- data/ext/third_party/gsl/LICENSE +21 -0
- data/ext/third_party/gsl/README.md +124 -0
- data/ext/third_party/gsl/ThirdPartyNotices.txt +41 -0
- data/ext/third_party/gsl/appveyor.yml +128 -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_util +171 -0
- data/ext/third_party/gsl/include/gsl/multi_span +2273 -0
- data/ext/third_party/gsl/include/gsl/pointers +301 -0
- data/ext/third_party/gsl/include/gsl/span +764 -0
- data/ext/third_party/gsl/include/gsl/span_ext +198 -0
- data/ext/third_party/gsl/include/gsl/string_span +716 -0
- data/ext/third_party/http_parser/.gitignore +30 -0
- data/ext/third_party/http_parser/.mailmap +8 -0
- data/ext/third_party/http_parser/.travis.yml +13 -0
- data/ext/third_party/http_parser/AUTHORS +68 -0
- data/ext/third_party/http_parser/LICENSE-MIT +19 -0
- data/ext/third_party/http_parser/README.md +246 -0
- data/ext/third_party/http_parser/bench.c +128 -0
- data/ext/third_party/http_parser/http_parser.c +2568 -0
- data/ext/third_party/http_parser/http_parser.gyp +111 -0
- data/ext/third_party/http_parser/http_parser.h +447 -0
- data/ext/third_party/http_parser/test.c +4600 -0
- data/ext/third_party/json/.appveyor.yml +44 -0
- data/ext/third_party/json/.clang-format +84 -0
- data/ext/third_party/json/.conan/build.py +80 -0
- data/ext/third_party/json/.conan/test_package/CMakeLists.txt +12 -0
- data/ext/third_party/json/.conan/test_package/conanfile.py +24 -0
- data/ext/third_party/json/.conan/test_package/test_package.cpp +16 -0
- data/ext/third_party/json/.gitignore +3 -0
- data/ext/third_party/json/.travis.yml +173 -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/README.md +149 -0
- data/ext/third_party/json/conanfile.py +28 -0
- data/ext/third_party/json/include/tao/json.hpp +45 -0
- data/ext/third_party/json/include/tao/json/basic_value.hpp +941 -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 +250 -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 +103 -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 +267 -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 +127 -0
- data/ext/third_party/json/include/tao/json/cbor.hpp +18 -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_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_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 +417 -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 +69 -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 +115 -0
- data/ext/third_party/json/include/tao/json/contrib/schema.hpp +1851 -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 +90 -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 +89 -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 +265 -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 +170 -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 +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/analyze_cycles.hpp +127 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/counted.hpp +23 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/generic.hpp +31 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/grammar_info.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/insert_guard.hpp +51 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/insert_rules.hpp +25 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/rule_info.hpp +29 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analysis/rule_type.hpp +21 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/analyze.hpp +21 -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 +51 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/ascii.hpp +67 -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/counter.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/http.hpp +253 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/internal.hpp +68 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/utf16.hpp +200 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/utf32.hpp +200 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/icu/utf8.hpp +105 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/if_then.hpp +55 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/integer.hpp +446 -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 +561 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/parse_tree_to_dot.hpp +104 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/raw_string.hpp +225 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/remove_first_state.hpp +86 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/rep_one_min_max.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/contrib/rep_string.hpp +44 -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/tracer.hpp +158 -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/cstream_input.hpp +33 -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 +44 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/action_input.hpp +107 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/alnum.hpp +18 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/alpha.hpp +18 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/always_false.hpp +21 -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 +50 -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 +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/bof.hpp +31 -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 +36 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/control.hpp +44 -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/demangle.hpp +140 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/disable.hpp +44 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/discard.hpp +33 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/dusel_mode.hpp +23 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/duseltronik.hpp +187 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/enable.hpp +44 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/endian.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/endian_gcc.hpp +206 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/endian_win.hpp +106 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/eof.hpp +31 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/eol.hpp +31 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/eolf.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_mapper_posix.hpp +83 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_mapper_win32.hpp +219 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_opener.hpp +72 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/file_reader.hpp +114 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_apply.hpp +25 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_apply0.hpp +25 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/has_match.hpp +56 -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 +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/if_must.hpp +48 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/if_must_else.hpp +19 -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 +40 -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 +52 -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 +20 -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 +82 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/missing_apply.hpp +25 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/missing_apply0.hpp +23 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/must.hpp +72 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/not_at.hpp +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/one.hpp +44 -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/peek_char.hpp +32 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_mask_uint.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_mask_uint8.hpp +34 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_uint.hpp +45 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_uint8.hpp +33 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_utf16.hpp +54 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_utf32.hpp +43 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/peek_utf8.hpp +90 -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 +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/raise.hpp +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/range.hpp +51 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/ranges.hpp +93 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/read_uint.hpp +77 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rematch.hpp +69 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rep.hpp +66 -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 +79 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/rep_opt.hpp +46 -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 +73 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/skip_control.hpp +25 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/sor.hpp +60 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/internal/star.hpp +47 -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 +49 -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/trivial.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 +84 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/istream_input.hpp +33 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/match.hpp +73 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/memory_input.hpp +381 -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/normal.hpp +87 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/nothing.hpp +20 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/parse.hpp +53 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/parse_error.hpp +69 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/position.hpp +75 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/read_input.hpp +74 -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 +67 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/string_input.hpp +66 -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/uint16.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/uint32.hpp +62 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/uint64.hpp +63 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/uint8.hpp +36 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/utf16.hpp +49 -0
- data/ext/third_party/json/include/tao/json/external/pegtl/utf32.hpp +49 -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/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/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 +59 -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 +113 -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 +256 -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 +263 -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 +18 -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_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_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 +249 -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 +494 -0
- data/ext/third_party/json/include/tao/json/parts_parser.hpp +306 -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 +143 -0
- data/ext/third_party/json/include/tao/json/span.hpp +568 -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 +18 -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_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_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 +413 -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/.appveyor.yml +36 -0
- data/ext/third_party/snappy/.gitignore +8 -0
- data/ext/third_party/snappy/.travis.yml +98 -0
- data/ext/third_party/snappy/AUTHORS +1 -0
- data/ext/third_party/snappy/CMakeLists.txt +345 -0
- data/ext/third_party/snappy/CONTRIBUTING.md +26 -0
- data/ext/third_party/snappy/COPYING +54 -0
- data/ext/third_party/snappy/NEWS +188 -0
- data/ext/third_party/snappy/README.md +148 -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/docs/README.md +72 -0
- data/ext/third_party/snappy/format_description.txt +110 -0
- data/ext/third_party/snappy/framing_format.txt +135 -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-test.cc +613 -0
- data/ext/third_party/snappy/snappy-test.h +526 -0
- data/ext/third_party/snappy/snappy.cc +1770 -0
- data/ext/third_party/snappy/snappy.h +209 -0
- data/ext/third_party/snappy/snappy_compress_fuzzer.cc +60 -0
- data/ext/third_party/snappy/snappy_uncompress_fuzzer.cc +58 -0
- data/ext/third_party/snappy/snappy_unittest.cc +1512 -0
- data/ext/third_party/spdlog/.clang-format +108 -0
- data/ext/third_party/spdlog/.clang-tidy +54 -0
- data/ext/third_party/spdlog/.gitattributes +1 -0
- data/ext/third_party/spdlog/.gitignore +83 -0
- data/ext/third_party/spdlog/.travis.yml +112 -0
- data/ext/third_party/spdlog/CMakeLists.txt +324 -0
- data/ext/third_party/spdlog/INSTALL +24 -0
- data/ext/third_party/spdlog/LICENSE +26 -0
- data/ext/third_party/spdlog/README.md +423 -0
- data/ext/third_party/spdlog/appveyor.yml +51 -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 +45 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/env.h +36 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/helpers-inl.h +103 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/helpers.h +28 -0
- data/ext/third_party/spdlog/include/spdlog/cfg/log_levels.h +47 -0
- data/ext/third_party/spdlog/include/spdlog/common-inl.h +76 -0
- data/ext/third_party/spdlog/include/spdlog/common.h +246 -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 +108 -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 +299 -0
- data/ext/third_party/spdlog/include/spdlog/details/registry.h +112 -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 +145 -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 +1119 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/color.h +568 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/compile.h +595 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/core.h +1789 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/format-inl.h +1403 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/format.h +3648 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/locale.h +78 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/ostream.h +143 -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 +721 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/bundled/ranges.h +387 -0
- data/ext/third_party/spdlog/include/spdlog/fmt/fmt.h +25 -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 +253 -0
- data/ext/third_party/spdlog/include/spdlog/logger.h +392 -0
- data/ext/third_party/spdlog/include/spdlog/pattern_formatter-inl.h +1358 -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 +72 -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 +94 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/stdout_sinks.h +80 -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 +180 -0
- data/ext/third_party/spdlog/include/spdlog/sinks/wincolor_sink.h +94 -0
- data/ext/third_party/spdlog/include/spdlog/spdlog-inl.h +115 -0
- data/ext/third_party/spdlog/include/spdlog/spdlog.h +340 -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 +189 -0
- data/ext/third_party/spdlog/src/spdlog.cpp +26 -0
- data/ext/third_party/spdlog/src/stdout_sinks.cpp +29 -0
- data/lib/couchbase.rb +13 -150
- data/lib/couchbase/analytics_options.rb +165 -0
- data/lib/couchbase/authenticator.rb +25 -0
- data/lib/couchbase/binary_collection.rb +89 -0
- data/lib/couchbase/binary_collection_options.rb +98 -0
- data/lib/couchbase/bucket.rb +102 -420
- data/lib/couchbase/cluster.rb +296 -97
- data/lib/couchbase/collection.rb +331 -0
- data/lib/couchbase/collection_options.rb +490 -0
- data/lib/couchbase/common_options.rb +29 -0
- data/lib/couchbase/errors.rb +224 -0
- data/lib/couchbase/json_transcoder.rb +32 -0
- data/lib/couchbase/management/analytics_index_manager.rb +433 -0
- data/lib/couchbase/management/bucket_manager.rb +252 -0
- data/lib/couchbase/management/collection_manager.rb +202 -0
- data/lib/couchbase/management/query_index_manager.rb +297 -0
- data/lib/couchbase/management/search_index_manager.rb +364 -0
- data/lib/couchbase/management/user_manager.rb +323 -0
- data/lib/couchbase/management/view_index_manager.rb +231 -0
- data/lib/couchbase/mutation_state.rb +50 -0
- data/lib/couchbase/query_options.rb +219 -0
- data/lib/couchbase/scope.rb +49 -0
- data/lib/couchbase/search_options.rb +1492 -0
- data/lib/couchbase/subdoc.rb +287 -0
- data/lib/couchbase/version.rb +12 -15
- data/lib/couchbase/view_options.rb +155 -0
- data/rbi/couchbase.rbi +79 -0
- metadata +1440 -243
- data/.travis.yml +0 -22
- data/CONTRIBUTING.markdown +0 -75
- data/LICENSE +0 -201
- data/Makefile +0 -3
- data/README.markdown +0 -592
- data/RELEASE_NOTES.markdown +0 -909
- data/examples/chat-em/Gemfile +0 -7
- data/examples/chat-em/README.markdown +0 -45
- data/examples/chat-em/server.rb +0 -82
- data/examples/chat-goliath-grape/Gemfile +0 -5
- data/examples/chat-goliath-grape/README.markdown +0 -50
- data/examples/chat-goliath-grape/app.rb +0 -67
- data/examples/chat-goliath-grape/config/app.rb +0 -20
- data/examples/transcoders/Gemfile +0 -3
- data/examples/transcoders/README.markdown +0 -59
- data/examples/transcoders/cb-zcat +0 -40
- data/examples/transcoders/cb-zcp +0 -45
- data/examples/transcoders/gzip_transcoder.rb +0 -49
- data/examples/transcoders/options.rb +0 -54
- data/ext/couchbase_ext/.gitignore +0 -4
- data/ext/couchbase_ext/arguments.c +0 -979
- data/ext/couchbase_ext/arithmetic.c +0 -316
- data/ext/couchbase_ext/bucket.c +0 -1436
- data/ext/couchbase_ext/context.c +0 -65
- data/ext/couchbase_ext/couchbase_ext.c +0 -1480
- data/ext/couchbase_ext/couchbase_ext.h +0 -678
- data/ext/couchbase_ext/delete.c +0 -163
- data/ext/couchbase_ext/eventmachine_plugin.c +0 -466
- data/ext/couchbase_ext/extconf.rb +0 -194
- data/ext/couchbase_ext/get.c +0 -316
- data/ext/couchbase_ext/gethrtime.c +0 -129
- data/ext/couchbase_ext/http.c +0 -432
- data/ext/couchbase_ext/multithread_plugin.c +0 -1085
- data/ext/couchbase_ext/n1ql.c +0 -117
- data/ext/couchbase_ext/observe.c +0 -171
- data/ext/couchbase_ext/result.c +0 -129
- data/ext/couchbase_ext/stats.c +0 -163
- data/ext/couchbase_ext/store.c +0 -542
- data/ext/couchbase_ext/timer.c +0 -192
- data/ext/couchbase_ext/touch.c +0 -186
- data/ext/couchbase_ext/unlock.c +0 -176
- data/ext/couchbase_ext/utils.c +0 -558
- data/ext/couchbase_ext/version.c +0 -142
- data/lib/action_dispatch/middleware/session/couchbase_store.rb +0 -38
- data/lib/active_support/cache/couchbase_store.rb +0 -430
- data/lib/couchbase/connection_pool.rb +0 -58
- data/lib/couchbase/constants.rb +0 -12
- data/lib/couchbase/dns.rb +0 -76
- data/lib/couchbase/result.rb +0 -26
- data/lib/couchbase/transcoder.rb +0 -120
- data/lib/couchbase/utils.rb +0 -62
- data/lib/couchbase/view.rb +0 -506
- data/lib/couchbase/view_row.rb +0 -272
- data/lib/ext/multi_json_fix.rb +0 -56
- data/lib/rack/session/couchbase.rb +0 -108
- data/tasks/benchmark.rake +0 -6
- data/tasks/compile.rake +0 -153
- data/tasks/test.rake +0 -100
- data/tasks/util.rake +0 -21
- data/test/profile/.gitignore +0 -1
- data/test/profile/Gemfile +0 -6
- data/test/profile/benchmark.rb +0 -195
- data/test/setup.rb +0 -178
- data/test/test_arithmetic.rb +0 -185
- data/test/test_async.rb +0 -316
- data/test/test_bucket.rb +0 -299
- data/test/test_cas.rb +0 -235
- data/test/test_couchbase.rb +0 -77
- data/test/test_couchbase_connection_pool.rb +0 -77
- data/test/test_couchbase_rails_cache_store.rb +0 -358
- data/test/test_delete.rb +0 -120
- data/test/test_errors.rb +0 -82
- data/test/test_eventmachine.rb +0 -78
- data/test/test_format.rb +0 -164
- data/test/test_get.rb +0 -407
- data/test/test_stats.rb +0 -57
- data/test/test_store.rb +0 -224
- data/test/test_timer.rb +0 -42
- data/test/test_touch.rb +0 -97
- data/test/test_unlock.rb +0 -119
- data/test/test_utils.rb +0 -58
- data/test/test_version.rb +0 -52
@@ -0,0 +1,50 @@
|
|
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
|
+
attr_accessor :tokens
|
34
|
+
|
35
|
+
# Create a mutation state from one or more MutationTokens
|
36
|
+
#
|
37
|
+
# @param [Array<MutationToken>] mutation_tokens the mutation tokens
|
38
|
+
def initialize(*mutation_tokens)
|
39
|
+
@tokens = []
|
40
|
+
add(*mutation_tokens)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Add one or more Mutation tokens to this state
|
44
|
+
#
|
45
|
+
# @param [Array<MutationToken>] mutation_tokens the mutation tokens
|
46
|
+
def add(*mutation_tokens)
|
47
|
+
@tokens |= mutation_tokens
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,219 @@
|
|
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
|
+
require 'json'
|
16
|
+
|
17
|
+
module Couchbase
|
18
|
+
class Cluster
|
19
|
+
|
20
|
+
class QueryOptions
|
21
|
+
# @return [Integer] Timeout in milliseconds
|
22
|
+
attr_accessor :timeout
|
23
|
+
|
24
|
+
# @return [Boolean] Allows turning this request into a prepared statement query
|
25
|
+
attr_accessor :adhoc
|
26
|
+
|
27
|
+
# @return [String] Provides a custom client context ID for this query
|
28
|
+
attr_accessor :client_context_id
|
29
|
+
|
30
|
+
# @return [Integer] Allows overriding the default maximum parallelism for the query execution on the server side.
|
31
|
+
attr_accessor :max_parallelism
|
32
|
+
|
33
|
+
# @return [Boolean] Allows explicitly marking a query as being readonly and not mutating and documents on the server side.
|
34
|
+
attr_accessor :readonly
|
35
|
+
|
36
|
+
# Allows customizing how long (in milliseconds) the query engine is willing to wait until the index catches up to whatever scan consistency is asked for in this query.
|
37
|
+
#
|
38
|
+
# @note that if +:not_bounded+ consistency level is used, this method doesn't do anything
|
39
|
+
# at all. If no value is provided to this method, the server default is used.
|
40
|
+
#
|
41
|
+
# @return [Integer] The maximum duration (in milliseconds) the query engine is willing to wait before failing.
|
42
|
+
attr_accessor :scan_wait
|
43
|
+
|
44
|
+
# @return [Integer] Supports customizing the maximum buffered channel size between the indexer and the query service
|
45
|
+
attr_accessor :scan_cap
|
46
|
+
|
47
|
+
# @return [Integer] Supports customizing the number of items execution operators can batch for fetch from the KV layer on the server.
|
48
|
+
attr_accessor :pipeline_batch
|
49
|
+
|
50
|
+
# @return [Integer] Allows customizing the maximum number of items each execution operator can buffer between various operators on the server.
|
51
|
+
attr_accessor :pipeline_cap
|
52
|
+
|
53
|
+
# @return [Boolean] Enables per-request metrics in the trailing section of the query
|
54
|
+
attr_accessor :metrics
|
55
|
+
|
56
|
+
# @return [:off, :phases, :timings] Customize server profile level for this query
|
57
|
+
attr_accessor :profile
|
58
|
+
|
59
|
+
# @yieldparam [QueryOptions] self
|
60
|
+
def initialize
|
61
|
+
@timeout = 75_000 # ms
|
62
|
+
@adhoc = true
|
63
|
+
@raw_parameters = {}
|
64
|
+
@positional_parameters = nil
|
65
|
+
@named_parameters = nil
|
66
|
+
@scan_consistency = nil
|
67
|
+
@mutation_state = nil
|
68
|
+
yield self if block_given?
|
69
|
+
end
|
70
|
+
|
71
|
+
# Allows providing custom JSON key/value pairs for advanced usage
|
72
|
+
#
|
73
|
+
# @param [String] key the parameter name (key of the JSON property)
|
74
|
+
# @param [Object] value the parameter value (value of the JSON property)
|
75
|
+
def raw(key, value)
|
76
|
+
@raw_parameters[key] = JSON.generate(value)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Customizes the consistency guarantees for this query
|
80
|
+
#
|
81
|
+
# @note overrides consistency level set by {#consistent_with}
|
82
|
+
#
|
83
|
+
# [+:not_bounded+] The indexer will return whatever state it has to the query engine at the time of query. This is the default (for single-statement requests).
|
84
|
+
#
|
85
|
+
# [+:request_plus+] The indexer will wait until all mutations have been processed at the time of request before returning to the query engine.
|
86
|
+
#
|
87
|
+
# @param [:not_bounded, :request_plus] level the index scan consistency to be used for this query
|
88
|
+
def scan_consistency=(level)
|
89
|
+
@mutation_state = nil if @mutation_state
|
90
|
+
@scan_consistency = level
|
91
|
+
end
|
92
|
+
|
93
|
+
# Sets the mutation tokens this query should be consistent with
|
94
|
+
#
|
95
|
+
# @note overrides consistency level set by {#scan_consistency=}
|
96
|
+
#
|
97
|
+
# @param [MutationState] mutation_state the mutation state containing the mutation tokens
|
98
|
+
def consistent_with(mutation_state)
|
99
|
+
@scan_consistency = nil if @scan_consistency
|
100
|
+
@mutation_state = mutation_state
|
101
|
+
end
|
102
|
+
|
103
|
+
# Sets positional parameters for the query
|
104
|
+
#
|
105
|
+
# @param [Array] positional the list of parameters that have to be substituted in the statement
|
106
|
+
def positional_parameters(positional)
|
107
|
+
@positional_parameters = positional
|
108
|
+
@named_parameters = nil
|
109
|
+
end
|
110
|
+
|
111
|
+
# Sets named parameters for the query
|
112
|
+
#
|
113
|
+
# @param [Hash] named the key/value map of the parameters to substitute in the statement
|
114
|
+
def named_parameters(named)
|
115
|
+
@named_parameters = named
|
116
|
+
@positional_parameters = nil
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
class QueryResult
|
121
|
+
# @return [QueryMetaData] returns object representing additional metadata associated with this query
|
122
|
+
attr_accessor :meta_data
|
123
|
+
|
124
|
+
attr_accessor :transcoder
|
125
|
+
|
126
|
+
# Returns all rows converted using a transcoder
|
127
|
+
#
|
128
|
+
# @return [Array]
|
129
|
+
def rows(transcoder = self.transcoder)
|
130
|
+
@rows.lazy.map do |row|
|
131
|
+
if transcoder == :json
|
132
|
+
JSON.parse(row)
|
133
|
+
else
|
134
|
+
transcoder.call(row)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# @yieldparam [QueryResult] self
|
140
|
+
def initialize
|
141
|
+
yield self if block_given?
|
142
|
+
@transcoder = :json
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
class QueryMetaData
|
147
|
+
# @return [String] returns the request identifier string of the query request
|
148
|
+
attr_accessor :request_id
|
149
|
+
|
150
|
+
# @return [String] returns the client context identifier string set of the query request
|
151
|
+
attr_accessor :client_context_id
|
152
|
+
|
153
|
+
# @return [Symbol] returns raw query execution status as returned by the query engine
|
154
|
+
attr_accessor :status
|
155
|
+
|
156
|
+
# @return [Hash] returns the signature as returned by the query engine which is then decoded as JSON object
|
157
|
+
attr_accessor :signature
|
158
|
+
|
159
|
+
# @return [Hash] returns the profiling information returned by the query engine which is then decoded as JSON object
|
160
|
+
attr_accessor :profile
|
161
|
+
|
162
|
+
# @return [QueryMetrics] metrics as returned by the query engine, if enabled
|
163
|
+
attr_accessor :metrics
|
164
|
+
|
165
|
+
# @return [List<QueryWarning>] list of warnings returned by the query engine
|
166
|
+
attr_accessor :warnings
|
167
|
+
|
168
|
+
# @yieldparam [QueryMetaData] self
|
169
|
+
def initialize
|
170
|
+
yield self if block_given?
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
class QueryMetrics
|
175
|
+
# @return [Integer] The total time taken for the request, that is the time from when the request was received until the results were returned
|
176
|
+
attr_accessor :elapsed_time
|
177
|
+
|
178
|
+
# @return [Integer] The time taken for the execution of the request, that is the time from when query execution started until the results were returned
|
179
|
+
attr_accessor :execution_time
|
180
|
+
|
181
|
+
# @return [Integer] the total number of results selected by the engine before restriction through LIMIT clause.
|
182
|
+
attr_accessor :sort_count
|
183
|
+
|
184
|
+
# @return [Integer] The total number of objects in the results.
|
185
|
+
attr_accessor :result_count
|
186
|
+
|
187
|
+
# @return [Integer] The total number of bytes in the results.
|
188
|
+
attr_accessor :result_size
|
189
|
+
|
190
|
+
# @return [Integer] The number of mutations that were made during the request.
|
191
|
+
attr_accessor :mutation_count
|
192
|
+
|
193
|
+
# @return [Integer] The number of errors that occurred during the request.
|
194
|
+
attr_accessor :error_count
|
195
|
+
|
196
|
+
# @return [Integer] The number of warnings that occurred during the request.
|
197
|
+
attr_accessor :warning_count
|
198
|
+
|
199
|
+
# @yieldparam [QueryMetrics] self
|
200
|
+
def initialize
|
201
|
+
yield self if block_given?
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# Represents a single warning returned from the query engine.
|
206
|
+
class QueryWarning
|
207
|
+
# @return [Integer]
|
208
|
+
attr_accessor :code
|
209
|
+
|
210
|
+
# @return [String]
|
211
|
+
attr_accessor :message
|
212
|
+
|
213
|
+
def initialize(code, message)
|
214
|
+
@code = code
|
215
|
+
@message = message
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,49 @@
|
|
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
|
+
require "couchbase/collection"
|
16
|
+
|
17
|
+
module Couchbase
|
18
|
+
class Scope
|
19
|
+
attr_reader :bucket_name
|
20
|
+
attr_reader :name
|
21
|
+
|
22
|
+
alias_method :inspect, :to_s
|
23
|
+
|
24
|
+
# @param [Couchbase::Backend] backend
|
25
|
+
# @param [String] bucket_name name of the bucket
|
26
|
+
# @param [String, :_default] scope_name name of the scope
|
27
|
+
def initialize(backend, bucket_name, scope_name)
|
28
|
+
@backend = backend
|
29
|
+
@bucket_name = bucket_name
|
30
|
+
@name = scope_name
|
31
|
+
end
|
32
|
+
|
33
|
+
# Opens the default collection for this scope
|
34
|
+
#
|
35
|
+
# @return [Collection]
|
36
|
+
def default_collection
|
37
|
+
Collection.new(@backend, @bucket_name, @name, :_default)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Opens the default collection for this scope
|
41
|
+
#
|
42
|
+
# @param [String] collection_name name of the collection
|
43
|
+
#
|
44
|
+
# @return [Collection]
|
45
|
+
def collection(collection_name)
|
46
|
+
Collection.new(@backend, @bucket_name, @name, collection_name)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,1492 @@
|
|
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 Cluster
|
17
|
+
class SearchQuery
|
18
|
+
# Prepare {MatchQuery} body
|
19
|
+
#
|
20
|
+
# @param [String] match
|
21
|
+
# @yieldparam [MatchQuery] query
|
22
|
+
#
|
23
|
+
# @return [MatchQuery]
|
24
|
+
def self.match(match, &block)
|
25
|
+
MatchQuery.new(match, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
# A match query analyzes the input text and uses that analyzed text to query the index.
|
29
|
+
class MatchQuery < SearchQuery
|
30
|
+
# @return [Float]
|
31
|
+
attr_accessor :boost
|
32
|
+
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :field
|
35
|
+
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :analyzer
|
38
|
+
|
39
|
+
# @return [Integer]
|
40
|
+
attr_accessor :prefix_length
|
41
|
+
|
42
|
+
# @return [Integer]
|
43
|
+
attr_accessor :fuzziness
|
44
|
+
|
45
|
+
# @param [String] match
|
46
|
+
# @yieldparam [MatchQuery] self
|
47
|
+
def initialize(match)
|
48
|
+
super()
|
49
|
+
@match = match
|
50
|
+
yield self if block_given?
|
51
|
+
end
|
52
|
+
|
53
|
+
# @return [String]
|
54
|
+
def to_json(*args)
|
55
|
+
data = {"match" => @match}
|
56
|
+
data["boost"] = boost if boost
|
57
|
+
data["field"] = field if field
|
58
|
+
data["analyzer"] = analyzer if analyzer
|
59
|
+
if fuzziness
|
60
|
+
data["fuzziness"] = fuzziness
|
61
|
+
data["prefix_length"] = prefix_length if prefix_length
|
62
|
+
end
|
63
|
+
data.to_json(*args)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Prepare {MatchPhraseQuery} body
|
68
|
+
#
|
69
|
+
# @param [String] match_phrase
|
70
|
+
# @yieldparam [MatchPhraseQuery] query
|
71
|
+
#
|
72
|
+
# @return [MatchPhraseQuery]
|
73
|
+
def self.match_phrase(match_phrase, &block)
|
74
|
+
MatchPhraseQuery.new(match_phrase, &block)
|
75
|
+
end
|
76
|
+
|
77
|
+
# The input text is analyzed and a phrase query is built with the terms resulting from the analysis.
|
78
|
+
class MatchPhraseQuery < SearchQuery
|
79
|
+
# @return [Float]
|
80
|
+
attr_accessor :boost
|
81
|
+
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :field
|
84
|
+
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :analyzer
|
87
|
+
|
88
|
+
# @param [String] match_phrase
|
89
|
+
#
|
90
|
+
# @yieldparam [MatchPhraseQuery] self
|
91
|
+
def initialize(match_phrase)
|
92
|
+
super()
|
93
|
+
@match_phrase = match_phrase
|
94
|
+
yield self if block_given?
|
95
|
+
end
|
96
|
+
|
97
|
+
# @return [String]
|
98
|
+
def to_json(*args)
|
99
|
+
data = {"match_phrase" => @match_phrase}
|
100
|
+
data["boost"] = boost if boost
|
101
|
+
data["field"] = field if field
|
102
|
+
data["analyzer"] = analyzer if analyzer
|
103
|
+
data.to_json(*args)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# Prepare {RegexpQuery} body
|
108
|
+
#
|
109
|
+
# @param [String] regexp
|
110
|
+
# @yieldparam [RegexpQuery] query
|
111
|
+
#
|
112
|
+
# @return [RegexpQuery]
|
113
|
+
def self.regexp(regexp, &block)
|
114
|
+
RegexpQuery.new(regexp, &block)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Finds documents containing terms that match the specified regular expression.
|
118
|
+
class RegexpQuery < SearchQuery
|
119
|
+
# @return [Float]
|
120
|
+
attr_accessor :boost
|
121
|
+
|
122
|
+
# @return [String]
|
123
|
+
attr_accessor :field
|
124
|
+
|
125
|
+
# @param [String] regexp
|
126
|
+
#
|
127
|
+
# @yieldparam [RegexpQuery] self
|
128
|
+
def initialize(regexp)
|
129
|
+
super()
|
130
|
+
@regexp = regexp
|
131
|
+
yield self if block_given?
|
132
|
+
end
|
133
|
+
|
134
|
+
# @return [String]
|
135
|
+
def to_json(*args)
|
136
|
+
data = {"regexp" => @regexp}
|
137
|
+
data["boost"] = boost if boost
|
138
|
+
data["field"] = field if field
|
139
|
+
data.to_json(*args)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# Prepare {QueryStringQuery} body
|
144
|
+
#
|
145
|
+
# @param [String] query_string
|
146
|
+
# @yieldparam [QueryStringQuery] query
|
147
|
+
#
|
148
|
+
# @return [QueryStringQuery]
|
149
|
+
def self.query_string(query_string, &block)
|
150
|
+
QueryStringQuery.new(query_string, &block)
|
151
|
+
end
|
152
|
+
|
153
|
+
# The query string query allows humans to describe complex queries using a simple syntax.
|
154
|
+
class QueryStringQuery < SearchQuery
|
155
|
+
# @return [Float]
|
156
|
+
attr_accessor :boost
|
157
|
+
|
158
|
+
# @param [String] query_string
|
159
|
+
#
|
160
|
+
# @yieldparam [QueryStringQuery] self
|
161
|
+
def initialize(query_string)
|
162
|
+
super()
|
163
|
+
@query_string = query_string
|
164
|
+
yield self if block_given?
|
165
|
+
end
|
166
|
+
|
167
|
+
# @return [String]
|
168
|
+
def to_json(*args)
|
169
|
+
data = {"query" => @query_string}
|
170
|
+
data["boost"] = boost if boost
|
171
|
+
data.to_json(*args)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Prepare {WildcardQuery} body
|
176
|
+
#
|
177
|
+
# @param [String] wildcard
|
178
|
+
# @yieldparam [WildcardQuery] query
|
179
|
+
#
|
180
|
+
# @return [WildcardQuery]
|
181
|
+
def self.wildcard(wildcard, &block)
|
182
|
+
WildcardQuery.new(wildcard, &block)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Interprets * and ? wildcards as found in a lot of applications, for an easy implementation of such a search feature.
|
186
|
+
class WildcardQuery < SearchQuery
|
187
|
+
# @return [Float]
|
188
|
+
attr_accessor :boost
|
189
|
+
|
190
|
+
# @return [String]
|
191
|
+
attr_accessor :field
|
192
|
+
|
193
|
+
# @param [String] wildcard
|
194
|
+
#
|
195
|
+
# @yieldparam [WildcardQuery] self
|
196
|
+
def initialize(wildcard)
|
197
|
+
super()
|
198
|
+
@wildcard = wildcard
|
199
|
+
yield self if block_given?
|
200
|
+
end
|
201
|
+
|
202
|
+
# @return [String]
|
203
|
+
def to_json(*args)
|
204
|
+
data = {"wildcard" => @wildcard}
|
205
|
+
data["boost"] = boost if boost
|
206
|
+
data["field"] = field if field
|
207
|
+
data.to_json(*args)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Prepare {DocIdQuery} body
|
212
|
+
#
|
213
|
+
# @param [String...] doc_ids
|
214
|
+
# @yieldparam [DocIdQuery] query
|
215
|
+
#
|
216
|
+
# @return [DocIdQuery]
|
217
|
+
def self.doc_id(*doc_ids)
|
218
|
+
DocIdQuery.new(*doc_ids)
|
219
|
+
end
|
220
|
+
|
221
|
+
# Allows to restrict matches to a set of specific documents.
|
222
|
+
class DocIdQuery < SearchQuery
|
223
|
+
# @return [Float]
|
224
|
+
attr_accessor :boost
|
225
|
+
|
226
|
+
# @return [String]
|
227
|
+
attr_accessor :field
|
228
|
+
|
229
|
+
# @param [String...] doc_ids
|
230
|
+
#
|
231
|
+
# @yieldparam [DocIdQuery] self
|
232
|
+
def initialize(*doc_ids)
|
233
|
+
super()
|
234
|
+
@doc_ids = doc_ids
|
235
|
+
yield self if block_given?
|
236
|
+
end
|
237
|
+
|
238
|
+
# @return [String]
|
239
|
+
def to_json(*args)
|
240
|
+
data = {"doc_ids" => @doc_ids.flatten.uniq}
|
241
|
+
data["boost"] = boost if boost
|
242
|
+
data["field"] = field if field
|
243
|
+
data.to_json(*args)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
# Prepare {BooleanFieldQuery} body
|
248
|
+
#
|
249
|
+
# @param [Boolean] value
|
250
|
+
# @yieldparam [BooleanFieldQuery] query
|
251
|
+
#
|
252
|
+
# @return [BooleanFieldQuery]
|
253
|
+
def self.boolean_field(value)
|
254
|
+
BooleanFieldQuery.new(value)
|
255
|
+
end
|
256
|
+
|
257
|
+
# Allow to match `true`/`false` in a field mapped as boolean.
|
258
|
+
class BooleanFieldQuery < SearchQuery
|
259
|
+
# @return [Float]
|
260
|
+
attr_accessor :boost
|
261
|
+
|
262
|
+
# @return [String]
|
263
|
+
attr_accessor :field
|
264
|
+
|
265
|
+
# @param [Boolean] value
|
266
|
+
#
|
267
|
+
# @yieldparam [BooleanFieldQuery] self
|
268
|
+
def initialize(value)
|
269
|
+
super()
|
270
|
+
@value = value
|
271
|
+
yield self if block_given?
|
272
|
+
end
|
273
|
+
|
274
|
+
# @return [String]
|
275
|
+
def to_json(*args)
|
276
|
+
data = {"bool" => @value}
|
277
|
+
data["boost"] = boost if boost
|
278
|
+
data["field"] = field if field
|
279
|
+
data.to_json(*args)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Prepare {DateRangeQuery} body
|
284
|
+
#
|
285
|
+
# @yieldparam [DateRangeQuery] query
|
286
|
+
#
|
287
|
+
# @return [DateRangeQuery]
|
288
|
+
def self.date_range(&block)
|
289
|
+
DateRangeQuery.new(&block)
|
290
|
+
end
|
291
|
+
|
292
|
+
# The date range query finds documents containing a date value in the specified field within the specified range.
|
293
|
+
class DateRangeQuery < SearchQuery
|
294
|
+
# @return [Float]
|
295
|
+
attr_accessor :boost
|
296
|
+
|
297
|
+
# @return [String]
|
298
|
+
attr_accessor :field
|
299
|
+
|
300
|
+
# @return [String]
|
301
|
+
attr_accessor :date_time_parser
|
302
|
+
|
303
|
+
# Sets the lower boundary of the range.
|
304
|
+
#
|
305
|
+
# @note The lower boundary is considered inclusive by default on the server side.
|
306
|
+
#
|
307
|
+
# @param [Time, String] time_point start time. When +Time+ object is passed {#date_time_parser} must be +nil+ (to use server default)
|
308
|
+
# @param [Boolean] inclusive
|
309
|
+
def start_time(time_point, inclusive = nil)
|
310
|
+
@start_time = time_point
|
311
|
+
@start_inclusive = inclusive
|
312
|
+
end
|
313
|
+
|
314
|
+
# Sets the upper boundary of the range.
|
315
|
+
#
|
316
|
+
# @note The upper boundary is considered exclusive by default on the server side.
|
317
|
+
#
|
318
|
+
# @param [Time, String] time_point end time. When +Time+ object is passed {#date_time_parser} must be +nil+ (to use server default)
|
319
|
+
# @param [Boolean] inclusive
|
320
|
+
def end_time(time_point, inclusive = nil)
|
321
|
+
@end_time = time_point
|
322
|
+
@end_inclusive = inclusive
|
323
|
+
end
|
324
|
+
|
325
|
+
# @yieldparam [DateRangeQuery] self
|
326
|
+
def initialize
|
327
|
+
super
|
328
|
+
@start_time = nil
|
329
|
+
@start_inclusive = nil
|
330
|
+
@end_time = nil
|
331
|
+
@end_inclusive = nil
|
332
|
+
yield self if block_given?
|
333
|
+
end
|
334
|
+
|
335
|
+
DATE_FORMAT_RFC3339 = "%Y-%m-%dT%H:%M:%S%:z"
|
336
|
+
|
337
|
+
# @return [String]
|
338
|
+
def to_json(*args)
|
339
|
+
if @start_time.nil? && @end_time.nil?
|
340
|
+
raise ArgumentError, "either start_time or end_time must be set for DateRangeQuery"
|
341
|
+
end
|
342
|
+
|
343
|
+
data = {}
|
344
|
+
data["boost"] = boost if boost
|
345
|
+
data["field"] = field if field
|
346
|
+
data["datetime_parser"] = date_time_parser if date_time_parser
|
347
|
+
if @start_time
|
348
|
+
data["start"] = if @start_time.respond_to?(:strftime)
|
349
|
+
@start_time.strftime(DATE_FORMAT_RFC3339)
|
350
|
+
else
|
351
|
+
@start_time
|
352
|
+
end
|
353
|
+
data["inclusive_start"] = @start_inclusive unless @start_inclusive.nil?
|
354
|
+
end
|
355
|
+
if @end_time
|
356
|
+
data["end"] = if @end_time.respond_to?(:strftime)
|
357
|
+
@end_time.strftime(DATE_FORMAT_RFC3339)
|
358
|
+
else
|
359
|
+
@end_time
|
360
|
+
end
|
361
|
+
data["inclusive_end"] = @end_inclusive unless @end_inclusive.nil?
|
362
|
+
end
|
363
|
+
data.to_json(*args)
|
364
|
+
end
|
365
|
+
end
|
366
|
+
|
367
|
+
# Prepare {NumericRangeQuery} body
|
368
|
+
#
|
369
|
+
# @yieldparam [NumericRangeQuery] query
|
370
|
+
#
|
371
|
+
# @return [NumericRangeQuery]
|
372
|
+
def self.numeric_range(&block)
|
373
|
+
NumericRangeQuery.new(&block)
|
374
|
+
end
|
375
|
+
|
376
|
+
# The numeric range query finds documents containing a numeric value in the specified field within the specified range.
|
377
|
+
class NumericRangeQuery < SearchQuery
|
378
|
+
# @return [Float]
|
379
|
+
attr_accessor :boost
|
380
|
+
|
381
|
+
# @return [String]
|
382
|
+
attr_accessor :field
|
383
|
+
|
384
|
+
# Sets lower bound of the range.
|
385
|
+
#
|
386
|
+
# The lower boundary is considered inclusive by default on the server side.
|
387
|
+
#
|
388
|
+
# @param [Numeric] lower_bound
|
389
|
+
# @param [Boolean] inclusive
|
390
|
+
def min(lower_bound, inclusive = nil)
|
391
|
+
@min = lower_bound
|
392
|
+
@min_inclusive = inclusive
|
393
|
+
end
|
394
|
+
|
395
|
+
# Sets upper bound of the range.
|
396
|
+
#
|
397
|
+
# The upper boundary is considered exclusive by default on the server side.
|
398
|
+
#
|
399
|
+
# @param [Numeric] upper_bound
|
400
|
+
# @param [Boolean] inclusive
|
401
|
+
def max(upper_bound, inclusive = nil)
|
402
|
+
@max = upper_bound
|
403
|
+
@max_inclusive = inclusive
|
404
|
+
end
|
405
|
+
|
406
|
+
# @yieldparam [NumericRangeQuery] self
|
407
|
+
def initialize
|
408
|
+
super
|
409
|
+
@min = nil
|
410
|
+
@min_inclusive = nil
|
411
|
+
@max = nil
|
412
|
+
@max_inclusive = nil
|
413
|
+
yield self if block_given?
|
414
|
+
end
|
415
|
+
|
416
|
+
# @return [String]
|
417
|
+
def to_json(*args)
|
418
|
+
if @min.nil? && @max.nil?
|
419
|
+
raise ArgumentError, "either min or max must be set for NumericRangeQuery"
|
420
|
+
end
|
421
|
+
|
422
|
+
data = {}
|
423
|
+
data["boost"] = boost if boost
|
424
|
+
data["field"] = field if field
|
425
|
+
if @min
|
426
|
+
data["min"] = @min
|
427
|
+
data["inclusive_min"] = @min_inclusive unless @min_inclusive.nil?
|
428
|
+
end
|
429
|
+
if @max
|
430
|
+
data["max"] = @max
|
431
|
+
data["inclusive_max"] = @max_inclusive unless @max_inclusive.nil?
|
432
|
+
end
|
433
|
+
data.to_json(*args)
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
# Prepare {TermRangeQuery} body
|
438
|
+
#
|
439
|
+
# @yieldparam [TermRangeQuery] query
|
440
|
+
#
|
441
|
+
# @return [TermRangeQuery]
|
442
|
+
def self.term_range(&block)
|
443
|
+
TermRangeQuery.new(&block)
|
444
|
+
end
|
445
|
+
|
446
|
+
# The term range query finds documents containing a string value in the specified field within the specified range.
|
447
|
+
class TermRangeQuery < SearchQuery
|
448
|
+
# @return [Float]
|
449
|
+
attr_accessor :boost
|
450
|
+
|
451
|
+
# @return [String]
|
452
|
+
attr_accessor :field
|
453
|
+
|
454
|
+
# Sets lower bound of the range.
|
455
|
+
#
|
456
|
+
# The lower boundary is considered inclusive by default on the server side.
|
457
|
+
#
|
458
|
+
# @param [String] lower_bound
|
459
|
+
# @param [Boolean] inclusive
|
460
|
+
def min(lower_bound, inclusive = nil)
|
461
|
+
@min = lower_bound
|
462
|
+
@min_inclusive = inclusive
|
463
|
+
end
|
464
|
+
|
465
|
+
# Sets upper bound of the range.
|
466
|
+
#
|
467
|
+
# The upper boundary is considered exclusive by default on the server side.
|
468
|
+
#
|
469
|
+
# @param [String] upper_bound
|
470
|
+
# @param [Boolean] inclusive
|
471
|
+
def max(upper_bound, inclusive = nil)
|
472
|
+
@max = upper_bound
|
473
|
+
@max_inclusive = inclusive
|
474
|
+
end
|
475
|
+
|
476
|
+
# @yieldparam [TermRangeQuery] self
|
477
|
+
def initialize
|
478
|
+
super
|
479
|
+
@min = nil
|
480
|
+
@min_inclusive = nil
|
481
|
+
@max = nil
|
482
|
+
@max_inclusive = nil
|
483
|
+
yield self if block_given?
|
484
|
+
end
|
485
|
+
|
486
|
+
# @return [String]
|
487
|
+
def to_json(*args)
|
488
|
+
if @min.nil? && @max.nil?
|
489
|
+
raise ArgumentError, "either min or max must be set for TermRangeQuery"
|
490
|
+
end
|
491
|
+
|
492
|
+
data = {}
|
493
|
+
data["boost"] = boost if boost
|
494
|
+
data["field"] = field if field
|
495
|
+
if @min
|
496
|
+
data["min"] = @min
|
497
|
+
data["inclusive_min"] = @min_inclusive unless @min_inclusive.nil?
|
498
|
+
end
|
499
|
+
if @max
|
500
|
+
data["max"] = @max
|
501
|
+
data["inclusive_max"] = @max_inclusive unless @max_inclusive.nil?
|
502
|
+
end
|
503
|
+
data.to_json(*args)
|
504
|
+
end
|
505
|
+
end
|
506
|
+
|
507
|
+
# Prepare {GeoDistanceQuery} body
|
508
|
+
#
|
509
|
+
# @yieldparam [GeoDistanceQuery] query
|
510
|
+
#
|
511
|
+
# @param [Float] latitude location latitude
|
512
|
+
# @param [Float] longitude location longitude
|
513
|
+
# @param [String] distance how big is area (number with units)
|
514
|
+
#
|
515
|
+
# @return [GeoDistanceQuery]
|
516
|
+
def self.geo_distance(longitude, latitude, distance, &block)
|
517
|
+
GeoDistanceQuery.new(longitude, latitude, distance, &block)
|
518
|
+
end
|
519
|
+
|
520
|
+
# Finds `geopoint` indexed matches around a point with the given distance.
|
521
|
+
class GeoDistanceQuery < SearchQuery
|
522
|
+
# @return [Float]
|
523
|
+
attr_accessor :boost
|
524
|
+
|
525
|
+
# @return [String]
|
526
|
+
attr_accessor :field
|
527
|
+
|
528
|
+
# @yieldparam [GeoDistanceQuery] self
|
529
|
+
# @param [Float] longitude
|
530
|
+
# @param [Float] latitude
|
531
|
+
# @param [Float] distance
|
532
|
+
def initialize(longitude, latitude, distance)
|
533
|
+
super()
|
534
|
+
@longitude = longitude
|
535
|
+
@latitude = latitude
|
536
|
+
@distance = distance
|
537
|
+
yield self if block_given?
|
538
|
+
end
|
539
|
+
|
540
|
+
# @return [String]
|
541
|
+
def to_json(*args)
|
542
|
+
data = {
|
543
|
+
"location" => [@longitude, @latitude],
|
544
|
+
"distance" => @distance
|
545
|
+
}
|
546
|
+
data["boost"] = boost if boost
|
547
|
+
data["field"] = field if field
|
548
|
+
data.to_json(*args)
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
# Prepare {GeoBoundingBoxQuery} body
|
553
|
+
#
|
554
|
+
# @yieldparam [GeoDistanceQuery] query
|
555
|
+
#
|
556
|
+
# @param [Float] top_left_longitude
|
557
|
+
# @param [Float] top_left_latitude
|
558
|
+
# @param [Float] bottom_right_longitude
|
559
|
+
# @param [Float] bottom_right_latitude
|
560
|
+
#
|
561
|
+
# @return [GeoBoundingBoxQuery]
|
562
|
+
def self.geo_bounding_box(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude, &block)
|
563
|
+
GeoBoundingBoxQuery.new(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude, &block)
|
564
|
+
end
|
565
|
+
|
566
|
+
# Finds `geopoint` indexed matches in a given bounding box.
|
567
|
+
class GeoBoundingBoxQuery < SearchQuery
|
568
|
+
# @return [Float]
|
569
|
+
attr_accessor :boost
|
570
|
+
|
571
|
+
# @return [String]
|
572
|
+
attr_accessor :field
|
573
|
+
|
574
|
+
# @yieldparam [GeoBoundingBoxQuery] self
|
575
|
+
#
|
576
|
+
# @param [Float] top_left_longitude
|
577
|
+
# @param [Float] top_left_latitude
|
578
|
+
# @param [Float] bottom_right_longitude
|
579
|
+
# @param [Float] bottom_right_latitude
|
580
|
+
def initialize(top_left_longitude, top_left_latitude, bottom_right_longitude, bottom_right_latitude)
|
581
|
+
super()
|
582
|
+
@top_left_longitude = top_left_longitude
|
583
|
+
@top_left_latitude = top_left_latitude
|
584
|
+
@bottom_right_longitude = bottom_right_longitude
|
585
|
+
@bottom_right_latitude = bottom_right_latitude
|
586
|
+
yield self if block_given?
|
587
|
+
end
|
588
|
+
|
589
|
+
# @return [String]
|
590
|
+
def to_json(*args)
|
591
|
+
data = {
|
592
|
+
"top_left" => [@top_left_longitude, @top_left_latitude],
|
593
|
+
"bottom_right" => [@bottom_right_longitude, @bottom_right_latitude]
|
594
|
+
}
|
595
|
+
data["boost"] = boost if boost
|
596
|
+
data["field"] = field if field
|
597
|
+
data.to_json(*args)
|
598
|
+
end
|
599
|
+
end
|
600
|
+
|
601
|
+
# Prepare {ConjunctionQuery} body
|
602
|
+
#
|
603
|
+
# @yieldparam [ConjunctionQuery] query
|
604
|
+
#
|
605
|
+
# @return [ConjunctionQuery]
|
606
|
+
def self.conjuncts(*queries, &block)
|
607
|
+
ConjunctionQuery.new(*queries, &block)
|
608
|
+
end
|
609
|
+
|
610
|
+
# Result documents must satisfy all of the child queries.
|
611
|
+
class ConjunctionQuery < SearchQuery
|
612
|
+
# @return [Float]
|
613
|
+
attr_accessor :boost
|
614
|
+
|
615
|
+
# @yieldparam [ConjunctionQuery] self
|
616
|
+
#
|
617
|
+
# @param [*SearchQuery] queries
|
618
|
+
def initialize(*queries)
|
619
|
+
super()
|
620
|
+
@queries = queries.flatten
|
621
|
+
yield self if block_given?
|
622
|
+
end
|
623
|
+
|
624
|
+
# @param [*SearchQuery] queries
|
625
|
+
def and_also(*queries)
|
626
|
+
@queries |= queries.flatten
|
627
|
+
end
|
628
|
+
|
629
|
+
def empty?
|
630
|
+
@queries.empty?
|
631
|
+
end
|
632
|
+
|
633
|
+
# @return [String]
|
634
|
+
def to_json(*args)
|
635
|
+
raise ArgumentError, "compound conjunction query must have sub-queries" if @queries.nil? || @queries.empty?
|
636
|
+
data = {"conjuncts" => @queries.uniq}
|
637
|
+
data["boost"] = boost if boost
|
638
|
+
data.to_json(*args)
|
639
|
+
end
|
640
|
+
end
|
641
|
+
|
642
|
+
# Prepare {ConjunctionQuery} body
|
643
|
+
#
|
644
|
+
# @yieldparam [ConjunctionQuery] query
|
645
|
+
#
|
646
|
+
# @return [ConjunctionQuery]
|
647
|
+
def self.disjuncts(*queries, &block)
|
648
|
+
DisjunctionQuery.new(*queries, &block)
|
649
|
+
end
|
650
|
+
|
651
|
+
# Result documents must satisfy a configurable min number of child queries.
|
652
|
+
class DisjunctionQuery < SearchQuery
|
653
|
+
# @return [Float]
|
654
|
+
attr_accessor :boost
|
655
|
+
|
656
|
+
# @return [Integer]
|
657
|
+
attr_accessor :min
|
658
|
+
|
659
|
+
# @yieldparam [DisjunctionQuery] self
|
660
|
+
#
|
661
|
+
# @param [*SearchQuery] queries
|
662
|
+
def initialize(*queries)
|
663
|
+
super()
|
664
|
+
@queries = queries.flatten
|
665
|
+
yield self if block_given?
|
666
|
+
end
|
667
|
+
|
668
|
+
# @param [*SearchQuery] queries
|
669
|
+
def or_else(*queries)
|
670
|
+
@queries |= queries.flatten
|
671
|
+
end
|
672
|
+
|
673
|
+
def empty?
|
674
|
+
@queries.empty?
|
675
|
+
end
|
676
|
+
|
677
|
+
# @return [String]
|
678
|
+
def to_json(*args)
|
679
|
+
raise ArgumentError, "compound disjunction query must have sub-queries" if @queries.nil? || @queries.empty?
|
680
|
+
data = {"disjuncts" => @queries.uniq}
|
681
|
+
if min
|
682
|
+
raise ArgumentError, "disjunction query has fewer sub-queries than configured minimum" if @queries.size < min
|
683
|
+
data["min"] = min
|
684
|
+
end
|
685
|
+
data["boost"] = boost if boost
|
686
|
+
data.to_json(*args)
|
687
|
+
end
|
688
|
+
end
|
689
|
+
|
690
|
+
# Prepare {BooleanQuery} body
|
691
|
+
#
|
692
|
+
# @yieldparam [BooleanQuery] query
|
693
|
+
#
|
694
|
+
# @return [BooleanQuery]
|
695
|
+
def self.booleans(&block)
|
696
|
+
BooleanQuery.new(&block)
|
697
|
+
end
|
698
|
+
|
699
|
+
# The boolean query is a useful combination of conjunction and disjunction queries.
|
700
|
+
class BooleanQuery < SearchQuery
|
701
|
+
# @return [Float]
|
702
|
+
attr_accessor :boost
|
703
|
+
|
704
|
+
# @yieldparam [BooleanQuery] self
|
705
|
+
def initialize
|
706
|
+
super()
|
707
|
+
@must = ConjunctionQuery.new
|
708
|
+
@must_not = DisjunctionQuery.new
|
709
|
+
@should = DisjunctionQuery.new
|
710
|
+
yield self if block_given?
|
711
|
+
end
|
712
|
+
|
713
|
+
# @param [Integer] min minimal value for "should" disjunction query
|
714
|
+
def should_min(min)
|
715
|
+
@should.min = min
|
716
|
+
self
|
717
|
+
end
|
718
|
+
|
719
|
+
# @param [*SearchQuery] queries
|
720
|
+
def must(*queries)
|
721
|
+
@must.and_also(*queries)
|
722
|
+
self
|
723
|
+
end
|
724
|
+
|
725
|
+
# @param [*SearchQuery] queries
|
726
|
+
def must_not(*queries)
|
727
|
+
@must_not.or_else(*queries)
|
728
|
+
self
|
729
|
+
end
|
730
|
+
|
731
|
+
# @param [*SearchQuery] queries
|
732
|
+
def should(*queries)
|
733
|
+
@should.or_else(*queries)
|
734
|
+
self
|
735
|
+
end
|
736
|
+
|
737
|
+
# @return [String]
|
738
|
+
def to_json(*args)
|
739
|
+
if @must.empty? && @must_not.empty? && @should.empty?
|
740
|
+
raise ArgumentError, "BooleanQuery must have at least one non-empty sub-query"
|
741
|
+
end
|
742
|
+
data = {}
|
743
|
+
data["must"] = @must unless @must.empty?
|
744
|
+
data["must_not"] = @must_not unless @must_not.empty?
|
745
|
+
data["should"] = @should unless @should.empty?
|
746
|
+
data["boost"] = boost if boost
|
747
|
+
data.to_json(*args)
|
748
|
+
end
|
749
|
+
end
|
750
|
+
|
751
|
+
# Prepare {TermQuery} body
|
752
|
+
#
|
753
|
+
# @yieldparam [TermQuery] query
|
754
|
+
# @param [String] term
|
755
|
+
#
|
756
|
+
# @return [TermQuery]
|
757
|
+
def self.term(term, &block)
|
758
|
+
TermQuery.new(term, &block)
|
759
|
+
end
|
760
|
+
|
761
|
+
# A query that looks for **exact** matches of the term in the index (no analyzer, no stemming). Useful to check what the actual content of the index is. It can also apply fuzziness on the term. Usual better alternative is `MatchQuery`.
|
762
|
+
class TermQuery < SearchQuery
|
763
|
+
# @return [Float]
|
764
|
+
attr_accessor :boost
|
765
|
+
|
766
|
+
# @return [String]
|
767
|
+
attr_accessor :field
|
768
|
+
|
769
|
+
# @return [Integer]
|
770
|
+
attr_accessor :fuzziness
|
771
|
+
|
772
|
+
# @return [Integer]
|
773
|
+
attr_accessor :prefix_length
|
774
|
+
|
775
|
+
# @yieldparam [TermQuery] self
|
776
|
+
#
|
777
|
+
# @param [String] term
|
778
|
+
def initialize(term)
|
779
|
+
super()
|
780
|
+
@term = term
|
781
|
+
yield self if block_given?
|
782
|
+
end
|
783
|
+
|
784
|
+
# @return [String]
|
785
|
+
def to_json(*args)
|
786
|
+
data = {"term" => @term}
|
787
|
+
data["boost"] = boost if boost
|
788
|
+
data["field"] = field if field
|
789
|
+
if fuzziness
|
790
|
+
data["fuzziness"] = fuzziness
|
791
|
+
data["prefix_length"] = prefix_length if prefix_length
|
792
|
+
end
|
793
|
+
data.to_json(*args)
|
794
|
+
end
|
795
|
+
end
|
796
|
+
|
797
|
+
# Prepare {PrefixQuery} body
|
798
|
+
#
|
799
|
+
# @yieldparam [PrefixQuery] query
|
800
|
+
# @param [String] prefix
|
801
|
+
#
|
802
|
+
# @return [PrefixQuery]
|
803
|
+
def self.prefix(prefix, &block)
|
804
|
+
PrefixQuery.new(prefix, &block)
|
805
|
+
end
|
806
|
+
|
807
|
+
# The prefix query finds documents containing terms that start with the provided prefix. Usual better alternative is `MatchQuery`.
|
808
|
+
class PrefixQuery < SearchQuery
|
809
|
+
# @return [Float]
|
810
|
+
attr_accessor :boost
|
811
|
+
|
812
|
+
# @return [String]
|
813
|
+
attr_accessor :field
|
814
|
+
|
815
|
+
# @yieldparam [PrefixQuery] self
|
816
|
+
#
|
817
|
+
# @param [String] prefix
|
818
|
+
def initialize(prefix)
|
819
|
+
super()
|
820
|
+
@prefix = prefix
|
821
|
+
yield self if block_given?
|
822
|
+
end
|
823
|
+
|
824
|
+
# @return [String]
|
825
|
+
def to_json(*args)
|
826
|
+
data = {"prefix" => @prefix}
|
827
|
+
data["boost"] = boost if boost
|
828
|
+
data["field"] = field if field
|
829
|
+
data.to_json(*args)
|
830
|
+
end
|
831
|
+
end
|
832
|
+
|
833
|
+
# Prepare {PhraseQuery} body
|
834
|
+
#
|
835
|
+
# @yieldparam [PhraseQuery] query
|
836
|
+
# @param [*String] terms
|
837
|
+
#
|
838
|
+
# @return [PhraseQuery]
|
839
|
+
def self.phrase(*terms, &block)
|
840
|
+
PhraseQuery.new(*terms, &block)
|
841
|
+
end
|
842
|
+
|
843
|
+
# A query that looks for **exact** match of several terms (in the exact order) in the index. Usual better alternative is {MatchPhraseQuery}.
|
844
|
+
class PhraseQuery < SearchQuery
|
845
|
+
# @return [Float]
|
846
|
+
attr_accessor :boost
|
847
|
+
|
848
|
+
# @return [String]
|
849
|
+
attr_accessor :field
|
850
|
+
|
851
|
+
# @yieldparam [PhraseQuery] self
|
852
|
+
#
|
853
|
+
# @param [*String] terms
|
854
|
+
def initialize(*terms)
|
855
|
+
super()
|
856
|
+
@terms = terms.flatten
|
857
|
+
yield self if block_given?
|
858
|
+
end
|
859
|
+
|
860
|
+
# @return [String]
|
861
|
+
def to_json(*args)
|
862
|
+
data = {"terms" => @terms.flatten.uniq}
|
863
|
+
data["boost"] = boost if boost
|
864
|
+
data["field"] = field if field
|
865
|
+
data.to_json(*args)
|
866
|
+
end
|
867
|
+
end
|
868
|
+
|
869
|
+
# Prepare {MatchAllQuery} body
|
870
|
+
#
|
871
|
+
# @yieldparam [MatchAllQuery] query
|
872
|
+
#
|
873
|
+
# @return [MatchAllQuery]
|
874
|
+
def self.match_all(&block)
|
875
|
+
MatchAllQuery.new(&block)
|
876
|
+
end
|
877
|
+
|
878
|
+
# A query that matches all indexed documents.
|
879
|
+
class MatchAllQuery < SearchQuery
|
880
|
+
# @return [Float]
|
881
|
+
attr_accessor :boost
|
882
|
+
|
883
|
+
# @yieldparam [MatchAllQuery] self
|
884
|
+
def initialize
|
885
|
+
super()
|
886
|
+
yield self if block_given?
|
887
|
+
end
|
888
|
+
|
889
|
+
# @return [String]
|
890
|
+
def to_json(*args)
|
891
|
+
data = {"match_all" => nil}
|
892
|
+
data["boost"] = boost if boost
|
893
|
+
data.to_json(*args)
|
894
|
+
end
|
895
|
+
end
|
896
|
+
|
897
|
+
# Prepare {MatchNoneQuery} body
|
898
|
+
#
|
899
|
+
# @yieldparam [MatchNoneQuery] query
|
900
|
+
#
|
901
|
+
# @return [MatchNoneQuery]
|
902
|
+
def self.match_none(&block)
|
903
|
+
MatchNoneQuery.new(&block)
|
904
|
+
end
|
905
|
+
|
906
|
+
# A query that matches nothing.
|
907
|
+
class MatchNoneQuery < SearchQuery
|
908
|
+
# @return [Float]
|
909
|
+
attr_accessor :boost
|
910
|
+
|
911
|
+
# @yieldparam [MatchNoneQuery] self
|
912
|
+
def initialize
|
913
|
+
super()
|
914
|
+
yield self if block_given?
|
915
|
+
end
|
916
|
+
|
917
|
+
# @return [String]
|
918
|
+
def to_json(*args)
|
919
|
+
data = {"match_none" => nil}
|
920
|
+
data["boost"] = boost if boost
|
921
|
+
data.to_json(*args)
|
922
|
+
end
|
923
|
+
end
|
924
|
+
end
|
925
|
+
|
926
|
+
class SearchSort
|
927
|
+
# @yieldparam [SearchSortScore]
|
928
|
+
# @return [SearchSortScore]
|
929
|
+
def self.score(&block)
|
930
|
+
SearchSortScore.new(&block)
|
931
|
+
end
|
932
|
+
|
933
|
+
# @yieldparam [SearchSortId]
|
934
|
+
# @return [SearchSortScore]
|
935
|
+
def self.id(&block)
|
936
|
+
SearchSortId.new(&block)
|
937
|
+
end
|
938
|
+
|
939
|
+
# @param [String] name field name
|
940
|
+
# @yieldparam [SearchSortField]
|
941
|
+
# @return [SearchSortField]
|
942
|
+
def self.field(name, &block)
|
943
|
+
SearchSortField.new(name, &block)
|
944
|
+
end
|
945
|
+
|
946
|
+
# @param [String] name field name
|
947
|
+
# @param [Float] longitude
|
948
|
+
# @param [Float] latitude
|
949
|
+
# @yieldparam [SearchSortField]
|
950
|
+
# @return [SearchSortGeoDistance]
|
951
|
+
def self.geo_distance(name, longitude, latitude, &block)
|
952
|
+
SearchSortGeoDistance.new(name, longitude, latitude, &block)
|
953
|
+
end
|
954
|
+
|
955
|
+
class SearchSortScore < SearchSort
|
956
|
+
# @return [Boolean] if descending order should be applied
|
957
|
+
attr_accessor :desc
|
958
|
+
|
959
|
+
# @yieldparam [SearchSortScore]
|
960
|
+
def initialize
|
961
|
+
yield self if block_given?
|
962
|
+
end
|
963
|
+
|
964
|
+
# @api private
|
965
|
+
def to_json(*args)
|
966
|
+
{by: :score, desc: desc}.to_json(*args)
|
967
|
+
end
|
968
|
+
end
|
969
|
+
|
970
|
+
class SearchSortId < SearchSort
|
971
|
+
# @return [Boolean] if descending order should be applied
|
972
|
+
attr_accessor :desc
|
973
|
+
|
974
|
+
# @yieldparam [SearchSortId]
|
975
|
+
def initialize
|
976
|
+
yield self if block_given?
|
977
|
+
end
|
978
|
+
|
979
|
+
# @api private
|
980
|
+
def to_json(*args)
|
981
|
+
{by: :id, desc: desc}.to_json(*args)
|
982
|
+
end
|
983
|
+
end
|
984
|
+
|
985
|
+
class SearchSortField < SearchSort
|
986
|
+
# @return [String] name of the field to sort by
|
987
|
+
attr_reader :field
|
988
|
+
|
989
|
+
# @return [Boolean] if descending order should be applied
|
990
|
+
attr_accessor :desc
|
991
|
+
|
992
|
+
# @return [:auto, :string, :number, :date]
|
993
|
+
attr_accessor :type
|
994
|
+
|
995
|
+
# @return [:first, :last] where the documents with missing field should be placed
|
996
|
+
attr_accessor :missing
|
997
|
+
|
998
|
+
# @return [:default, :min, :max]
|
999
|
+
attr_accessor :mode
|
1000
|
+
|
1001
|
+
# @param [String] field the name of the filed for ordering
|
1002
|
+
# @yieldparam [SearchSortField]
|
1003
|
+
def initialize(field)
|
1004
|
+
@field = field
|
1005
|
+
yield self if block_given?
|
1006
|
+
end
|
1007
|
+
|
1008
|
+
# @api private
|
1009
|
+
def to_json(*args)
|
1010
|
+
{by: :field, field: field, desc: desc, type: type, missing: missing, mode: mode}.to_json(*args)
|
1011
|
+
end
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
class SearchSortGeoDistance < SearchSort
|
1015
|
+
# @return [String] name of the field to sort by
|
1016
|
+
attr_reader :field
|
1017
|
+
|
1018
|
+
# @return [Boolean] if descending order should be applied
|
1019
|
+
attr_accessor :desc
|
1020
|
+
|
1021
|
+
# @return [Float]
|
1022
|
+
attr_reader :longitude
|
1023
|
+
|
1024
|
+
# @return [Float]
|
1025
|
+
attr_reader :latitude
|
1026
|
+
|
1027
|
+
# @return [:meters, :miles, :centimeters, :millimeters, :kilometers, :nauticalmiles, :feet, :yards, :inch]
|
1028
|
+
attr_accessor :unit
|
1029
|
+
|
1030
|
+
# @param [String] field field name
|
1031
|
+
# @param [Float] longitude
|
1032
|
+
# @param [Float] latitude
|
1033
|
+
# @yieldparam [SearchSortGeoDistance]
|
1034
|
+
def initialize(field, longitude, latitude)
|
1035
|
+
@field = field
|
1036
|
+
@longitude = longitude
|
1037
|
+
@latitude = latitude
|
1038
|
+
yield self if block_given?
|
1039
|
+
end
|
1040
|
+
|
1041
|
+
# @api private
|
1042
|
+
def to_json(*args)
|
1043
|
+
{by: :geo_distance, field: field, desc: desc, location: [longitude, latitude], unit: unit}.to_json(*args)
|
1044
|
+
end
|
1045
|
+
end
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
class SearchFacet
|
1049
|
+
# @param [String] field_name
|
1050
|
+
# @return [SearchFacetTerm]
|
1051
|
+
def self.term(field_name, &block)
|
1052
|
+
SearchFacetTerm.new(field_name, &block)
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
# @param [String] field_name
|
1056
|
+
# @return [SearchFacetNumericRange]
|
1057
|
+
def self.numeric_range(field_name, &block)
|
1058
|
+
SearchFacetNumericRange.new(field_name, &block)
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
# @param [String] field_name
|
1062
|
+
# @return [SearchFacetDateRange]
|
1063
|
+
def self.date_range(field_name, &block)
|
1064
|
+
SearchFacetDateRange.new(field_name, &block)
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
class SearchFacetTerm
|
1068
|
+
# @return [String]
|
1069
|
+
attr_reader :field
|
1070
|
+
|
1071
|
+
# @return [Integer]
|
1072
|
+
attr_accessor :size
|
1073
|
+
|
1074
|
+
# @param [String] field name of the field
|
1075
|
+
def initialize(field)
|
1076
|
+
@field = field
|
1077
|
+
yield self if block_given?
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
# @api private
|
1081
|
+
def to_json(*args)
|
1082
|
+
{field: field, size: size}.to_json(*args)
|
1083
|
+
end
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
class SearchFacetNumericRange
|
1087
|
+
# @return [String]
|
1088
|
+
attr_reader :field
|
1089
|
+
|
1090
|
+
# @return [Integer]
|
1091
|
+
attr_accessor :size
|
1092
|
+
|
1093
|
+
# @param [String] field name of the field
|
1094
|
+
def initialize(field)
|
1095
|
+
@field = field
|
1096
|
+
@ranges = []
|
1097
|
+
yield self if block_given?
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
# @param [String] name the name of the range
|
1101
|
+
# @param [Integer, Float, nil] min lower bound of the range (pass +nil+ if there is no lower bound)
|
1102
|
+
# @param [Integer, Float, nil] max upper bound of the range (pass +nil+ if there is no upper bound)
|
1103
|
+
def add(name, min, max)
|
1104
|
+
@ranges.append({name: name, min: min, max: max})
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
# @api private
|
1108
|
+
def to_json(*args)
|
1109
|
+
{field: field, size: size, numeric_ranges: @ranges}.to_json(*args)
|
1110
|
+
end
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
class SearchFacetDateRange
|
1114
|
+
# @return [String]
|
1115
|
+
attr_reader :field
|
1116
|
+
|
1117
|
+
# @return [Integer]
|
1118
|
+
attr_accessor :size
|
1119
|
+
|
1120
|
+
# @param [String] field name of the field
|
1121
|
+
def initialize(field)
|
1122
|
+
@field = field
|
1123
|
+
@ranges = []
|
1124
|
+
yield self if block_given?
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
DATE_FORMAT_RFC3339 = "%Y-%m-%dT%H:%M:%S%:z"
|
1128
|
+
|
1129
|
+
# @param [String] name the name of the range
|
1130
|
+
# @param [Time, String, nil] start_time lower bound of the range (pass +nil+ if there is no lower bound)
|
1131
|
+
# @param [Time, String, nil] end_time lower bound of the range (pass +nil+ if there is no lower bound)
|
1132
|
+
def add(name, start_time, end_time)
|
1133
|
+
start_time = start_time.strftime(DATE_FORMAT_RFC3339) if start_time && start_time.respond_to?(:strftime)
|
1134
|
+
end_time = end_time.strftime(DATE_FORMAT_RFC3339) if end_time && end_time.respond_to?(:strftime)
|
1135
|
+
@ranges.append({name: name, start: start_time, end: end_time})
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
# @api private
|
1139
|
+
def to_json(*args)
|
1140
|
+
{field: field, size: size, date_ranges: @ranges}.to_json(*args)
|
1141
|
+
end
|
1142
|
+
end
|
1143
|
+
end
|
1144
|
+
|
1145
|
+
class SearchOptions
|
1146
|
+
# @return [Integer] Timeout in milliseconds
|
1147
|
+
attr_accessor :timeout
|
1148
|
+
|
1149
|
+
# @return [Integer] limits the number of matches returned from the complete result set.
|
1150
|
+
attr_accessor :limit
|
1151
|
+
|
1152
|
+
# @return [Integer] indicates how many matches are skipped on the result set before starting to return the matches
|
1153
|
+
attr_accessor :skip
|
1154
|
+
|
1155
|
+
# @return [Boolean] triggers inclusion of additional search result score explanations. (Default: +false+)
|
1156
|
+
attr_accessor :explain
|
1157
|
+
|
1158
|
+
# @return [:html, :ansi] the style of highlighting in the result excerpts (if not specified, the server default will be used)
|
1159
|
+
attr_accessor :highlight_style
|
1160
|
+
|
1161
|
+
# @return [Array<String>] list of the fields to highlight
|
1162
|
+
attr_accessor :highlight_fields
|
1163
|
+
|
1164
|
+
# @return [Array<String>] list of field values which should be retrieved for result documents, provided they were stored while indexing
|
1165
|
+
attr_accessor :fields
|
1166
|
+
|
1167
|
+
# Customizes the consistency guarantees for this query
|
1168
|
+
#
|
1169
|
+
# @note overrides consistency level set by {#consistent_with}
|
1170
|
+
#
|
1171
|
+
# [+:not_bounded+] The engine will return whatever state it has at the time of query
|
1172
|
+
#
|
1173
|
+
# @param [:not_bounded] level the scan consistency to be used for this query
|
1174
|
+
#
|
1175
|
+
# @return [void]
|
1176
|
+
def scan_consistency=(level)
|
1177
|
+
@mutation_state = nil if @mutation_state
|
1178
|
+
@scan_consistency = level
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
# Sets the mutation tokens this query should be consistent with
|
1182
|
+
#
|
1183
|
+
# @note overrides consistency level set by {#scan_consistency=}
|
1184
|
+
#
|
1185
|
+
# @param [MutationState] mutation_state the mutation state containing the mutation tokens
|
1186
|
+
#
|
1187
|
+
# @return [void]
|
1188
|
+
def consistent_with(mutation_state)
|
1189
|
+
@scan_consistency = nil if @scan_consistency
|
1190
|
+
@mutation_state = mutation_state
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
# Ordering rules to apply to the results
|
1194
|
+
#
|
1195
|
+
# The list might contain either strings or special objects, that derive from {SearchSort}.
|
1196
|
+
#
|
1197
|
+
# In case of String, the value represents the name of the field with optional +-+ in front of the name, which will turn on descending mode for this field. One field is special is +"_score"+ which will sort results by their score.
|
1198
|
+
#
|
1199
|
+
# When nothing specified, the Server will order results by their score descending, which is equivalent of +"-_score"+.
|
1200
|
+
#
|
1201
|
+
# @return [Array<String, SearchSort>] list of ordering object
|
1202
|
+
attr_accessor :sort
|
1203
|
+
|
1204
|
+
# Facets allow to aggregate information collected on a particular result set
|
1205
|
+
#
|
1206
|
+
# @return [Hash<String => SearchFacet>]
|
1207
|
+
attr_accessor :facets
|
1208
|
+
|
1209
|
+
# @return [JsonTranscoder] transcoder to use for the results
|
1210
|
+
attr_accessor :transcoder
|
1211
|
+
|
1212
|
+
# @yieldparam [SearchOptions] self
|
1213
|
+
def initialize
|
1214
|
+
@explain = false
|
1215
|
+
@transcoder = JsonTranscoder.new
|
1216
|
+
@scan_consistency = nil
|
1217
|
+
@mutation_state = nil
|
1218
|
+
yield self if block_given?
|
1219
|
+
end
|
1220
|
+
end
|
1221
|
+
|
1222
|
+
class SearchRowLocation
|
1223
|
+
# @return [String]
|
1224
|
+
attr_accessor :field
|
1225
|
+
|
1226
|
+
# @return [String]
|
1227
|
+
attr_accessor :term
|
1228
|
+
|
1229
|
+
# @return [Integer] the position of the term within the field, starting at 1
|
1230
|
+
attr_accessor :position
|
1231
|
+
|
1232
|
+
# @return [Integer] start byte offset of the term in the field
|
1233
|
+
attr_accessor :start_offset
|
1234
|
+
|
1235
|
+
# @return [Integer] end byte offset of the term in the field
|
1236
|
+
attr_accessor :end_offset
|
1237
|
+
|
1238
|
+
# @return [Array<Integer>] the positions of the term within any elements.
|
1239
|
+
attr_accessor :array_positions
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
class SearchRowLocations
|
1243
|
+
# Lists all locations (any field, any term)
|
1244
|
+
#
|
1245
|
+
# @return [Array<SearchRowLocation>]
|
1246
|
+
def get_all
|
1247
|
+
@locations
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
# Lists all locations for a given field (any term)
|
1251
|
+
#
|
1252
|
+
# @return [Array<SearchRowLocation>]
|
1253
|
+
def get_for_field(name)
|
1254
|
+
@locations.select { |location| location.field == name }
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
# Lists all locations for a given field and term
|
1258
|
+
#
|
1259
|
+
# @return [Array<SearchRowLocation>]
|
1260
|
+
def get_for_field_and_term(name, term)
|
1261
|
+
@locations.select { |location| location.field == name && location.term == term }
|
1262
|
+
end
|
1263
|
+
|
1264
|
+
# Lists the fields in this location
|
1265
|
+
#
|
1266
|
+
# @return [Array<String>]
|
1267
|
+
def fields
|
1268
|
+
@locations.map { |location| location.field }.uniq
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
# Lists all terms in this locations, considering all fields
|
1272
|
+
#
|
1273
|
+
# @return [Array<String>]
|
1274
|
+
def terms
|
1275
|
+
@locations.map { |location| location.term }.uniq
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
# Lists the terms for a given field
|
1279
|
+
#
|
1280
|
+
# @return [Array<String>]
|
1281
|
+
def terms_for_field(name)
|
1282
|
+
get_for_field(name).map { |location| location.term }.uniq
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
# @param [Array<SearchRowLocation>] locations
|
1286
|
+
def initialize(locations)
|
1287
|
+
@locations = locations
|
1288
|
+
end
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# An individual facet result has both metadata and details, as each facet can define ranges into which results are
|
1292
|
+
# categorized
|
1293
|
+
class SearchFacetResult
|
1294
|
+
# @return [String]
|
1295
|
+
attr_accessor :name
|
1296
|
+
|
1297
|
+
# @return [String]
|
1298
|
+
attr_accessor :field
|
1299
|
+
|
1300
|
+
# @return [Integer]
|
1301
|
+
attr_accessor :total
|
1302
|
+
|
1303
|
+
# @return [Integer]
|
1304
|
+
attr_accessor :missing
|
1305
|
+
|
1306
|
+
# @return [Integer]
|
1307
|
+
attr_accessor :other
|
1308
|
+
|
1309
|
+
class TermFacetResult < SearchFacetResult
|
1310
|
+
# @return [Array<TermFacet>]
|
1311
|
+
attr_accessor :terms
|
1312
|
+
|
1313
|
+
def type
|
1314
|
+
:term_facet
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
# @yieldparam [TermFacetResult] self
|
1318
|
+
def initialize
|
1319
|
+
yield self if block_given?
|
1320
|
+
end
|
1321
|
+
|
1322
|
+
class TermFacet
|
1323
|
+
# @return [String]
|
1324
|
+
attr_reader :term
|
1325
|
+
|
1326
|
+
# @return [Integer]
|
1327
|
+
attr_reader :count
|
1328
|
+
|
1329
|
+
def initialize(term, count)
|
1330
|
+
@term = term
|
1331
|
+
@count = count
|
1332
|
+
end
|
1333
|
+
end
|
1334
|
+
end
|
1335
|
+
|
1336
|
+
class DateRangeFacetResult < SearchFacetResult
|
1337
|
+
# @return [Array<DateRangeFacet>]
|
1338
|
+
attr_accessor :date_ranges
|
1339
|
+
|
1340
|
+
def type
|
1341
|
+
:date_range_facet
|
1342
|
+
end
|
1343
|
+
|
1344
|
+
# @yieldparam [DateRangeFacetResult] self
|
1345
|
+
def initialize
|
1346
|
+
yield self if block_given?
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
class DateRangeFacet
|
1350
|
+
# @return [String]
|
1351
|
+
attr_reader :name
|
1352
|
+
|
1353
|
+
# @return [Integer]
|
1354
|
+
attr_reader :count
|
1355
|
+
|
1356
|
+
# @return [String]
|
1357
|
+
attr_reader :start_time
|
1358
|
+
|
1359
|
+
# @return [String]
|
1360
|
+
attr_reader :end_time
|
1361
|
+
|
1362
|
+
def initialize(name, count, start_time, end_time)
|
1363
|
+
@name = name
|
1364
|
+
@count = count
|
1365
|
+
@start_time = start_time
|
1366
|
+
@end_time = end_time
|
1367
|
+
end
|
1368
|
+
end
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
class NumericRangeFacetResult < SearchFacetResult
|
1372
|
+
# @return [Array<NumericRangeFacet>]
|
1373
|
+
attr_accessor :numeric_ranges
|
1374
|
+
|
1375
|
+
def type
|
1376
|
+
:numeric_range_facet
|
1377
|
+
end
|
1378
|
+
|
1379
|
+
# @yieldparam [NumericRangeFacetResult] self
|
1380
|
+
def initialize
|
1381
|
+
yield self if block_given?
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
class NumericRangeFacet
|
1385
|
+
# @return [String]
|
1386
|
+
attr_reader :name
|
1387
|
+
|
1388
|
+
# @return [Integer]
|
1389
|
+
attr_reader :count
|
1390
|
+
|
1391
|
+
# @return [Integer, Float, nil]
|
1392
|
+
attr_reader :min
|
1393
|
+
|
1394
|
+
# @return [Integer, Float, nil]
|
1395
|
+
attr_reader :max
|
1396
|
+
|
1397
|
+
def initialize(name, count, min, max)
|
1398
|
+
@name = name
|
1399
|
+
@count = count
|
1400
|
+
@min = min
|
1401
|
+
@max = max
|
1402
|
+
end
|
1403
|
+
end
|
1404
|
+
end
|
1405
|
+
end
|
1406
|
+
|
1407
|
+
class SearchRow
|
1408
|
+
# @return [String] name of the index
|
1409
|
+
attr_accessor :index
|
1410
|
+
|
1411
|
+
# @return [String] document identifier
|
1412
|
+
attr_accessor :id
|
1413
|
+
|
1414
|
+
# @return [Float]
|
1415
|
+
attr_accessor :score
|
1416
|
+
|
1417
|
+
# @return [SearchRowLocations]
|
1418
|
+
attr_accessor :locations
|
1419
|
+
|
1420
|
+
# @return [Hash]
|
1421
|
+
attr_accessor :explanation
|
1422
|
+
|
1423
|
+
# @return [Hash<String => Array<String>>]
|
1424
|
+
attr_accessor :fragments
|
1425
|
+
|
1426
|
+
# @return [JsonTranscoder] transcoder to use for the fields
|
1427
|
+
attr_accessor :transcoder
|
1428
|
+
|
1429
|
+
def fields
|
1430
|
+
@transcoder.decode(@fields, :json) if @fields && @transcoder
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
# @yieldparam [SearchRow] self
|
1434
|
+
def initialize
|
1435
|
+
@fields = nil
|
1436
|
+
yield self if block_given?
|
1437
|
+
end
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
class SearchMetrics
|
1441
|
+
# @return [Integer] time spent executing the query (in milliseconds)
|
1442
|
+
attr_accessor :took
|
1443
|
+
|
1444
|
+
# @return [Integer]
|
1445
|
+
attr_accessor :total_rows
|
1446
|
+
|
1447
|
+
# @return [Float]
|
1448
|
+
attr_accessor :max_score
|
1449
|
+
|
1450
|
+
# @return [Integer]
|
1451
|
+
attr_accessor :success_partition_count
|
1452
|
+
|
1453
|
+
# @return [Integer]
|
1454
|
+
attr_accessor :error_partition_count
|
1455
|
+
|
1456
|
+
# @return [Integer]
|
1457
|
+
def total_partition_count
|
1458
|
+
success_partition_count + error_partition_count
|
1459
|
+
end
|
1460
|
+
end
|
1461
|
+
|
1462
|
+
class SearchMetaData
|
1463
|
+
# @return [SearchMetrics]
|
1464
|
+
attr_accessor :metrics
|
1465
|
+
|
1466
|
+
# @return [Hash<String => String>]
|
1467
|
+
attr_accessor :errors
|
1468
|
+
|
1469
|
+
# @yieldparam [SearchMetaData] self
|
1470
|
+
def initialize
|
1471
|
+
@metrics = SearchMetrics.new
|
1472
|
+
yield self if block_given?
|
1473
|
+
end
|
1474
|
+
end
|
1475
|
+
|
1476
|
+
class SearchResult
|
1477
|
+
# @return [Array<SearchRow>]
|
1478
|
+
attr_accessor :rows
|
1479
|
+
|
1480
|
+
# @return [Hash<String => SearchFacetResult>]
|
1481
|
+
attr_accessor :facets
|
1482
|
+
|
1483
|
+
# @return [SearchMetaData]
|
1484
|
+
attr_accessor :meta_data
|
1485
|
+
|
1486
|
+
# @yieldparam [SearchResult] self
|
1487
|
+
def initialize
|
1488
|
+
yield self if block_given?
|
1489
|
+
end
|
1490
|
+
end
|
1491
|
+
end
|
1492
|
+
end
|