couchbase 4.2.8 → 4.2.9
Sign up to get free protection for your applications and to get access to all the features.
- package/CMakeLists.txt +1 -1
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.crt +139 -56
- package/deps/couchbase-cxx-cache/mozilla-ca-bundle.sha256 +1 -1
- package/deps/couchbase-cxx-client/CMakeLists.txt +397 -424
- package/deps/couchbase-cxx-client/core/agent_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/agent_group.cxx +0 -1
- package/deps/couchbase-cxx-client/core/agent_group.hxx +9 -0
- package/deps/couchbase-cxx-client/core/agent_group_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/bucket.cxx +22 -8
- package/deps/couchbase-cxx-client/core/bucket.hxx +3 -1
- package/deps/couchbase-cxx-client/core/cluster.cxx +1453 -108
- package/deps/couchbase-cxx-client/core/cluster.hxx +183 -473
- package/deps/couchbase-cxx-client/core/cluster_agent_config.hxx +1 -1
- package/deps/couchbase-cxx-client/core/cluster_options.cxx +12 -2
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +9 -8
- package/deps/couchbase-cxx-client/core/config_profiles.cxx +2 -2
- package/deps/couchbase-cxx-client/core/config_profiles.hxx +1 -1
- package/deps/couchbase-cxx-client/core/core_sdk_shim.cxx +1 -2
- package/deps/couchbase-cxx-client/core/core_sdk_shim.hxx +3 -2
- package/deps/couchbase-cxx-client/core/diagnostics.hxx +0 -1
- package/deps/couchbase-cxx-client/core/dispatcher.cxx +2 -2
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +38 -76
- package/deps/couchbase-cxx-client/core/impl/analytics.hxx +40 -0
- package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +820 -0
- package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +403 -0
- package/deps/couchbase-cxx-client/core/impl/bucket.cxx +78 -0
- package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +433 -0
- package/deps/couchbase-cxx-client/core/impl/cluster.cxx +226 -44
- package/deps/couchbase-cxx-client/core/impl/collection.cxx +1384 -0
- package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +306 -0
- package/deps/couchbase-cxx-client/core/impl/configuration_profiles_registry.cxx +3 -1
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +2 -0
- package/deps/couchbase-cxx-client/core/{operations/mcbp_noop.cxx → impl/doc_id_query.cxx} +19 -15
- package/deps/couchbase-cxx-client/core/impl/key_value_error_category.cxx +4 -2
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.hxx +0 -10
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.hxx +0 -10
- package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +24 -17
- package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/query.cxx +45 -68
- package/deps/couchbase-cxx-client/core/impl/query.hxx +34 -0
- package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +628 -0
- package/deps/couchbase-cxx-client/core/impl/scope.cxx +172 -0
- package/deps/couchbase-cxx-client/core/impl/search.cxx +12 -61
- package/deps/couchbase-cxx-client/core/impl/search.hxx +37 -0
- package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +469 -0
- package/deps/couchbase-cxx-client/core/impl/search_row_location.cxx +12 -0
- package/deps/couchbase-cxx-client/core/impl/search_sort_geo_distance.cxx +87 -0
- package/deps/couchbase-cxx-client/core/impl/with_legacy_durability.hxx +23 -25
- package/deps/couchbase-cxx-client/core/io/dns_config.cxx +28 -0
- package/deps/couchbase-cxx-client/core/io/dns_config.hxx +6 -25
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +9 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +1 -1
- package/deps/couchbase-cxx-client/core/io/mcbp_message.hxx +3 -2
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +51 -21
- package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +2 -1
- package/deps/couchbase-cxx-client/core/logger/logger.hxx +4 -4
- package/deps/couchbase-cxx-client/core/management/bucket_settings.hxx +1 -1
- package/deps/couchbase-cxx-client/core/mcbp/packet.cxx +1 -1
- package/deps/couchbase-cxx-client/core/mcbp/queue_callback.hxx +1 -1
- package/deps/couchbase-cxx-client/core/meta/features.hxx +28 -0
- package/deps/couchbase-cxx-client/core/operations/document_query.cxx +17 -1
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_create.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/change_password.cxx +3 -1
- package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +6 -5
- package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/group_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +2 -2
- package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.cxx +4 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.cxx +4 -4
- package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +4 -4
- package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations.hxx +0 -1
- package/deps/couchbase-cxx-client/core/operations_fwd.hxx +260 -0
- package/deps/couchbase-cxx-client/core/origin.cxx +146 -5
- package/deps/couchbase-cxx-client/core/origin.hxx +30 -140
- package/deps/couchbase-cxx-client/core/protocol/cmd_cluster_map_change_notification.hxx +3 -3
- package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +5 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_observe_seqno.hxx +4 -4
- package/deps/couchbase-cxx-client/core/protocol/hello_feature.hxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/hello_feature_fmt.hxx +3 -0
- package/deps/couchbase-cxx-client/core/protocol/status.cxx +6 -0
- package/deps/couchbase-cxx-client/core/protocol/status.hxx +1 -0
- package/deps/couchbase-cxx-client/core/query_context.hxx +11 -7
- package/deps/couchbase-cxx-client/core/range_scan_orchestrator.cxx +1 -1
- package/deps/couchbase-cxx-client/core/topology/configuration.cxx +23 -0
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +8 -12
- package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +3 -3
- package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +2 -0
- package/deps/couchbase-cxx-client/core/topology/error_map.hxx +2 -2
- package/deps/couchbase-cxx-client/core/topology/error_map_json.hxx +4 -0
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.cxx +58 -0
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.hxx +5 -40
- package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.cxx +30 -0
- package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +18 -18
- package/deps/couchbase-cxx-client/core/transactions/attempt_context.cxx +36 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +39 -41
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/internal/atr_cleanup_entry.hxx +3 -1
- package/deps/couchbase-cxx-client/core/transactions/internal/atr_entry.hxx +2 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.cxx +32 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.hxx +4 -30
- package/deps/couchbase-cxx-client/core/transactions/internal/doc_record_fmt.hxx +41 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/logging.hxx +17 -15
- package/deps/couchbase-cxx-client/core/transactions/internal/transaction_context.hxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +4 -4
- package/deps/couchbase-cxx-client/core/transactions/internal/utils.hxx +1 -13
- package/deps/couchbase-cxx-client/core/transactions/result.hxx +0 -26
- package/deps/couchbase-cxx-client/core/transactions/result_fmt.hxx +46 -0
- package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +16 -14
- package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +6 -6
- package/deps/couchbase-cxx-client/core/transactions/transaction_keyspace.cxx +48 -0
- package/deps/couchbase-cxx-client/core/transactions/transaction_links.hxx +1 -0
- package/deps/couchbase-cxx-client/core/transactions/transaction_options.cxx +61 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +9 -8
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +9 -16
- package/deps/couchbase-cxx-client/core/transactions/transactions_config.cxx +7 -6
- package/deps/couchbase-cxx-client/core/transactions.hxx +6 -5
- package/deps/couchbase-cxx-client/core/utils/join_strings.hxx +4 -3
- package/deps/couchbase-cxx-client/core/utils/keyspace.hxx +4 -4
- package/deps/couchbase-cxx-client/couchbase/allow_querying_search_index_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_index_manager.hxx +463 -0
- package/deps/couchbase-cxx-client/couchbase/analyze_document_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/append_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/behavior_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/binary_collection.hxx +19 -115
- package/deps/couchbase-cxx-client/couchbase/bucket.hxx +13 -30
- package/deps/couchbase-cxx-client/couchbase/bucket_manager.hxx +8 -7
- package/deps/couchbase-cxx-client/couchbase/build_query_index_options.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +41 -73
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +1 -27
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +176 -386
- package/deps/couchbase-cxx-client/couchbase/collection_manager.hxx +8 -9
- package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +21 -24
- package/deps/couchbase-cxx-client/couchbase/connect_link_analytics_options.hxx +116 -0
- package/deps/couchbase-cxx-client/couchbase/create_bucket_options.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/create_collection_options.hxx +3 -2
- package/deps/couchbase-cxx-client/couchbase/create_dataset_analytics_options.hxx +120 -0
- package/deps/couchbase-cxx-client/couchbase/create_dataverse_analytics_options.hxx +85 -0
- package/deps/couchbase-cxx-client/couchbase/create_index_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/create_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/decrement_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/disallow_querying_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/disconnect_link_analytics_options.hxx +105 -0
- package/deps/couchbase-cxx-client/couchbase/drop_dataset_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/drop_dataverse_analytics_options.hxx +84 -0
- package/deps/couchbase-cxx-client/couchbase/drop_index_analytics_options.hxx +103 -0
- package/deps/couchbase-cxx-client/couchbase/drop_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/drop_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +22 -1
- package/deps/couchbase-cxx-client/couchbase/exists_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_error_map_attribute.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +3 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/transaction_keyspace.hxx +37 -0
- package/deps/couchbase-cxx-client/couchbase/freeze_plan_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_datasets_analytics_options.hxx +66 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_indexes_analytics_options.hxx +65 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_query_indexes_options.hxx +1 -4
- package/deps/couchbase-cxx-client/couchbase/get_all_replicas_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_all_search_indexes_options.hxx +45 -0
- package/deps/couchbase-cxx-client/couchbase/get_and_lock_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/get_and_touch_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/get_any_replica_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_indexed_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/get_links_analytics_options.hxx +121 -0
- package/deps/couchbase-cxx-client/couchbase/get_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/get_pending_mutations_analytics_options.hxx +67 -0
- package/deps/couchbase-cxx-client/couchbase/get_search_index_options.hxx +44 -0
- package/deps/couchbase-cxx-client/couchbase/increment_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/insert_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/key_value_error_map_attribute.hxx +12 -0
- package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +1 -0
- package/deps/couchbase-cxx-client/couchbase/lookup_in_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/management/analytics_dataset.hxx +48 -0
- package/deps/couchbase-cxx-client/couchbase/management/analytics_index.hxx +48 -0
- package/deps/couchbase-cxx-client/couchbase/management/analytics_link.hxx +239 -0
- package/deps/couchbase-cxx-client/couchbase/management/query_index.hxx +3 -3
- package/deps/couchbase-cxx-client/couchbase/management/search_index.hxx +40 -0
- package/deps/couchbase-cxx-client/couchbase/manager_error_context.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/mutate_in_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/network_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/pause_ingest_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/phrase_query.hxx +19 -0
- package/deps/couchbase-cxx-client/couchbase/prepend_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +99 -20
- package/deps/couchbase-cxx-client/couchbase/query_options.hxx +0 -21
- package/deps/couchbase-cxx-client/couchbase/remove_options.hxx +0 -23
- package/deps/couchbase-cxx-client/couchbase/replace_link_analytics_options.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/replace_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/resume_ingest_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/scope.hxx +13 -45
- package/deps/couchbase-cxx-client/couchbase/search_facet_result.hxx +1 -7
- package/deps/couchbase-cxx-client/couchbase/search_geo_distance_units.hxx +26 -0
- package/deps/couchbase-cxx-client/couchbase/search_index_manager.hxx +292 -0
- package/deps/couchbase-cxx-client/couchbase/search_row_location.hxx +10 -0
- package/deps/couchbase-cxx-client/couchbase/search_sort_geo_distance.hxx +84 -0
- package/deps/couchbase-cxx-client/couchbase/security_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/touch_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/tracing/request_tracer.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/async_attempt_context.hxx +10 -7
- package/deps/couchbase-cxx-client/couchbase/transactions/attempt_context.hxx +10 -10
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_keyspace.hxx +8 -58
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +28 -70
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_options.hxx +7 -2
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_cleanup_config.hxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_config.hxx +11 -38
- package/deps/couchbase-cxx-client/couchbase/unfreeze_plan_search_index_options.hxx +43 -0
- package/deps/couchbase-cxx-client/couchbase/unlock_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/upsert_options.hxx +0 -24
- package/deps/couchbase-cxx-client/couchbase/upsert_search_index_options.hxx +41 -0
- package/dist/binding.d.ts +7 -9
- package/dist/bindingutilities.js +2 -0
- package/dist/collection.js +3 -3
- package/dist/errors.d.ts +9 -0
- package/dist/errors.js +14 -2
- package/dist/transactions.d.ts +2 -0
- package/dist/transactions.js +2 -3
- package/dist/usermanager.js +1 -1
- package/package.json +7 -7
- package/src/binding.cpp +1 -0
- package/src/connection.cpp +12 -9
- package/src/connection.hpp +3 -3
- package/src/connection_autogen.cpp +7 -5
- package/src/constants.cpp +3 -0
- package/src/instance.cpp +2 -2
- package/src/instance.hpp +1 -1
- package/src/jstocbpp_autogen.hpp +21 -38
- package/src/jstocbpp_basic.hpp +2 -0
- package/src/jstocbpp_errors.hpp +1 -0
- package/src/jstocbpp_transactions.hpp +6 -22
- package/src/mutationtoken.hpp +1 -0
- package/tools/gen-bindings-json.py +39 -16
- package/deps/couchbase-cxx-client/core/impl/append.cxx +0 -87
- package/deps/couchbase-cxx-client/core/impl/build_deferred_query_indexes.cxx +0 -157
- package/deps/couchbase-cxx-client/core/impl/create_bucket.cxx +0 -158
- package/deps/couchbase-cxx-client/core/impl/create_collection.cxx +0 -83
- package/deps/couchbase-cxx-client/core/impl/create_query_index.cxx +0 -232
- package/deps/couchbase-cxx-client/core/impl/create_scope.cxx +0 -69
- package/deps/couchbase-cxx-client/core/impl/decrement.cxx +0 -96
- package/deps/couchbase-cxx-client/core/impl/drop_bucket.cxx +0 -66
- package/deps/couchbase-cxx-client/core/impl/drop_collection.cxx +0 -76
- package/deps/couchbase-cxx-client/core/impl/drop_query_index.cxx +0 -187
- package/deps/couchbase-cxx-client/core/impl/drop_scope.cxx +0 -68
- package/deps/couchbase-cxx-client/core/impl/exists.cxx +0 -47
- package/deps/couchbase-cxx-client/core/impl/flush_bucket.cxx +0 -66
- package/deps/couchbase-cxx-client/core/impl/get.cxx +0 -68
- package/deps/couchbase-cxx-client/core/impl/get_all_buckets.cxx +0 -178
- package/deps/couchbase-cxx-client/core/impl/get_all_query_indexes.cxx +0 -106
- package/deps/couchbase-cxx-client/core/impl/get_all_replicas.cxx +0 -145
- package/deps/couchbase-cxx-client/core/impl/get_all_scopes.cxx +0 -94
- package/deps/couchbase-cxx-client/core/impl/get_and_lock.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/get_and_touch.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/get_any_replica.cxx +0 -134
- package/deps/couchbase-cxx-client/core/impl/get_bucket.cxx +0 -168
- package/deps/couchbase-cxx-client/core/impl/increment.cxx +0 -96
- package/deps/couchbase-cxx-client/core/impl/insert.cxx +0 -90
- package/deps/couchbase-cxx-client/core/impl/lookup_in.cxx +0 -69
- package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.cxx +0 -178
- package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.cxx +0 -169
- package/deps/couchbase-cxx-client/core/impl/mutate_in.cxx +0 -125
- package/deps/couchbase-cxx-client/core/impl/prepend.cxx +0 -87
- package/deps/couchbase-cxx-client/core/impl/remove.cxx +0 -86
- package/deps/couchbase-cxx-client/core/impl/replace.cxx +0 -102
- package/deps/couchbase-cxx-client/core/impl/touch.cxx +0 -49
- package/deps/couchbase-cxx-client/core/impl/unlock.cxx +0 -47
- package/deps/couchbase-cxx-client/core/impl/update_bucket.cxx +0 -133
- package/deps/couchbase-cxx-client/core/impl/update_collection.cxx +0 -83
- package/deps/couchbase-cxx-client/core/impl/upsert.cxx +0 -100
- package/deps/couchbase-cxx-client/core/impl/watch_query_indexes.cxx +0 -196
- package/deps/couchbase-cxx-client/core/operations/mcbp_noop.hxx +0 -49
- /package/deps/couchbase-cxx-client/core/impl/{streaming_json_lexter_error_category.cxx → streaming_json_lexer_error_category.cxx} +0 -0
@@ -0,0 +1,403 @@
|
|
1
|
+
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2023-Present Couchbase, Inc.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
|
18
|
+
#include <couchbase/binary_collection.hxx>
|
19
|
+
|
20
|
+
#include "core/cluster.hxx"
|
21
|
+
#include "core/operations/document_append.hxx"
|
22
|
+
#include "core/operations/document_decrement.hxx"
|
23
|
+
#include "core/operations/document_increment.hxx"
|
24
|
+
#include "core/operations/document_insert.hxx"
|
25
|
+
#include "core/operations/document_mutate_in.hxx"
|
26
|
+
#include "core/operations/document_prepend.hxx"
|
27
|
+
#include "core/operations/document_remove.hxx"
|
28
|
+
#include "core/operations/document_replace.hxx"
|
29
|
+
#include "core/operations/document_upsert.hxx"
|
30
|
+
#include "observe_poll.hxx"
|
31
|
+
|
32
|
+
#include <memory>
|
33
|
+
|
34
|
+
namespace couchbase
|
35
|
+
{
|
36
|
+
class binary_collection_impl : public std::enable_shared_from_this<binary_collection_impl>
|
37
|
+
{
|
38
|
+
public:
|
39
|
+
binary_collection_impl(core::cluster core, std::string_view bucket_name, std::string_view scope_name, std::string_view name)
|
40
|
+
: core_{ std::move(core) }
|
41
|
+
, bucket_name_{ bucket_name }
|
42
|
+
, scope_name_{ scope_name }
|
43
|
+
, name_{ name }
|
44
|
+
{
|
45
|
+
}
|
46
|
+
|
47
|
+
[[nodiscard]] auto bucket_name() const -> const std::string&
|
48
|
+
{
|
49
|
+
return bucket_name_;
|
50
|
+
}
|
51
|
+
|
52
|
+
[[nodiscard]] auto scope_name() const -> const std::string&
|
53
|
+
{
|
54
|
+
return scope_name_;
|
55
|
+
}
|
56
|
+
|
57
|
+
[[nodiscard]] auto name() const -> const std::string&
|
58
|
+
{
|
59
|
+
return name_;
|
60
|
+
}
|
61
|
+
|
62
|
+
void append(std::string document_key, std::vector<std::byte> data, append_options::built options, append_handler&& handler) const
|
63
|
+
{
|
64
|
+
auto id = core::document_id{
|
65
|
+
bucket_name_,
|
66
|
+
scope_name_,
|
67
|
+
name_,
|
68
|
+
std::move(document_key),
|
69
|
+
};
|
70
|
+
if (options.persist_to == persist_to::none && options.replicate_to == replicate_to::none) {
|
71
|
+
return core_.execute(
|
72
|
+
core::operations::append_request{
|
73
|
+
std::move(id),
|
74
|
+
std::move(data),
|
75
|
+
{},
|
76
|
+
{},
|
77
|
+
options.durability_level,
|
78
|
+
options.timeout,
|
79
|
+
{ options.retry_strategy },
|
80
|
+
},
|
81
|
+
[handler = std::move(handler)](auto&& resp) mutable {
|
82
|
+
if (resp.ctx.ec()) {
|
83
|
+
return handler(std::move(resp.ctx), mutation_result{});
|
84
|
+
}
|
85
|
+
return handler(std::move(resp.ctx), mutation_result{ resp.cas, std::move(resp.token) });
|
86
|
+
});
|
87
|
+
}
|
88
|
+
|
89
|
+
core::operations::append_request request{
|
90
|
+
id, std::move(data), {}, {}, durability_level::none, options.timeout, { options.retry_strategy },
|
91
|
+
};
|
92
|
+
return core_.execute(
|
93
|
+
std::move(request), [core = core_, id = std::move(id), options, handler = std::move(handler)](auto&& resp) mutable {
|
94
|
+
if (resp.ctx.ec()) {
|
95
|
+
return handler(std::move(resp.ctx), mutation_result{ resp.cas, std::move(resp.token) });
|
96
|
+
}
|
97
|
+
|
98
|
+
auto token = resp.token;
|
99
|
+
core::impl::initiate_observe_poll(core,
|
100
|
+
std::move(id),
|
101
|
+
token,
|
102
|
+
options.timeout,
|
103
|
+
options.persist_to,
|
104
|
+
options.replicate_to,
|
105
|
+
[resp = std::move(resp), handler = std::move(handler)](std::error_code ec) mutable {
|
106
|
+
if (ec) {
|
107
|
+
resp.ctx.override_ec(ec);
|
108
|
+
return handler(std::move(resp.ctx), mutation_result{});
|
109
|
+
}
|
110
|
+
return handler(std::move(resp.ctx), mutation_result{ resp.cas, std::move(resp.token) });
|
111
|
+
});
|
112
|
+
});
|
113
|
+
}
|
114
|
+
|
115
|
+
void prepend(std::string document_key, std::vector<std::byte> data, prepend_options::built options, prepend_handler&& handler) const
|
116
|
+
{
|
117
|
+
auto id = core::document_id{
|
118
|
+
bucket_name_,
|
119
|
+
scope_name_,
|
120
|
+
name_,
|
121
|
+
std::move(document_key),
|
122
|
+
};
|
123
|
+
if (options.persist_to == persist_to::none && options.replicate_to == replicate_to::none) {
|
124
|
+
return core_.execute(
|
125
|
+
core::operations::prepend_request{
|
126
|
+
std::move(id),
|
127
|
+
std::move(data),
|
128
|
+
{},
|
129
|
+
{},
|
130
|
+
options.durability_level,
|
131
|
+
options.timeout,
|
132
|
+
{ options.retry_strategy },
|
133
|
+
},
|
134
|
+
[handler = std::move(handler)](auto&& resp) mutable {
|
135
|
+
if (resp.ctx.ec()) {
|
136
|
+
return handler(std::move(resp.ctx), mutation_result{});
|
137
|
+
}
|
138
|
+
return handler(std::move(resp.ctx), mutation_result{ resp.cas, std::move(resp.token) });
|
139
|
+
});
|
140
|
+
}
|
141
|
+
|
142
|
+
core::operations::prepend_request request{
|
143
|
+
id, std::move(data), {}, {}, durability_level::none, options.timeout, { options.retry_strategy },
|
144
|
+
};
|
145
|
+
return core_.execute(
|
146
|
+
std::move(request), [core = core_, id = std::move(id), options, handler = std::move(handler)](auto&& resp) mutable {
|
147
|
+
if (resp.ctx.ec()) {
|
148
|
+
return handler(std::move(resp.ctx), mutation_result{ resp.cas, std::move(resp.token) });
|
149
|
+
}
|
150
|
+
|
151
|
+
auto token = resp.token;
|
152
|
+
core::impl::initiate_observe_poll(core,
|
153
|
+
std::move(id),
|
154
|
+
token,
|
155
|
+
options.timeout,
|
156
|
+
options.persist_to,
|
157
|
+
options.replicate_to,
|
158
|
+
[resp = std::move(resp), handler = std::move(handler)](std::error_code ec) mutable {
|
159
|
+
if (ec) {
|
160
|
+
resp.ctx.override_ec(ec);
|
161
|
+
return handler(std::move(resp.ctx), mutation_result{});
|
162
|
+
}
|
163
|
+
return handler(std::move(resp.ctx), mutation_result{ resp.cas, std::move(resp.token) });
|
164
|
+
});
|
165
|
+
});
|
166
|
+
}
|
167
|
+
|
168
|
+
void decrement(std::string document_key, decrement_options::built options, decrement_handler&& handler) const
|
169
|
+
{
|
170
|
+
auto id = core::document_id{
|
171
|
+
bucket_name_,
|
172
|
+
scope_name_,
|
173
|
+
name_,
|
174
|
+
std::move(document_key),
|
175
|
+
};
|
176
|
+
if (options.persist_to == persist_to::none && options.replicate_to == replicate_to::none) {
|
177
|
+
return core_.execute(
|
178
|
+
core::operations::decrement_request{
|
179
|
+
std::move(id),
|
180
|
+
{},
|
181
|
+
{},
|
182
|
+
options.expiry,
|
183
|
+
options.delta,
|
184
|
+
options.initial_value,
|
185
|
+
options.durability_level,
|
186
|
+
options.timeout,
|
187
|
+
{ options.retry_strategy },
|
188
|
+
},
|
189
|
+
[handler = std::move(handler)](auto&& resp) mutable {
|
190
|
+
if (resp.ctx.ec()) {
|
191
|
+
return handler(std::move(resp.ctx), counter_result{});
|
192
|
+
}
|
193
|
+
return handler(std::move(resp.ctx), counter_result{ resp.cas, std::move(resp.token), resp.content });
|
194
|
+
});
|
195
|
+
}
|
196
|
+
|
197
|
+
core::operations::decrement_request request{
|
198
|
+
id,
|
199
|
+
{},
|
200
|
+
{},
|
201
|
+
options.expiry,
|
202
|
+
options.delta,
|
203
|
+
options.initial_value,
|
204
|
+
durability_level::none,
|
205
|
+
options.timeout,
|
206
|
+
{ options.retry_strategy },
|
207
|
+
};
|
208
|
+
return core_.execute(std::move(request),
|
209
|
+
[core = core_, id = std::move(id), options, handler = std::move(handler)](auto&& resp) mutable {
|
210
|
+
if (resp.ctx.ec()) {
|
211
|
+
return handler(std::move(resp.ctx), counter_result{ resp.cas, std::move(resp.token), resp.content });
|
212
|
+
}
|
213
|
+
|
214
|
+
auto token = resp.token;
|
215
|
+
core::impl::initiate_observe_poll(
|
216
|
+
core,
|
217
|
+
std::move(id),
|
218
|
+
token,
|
219
|
+
options.timeout,
|
220
|
+
options.persist_to,
|
221
|
+
options.replicate_to,
|
222
|
+
[resp = std::move(resp), handler = std::move(handler)](std::error_code ec) mutable {
|
223
|
+
if (ec) {
|
224
|
+
resp.ctx.override_ec(ec);
|
225
|
+
return handler(std::move(resp.ctx), counter_result{});
|
226
|
+
}
|
227
|
+
return handler(std::move(resp.ctx), counter_result{ resp.cas, std::move(resp.token), resp.content });
|
228
|
+
});
|
229
|
+
});
|
230
|
+
}
|
231
|
+
|
232
|
+
void increment(std::string document_key, increment_options::built options, increment_handler&& handler) const
|
233
|
+
{
|
234
|
+
auto id = core::document_id{
|
235
|
+
bucket_name_,
|
236
|
+
scope_name_,
|
237
|
+
name_,
|
238
|
+
std::move(document_key),
|
239
|
+
};
|
240
|
+
if (options.persist_to == persist_to::none && options.replicate_to == replicate_to::none) {
|
241
|
+
return core_.execute(
|
242
|
+
core::operations::increment_request{
|
243
|
+
std::move(id),
|
244
|
+
{},
|
245
|
+
{},
|
246
|
+
options.expiry,
|
247
|
+
options.delta,
|
248
|
+
options.initial_value,
|
249
|
+
options.durability_level,
|
250
|
+
options.timeout,
|
251
|
+
{ options.retry_strategy },
|
252
|
+
},
|
253
|
+
[handler = std::move(handler)](auto&& resp) mutable {
|
254
|
+
if (resp.ctx.ec()) {
|
255
|
+
return handler(std::move(resp.ctx), counter_result{});
|
256
|
+
}
|
257
|
+
return handler(std::move(resp.ctx), counter_result{ resp.cas, std::move(resp.token), resp.content });
|
258
|
+
});
|
259
|
+
}
|
260
|
+
|
261
|
+
core::operations::increment_request request{
|
262
|
+
id,
|
263
|
+
{},
|
264
|
+
{},
|
265
|
+
options.expiry,
|
266
|
+
options.delta,
|
267
|
+
options.initial_value,
|
268
|
+
durability_level::none,
|
269
|
+
options.timeout,
|
270
|
+
{ options.retry_strategy },
|
271
|
+
};
|
272
|
+
return core_.execute(std::move(request),
|
273
|
+
[core = core_, id = std::move(id), options, handler = std::move(handler)](auto&& resp) mutable {
|
274
|
+
if (resp.ctx.ec()) {
|
275
|
+
return handler(std::move(resp.ctx), counter_result{ resp.cas, std::move(resp.token), resp.content });
|
276
|
+
}
|
277
|
+
|
278
|
+
auto token = resp.token;
|
279
|
+
core::impl::initiate_observe_poll(
|
280
|
+
core,
|
281
|
+
std::move(id),
|
282
|
+
token,
|
283
|
+
options.timeout,
|
284
|
+
options.persist_to,
|
285
|
+
options.replicate_to,
|
286
|
+
[resp = std::move(resp), handler = std::move(handler)](std::error_code ec) mutable {
|
287
|
+
if (ec) {
|
288
|
+
resp.ctx.override_ec(ec);
|
289
|
+
return handler(std::move(resp.ctx), counter_result{});
|
290
|
+
}
|
291
|
+
return handler(std::move(resp.ctx), counter_result{ resp.cas, std::move(resp.token), resp.content });
|
292
|
+
});
|
293
|
+
});
|
294
|
+
}
|
295
|
+
|
296
|
+
private:
|
297
|
+
core::cluster core_;
|
298
|
+
std::string bucket_name_;
|
299
|
+
std::string scope_name_;
|
300
|
+
std::string name_;
|
301
|
+
};
|
302
|
+
|
303
|
+
binary_collection::binary_collection(core::cluster core, std::string_view bucket_name, std::string_view scope_name, std::string_view name)
|
304
|
+
: impl_(std::make_shared<binary_collection_impl>(std::move(core), bucket_name, scope_name, name))
|
305
|
+
{
|
306
|
+
}
|
307
|
+
|
308
|
+
auto
|
309
|
+
binary_collection::bucket_name() const -> const std::string&
|
310
|
+
{
|
311
|
+
return impl_->bucket_name();
|
312
|
+
}
|
313
|
+
|
314
|
+
auto
|
315
|
+
binary_collection::scope_name() const -> const std::string&
|
316
|
+
{
|
317
|
+
return impl_->scope_name();
|
318
|
+
}
|
319
|
+
|
320
|
+
auto
|
321
|
+
binary_collection::name() const -> const std::string&
|
322
|
+
{
|
323
|
+
return impl_->name();
|
324
|
+
}
|
325
|
+
|
326
|
+
void
|
327
|
+
binary_collection::append(std::string document_id,
|
328
|
+
std::vector<std::byte> data,
|
329
|
+
const append_options& options,
|
330
|
+
append_handler&& handler) const
|
331
|
+
{
|
332
|
+
return impl_->append(std::move(document_id), std::move(data), options.build(), std::move(handler));
|
333
|
+
}
|
334
|
+
|
335
|
+
auto
|
336
|
+
binary_collection::append(std::string document_id, std::vector<std::byte> data, const append_options& options) const
|
337
|
+
-> std::future<std::pair<key_value_error_context, mutation_result>>
|
338
|
+
{
|
339
|
+
auto barrier = std::make_shared<std::promise<std::pair<key_value_error_context, mutation_result>>>();
|
340
|
+
auto future = barrier->get_future();
|
341
|
+
append(std::move(document_id), std::move(data), options, [barrier](auto ctx, auto result) {
|
342
|
+
barrier->set_value({ std::move(ctx), std::move(result) });
|
343
|
+
});
|
344
|
+
return future;
|
345
|
+
}
|
346
|
+
|
347
|
+
void
|
348
|
+
binary_collection::prepend(std::string document_id,
|
349
|
+
std::vector<std::byte> data,
|
350
|
+
const prepend_options& options,
|
351
|
+
prepend_handler&& handler) const
|
352
|
+
{
|
353
|
+
return impl_->prepend(std::move(document_id), std::move(data), options.build(), std::move(handler));
|
354
|
+
}
|
355
|
+
|
356
|
+
auto
|
357
|
+
binary_collection::prepend(std::string document_id, std::vector<std::byte> data, const prepend_options& options) const
|
358
|
+
-> std::future<std::pair<key_value_error_context, mutation_result>>
|
359
|
+
{
|
360
|
+
auto barrier = std::make_shared<std::promise<std::pair<key_value_error_context, mutation_result>>>();
|
361
|
+
auto future = barrier->get_future();
|
362
|
+
prepend(std::move(document_id), std::move(data), options, [barrier](auto ctx, auto result) {
|
363
|
+
barrier->set_value({ std::move(ctx), std::move(result) });
|
364
|
+
});
|
365
|
+
return future;
|
366
|
+
}
|
367
|
+
|
368
|
+
void
|
369
|
+
binary_collection::increment(std::string document_id, const increment_options& options, increment_handler&& handler) const
|
370
|
+
{
|
371
|
+
return impl_->increment(std::move(document_id), options.build(), std::move(handler));
|
372
|
+
}
|
373
|
+
|
374
|
+
auto
|
375
|
+
binary_collection::increment(std::string document_id, const increment_options& options) const
|
376
|
+
-> std::future<std::pair<key_value_error_context, counter_result>>
|
377
|
+
{
|
378
|
+
auto barrier = std::make_shared<std::promise<std::pair<key_value_error_context, counter_result>>>();
|
379
|
+
auto future = barrier->get_future();
|
380
|
+
increment(std::move(document_id), options, [barrier](auto ctx, auto result) {
|
381
|
+
barrier->set_value({ std::move(ctx), std::move(result) });
|
382
|
+
});
|
383
|
+
return future;
|
384
|
+
}
|
385
|
+
|
386
|
+
void
|
387
|
+
binary_collection::decrement(std::string document_id, const decrement_options& options, decrement_handler&& handler) const
|
388
|
+
{
|
389
|
+
return impl_->decrement(std::move(document_id), options.build(), std::move(handler));
|
390
|
+
}
|
391
|
+
|
392
|
+
auto
|
393
|
+
binary_collection::decrement(std::string document_id, const decrement_options& options) const
|
394
|
+
-> std::future<std::pair<key_value_error_context, counter_result>>
|
395
|
+
{
|
396
|
+
auto barrier = std::make_shared<std::promise<std::pair<key_value_error_context, counter_result>>>();
|
397
|
+
auto future = barrier->get_future();
|
398
|
+
decrement(std::move(document_id), options, [barrier](auto ctx, auto result) {
|
399
|
+
barrier->set_value({ std::move(ctx), std::move(result) });
|
400
|
+
});
|
401
|
+
return future;
|
402
|
+
}
|
403
|
+
} // namespace couchbase
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2023-Present Couchbase, Inc.
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
|
18
|
+
#include "core/cluster.hxx"
|
19
|
+
|
20
|
+
#include <couchbase/bucket.hxx>
|
21
|
+
|
22
|
+
#include <memory>
|
23
|
+
|
24
|
+
namespace couchbase
|
25
|
+
{
|
26
|
+
class bucket_impl : public std::enable_shared_from_this<bucket_impl>
|
27
|
+
{
|
28
|
+
public:
|
29
|
+
bucket_impl(core::cluster core, std::string_view name)
|
30
|
+
: core_{ std::move(core) }
|
31
|
+
, name_{ name }
|
32
|
+
{
|
33
|
+
}
|
34
|
+
|
35
|
+
[[nodiscard]] auto name() const -> const std::string&
|
36
|
+
{
|
37
|
+
return name_;
|
38
|
+
}
|
39
|
+
|
40
|
+
[[nodiscard]] auto core() const -> const core::cluster&
|
41
|
+
{
|
42
|
+
return core_;
|
43
|
+
}
|
44
|
+
|
45
|
+
private:
|
46
|
+
core::cluster core_;
|
47
|
+
std::string name_;
|
48
|
+
};
|
49
|
+
|
50
|
+
bucket::bucket(core::cluster core, std::string_view name)
|
51
|
+
: impl_(std::make_shared<bucket_impl>(std::move(core), name))
|
52
|
+
{
|
53
|
+
}
|
54
|
+
|
55
|
+
auto
|
56
|
+
bucket::default_scope() const -> couchbase::scope
|
57
|
+
{
|
58
|
+
return { impl_->core(), impl_->name(), scope::default_name };
|
59
|
+
}
|
60
|
+
|
61
|
+
auto
|
62
|
+
bucket::default_collection() const -> couchbase::collection
|
63
|
+
{
|
64
|
+
return { impl_->core(), impl_->name(), scope::default_name, collection::default_name };
|
65
|
+
}
|
66
|
+
|
67
|
+
auto
|
68
|
+
bucket::scope(std::string_view scope_name) const -> couchbase::scope
|
69
|
+
{
|
70
|
+
return { impl_->core(), impl_->name(), scope_name };
|
71
|
+
}
|
72
|
+
|
73
|
+
auto
|
74
|
+
bucket::collections() const -> collection_manager
|
75
|
+
{
|
76
|
+
return { impl_->core(), impl_->name() };
|
77
|
+
}
|
78
|
+
} // namespace couchbase
|