couchbase 4.3.1 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1091) hide show
  1. package/deps/couchbase-cxx-client/CMakeLists.txt +16 -9
  2. package/deps/couchbase-cxx-client/README.md +39 -44
  3. package/deps/couchbase-cxx-client/cmake/0001-fix-build-for-mingw-w64-ucrt-x86_64-toolchain.patch +3 -4
  4. package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +2 -1
  5. package/deps/couchbase-cxx-client/cmake/Packaging.cmake +41 -0
  6. package/deps/couchbase-cxx-client/cmake/Sanitizers.cmake +1 -0
  7. package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +5 -5
  8. package/deps/couchbase-cxx-client/cmake/build_version.hxx.in +1 -0
  9. package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.pc.in +10 -0
  10. package/deps/couchbase-cxx-client/cmake/test_boringssl.cxx +1 -1
  11. package/deps/couchbase-cxx-client/cmake/test_openssl.cxx +1 -1
  12. package/deps/couchbase-cxx-client/core/agent.cxx +353 -304
  13. package/deps/couchbase-cxx-client/core/agent.hxx +94 -76
  14. package/deps/couchbase-cxx-client/core/agent_config.cxx +9 -8
  15. package/deps/couchbase-cxx-client/core/agent_config.hxx +7 -7
  16. package/deps/couchbase-cxx-client/core/agent_group.cxx +132 -120
  17. package/deps/couchbase-cxx-client/core/agent_group.hxx +26 -22
  18. package/deps/couchbase-cxx-client/core/agent_group_config.cxx +8 -7
  19. package/deps/couchbase-cxx-client/core/agent_group_config.hxx +6 -6
  20. package/deps/couchbase-cxx-client/core/agent_unit_test_api.hxx +6 -6
  21. package/deps/couchbase-cxx-client/core/analytics_query_options.cxx +21 -21
  22. package/deps/couchbase-cxx-client/core/analytics_query_options.hxx +19 -18
  23. package/deps/couchbase-cxx-client/core/analytics_scan_consistency.hxx +2 -2
  24. package/deps/couchbase-cxx-client/core/bucket.cxx +848 -776
  25. package/deps/couchbase-cxx-client/core/bucket.hxx +151 -139
  26. package/deps/couchbase-cxx-client/core/capella_ca.hxx +20 -19
  27. package/deps/couchbase-cxx-client/core/cluster.cxx +1240 -927
  28. package/deps/couchbase-cxx-client/core/cluster.hxx +254 -167
  29. package/deps/couchbase-cxx-client/core/cluster_agent.cxx +7 -7
  30. package/deps/couchbase-cxx-client/core/cluster_agent.hxx +4 -4
  31. package/deps/couchbase-cxx-client/core/cluster_agent_config.cxx +8 -7
  32. package/deps/couchbase-cxx-client/core/cluster_agent_config.hxx +6 -6
  33. package/deps/couchbase-cxx-client/core/cluster_options.cxx +17 -17
  34. package/deps/couchbase-cxx-client/core/cluster_options.hxx +50 -47
  35. package/deps/couchbase-cxx-client/core/cluster_state.hxx +3 -3
  36. package/deps/couchbase-cxx-client/core/collection_id_cache_entry.hxx +5 -4
  37. package/deps/couchbase-cxx-client/core/collections_component.cxx +372 -329
  38. package/deps/couchbase-cxx-client/core/collections_component.hxx +17 -13
  39. package/deps/couchbase-cxx-client/core/collections_component_unit_test_api.hxx +6 -6
  40. package/deps/couchbase-cxx-client/core/collections_options.hxx +29 -27
  41. package/deps/couchbase-cxx-client/core/config_listener.hxx +3 -3
  42. package/deps/couchbase-cxx-client/core/config_profile.hxx +3 -3
  43. package/deps/couchbase-cxx-client/core/config_profiles.cxx +31 -31
  44. package/deps/couchbase-cxx-client/core/config_profiles.hxx +19 -19
  45. package/deps/couchbase-cxx-client/core/core_sdk_shim.cxx +2 -1
  46. package/deps/couchbase-cxx-client/core/core_sdk_shim.hxx +2 -2
  47. package/deps/couchbase-cxx-client/core/crud_component.cxx +310 -276
  48. package/deps/couchbase-cxx-client/core/crud_component.hxx +21 -15
  49. package/deps/couchbase-cxx-client/core/crud_options.hxx +361 -354
  50. package/deps/couchbase-cxx-client/core/crypto/cbcrypto.cc +732 -627
  51. package/deps/couchbase-cxx-client/core/crypto/cbcrypto.h +12 -3
  52. package/deps/couchbase-cxx-client/core/design_document_namespace.hxx +2 -2
  53. package/deps/couchbase-cxx-client/core/design_document_namespace_fmt.hxx +18 -18
  54. package/deps/couchbase-cxx-client/core/diagnostics.hxx +44 -44
  55. package/deps/couchbase-cxx-client/core/diagnostics_fmt.hxx +76 -76
  56. package/deps/couchbase-cxx-client/core/diagnostics_json.hxx +61 -60
  57. package/deps/couchbase-cxx-client/core/diagntostics_options.hxx +14 -14
  58. package/deps/couchbase-cxx-client/core/dispatcher.cxx +4 -3
  59. package/deps/couchbase-cxx-client/core/dispatcher.hxx +8 -7
  60. package/deps/couchbase-cxx-client/core/document_id.cxx +37 -34
  61. package/deps/couchbase-cxx-client/core/document_id.hxx +87 -86
  62. package/deps/couchbase-cxx-client/core/document_id_fmt.hxx +10 -10
  63. package/deps/couchbase-cxx-client/core/durability_options.hxx +50 -49
  64. package/deps/couchbase-cxx-client/core/error_context/analytics.hxx +18 -18
  65. package/deps/couchbase-cxx-client/core/error_context/analytics_json.hxx +115 -0
  66. package/deps/couchbase-cxx-client/core/error_context/base_error_context.hxx +184 -0
  67. package/deps/couchbase-cxx-client/core/error_context/http.hxx +14 -14
  68. package/deps/couchbase-cxx-client/core/error_context/http_json.hxx +90 -0
  69. package/deps/couchbase-cxx-client/core/error_context/internal_tof_metadata_json.hxx +36 -0
  70. package/deps/couchbase-cxx-client/core/error_context/key_value.cxx +27 -27
  71. package/deps/couchbase-cxx-client/core/error_context/key_value.hxx +41 -38
  72. package/deps/couchbase-cxx-client/core/error_context/key_value_error_context.hxx +235 -0
  73. package/deps/couchbase-cxx-client/core/error_context/key_value_error_map_attribute.hxx +142 -0
  74. package/deps/couchbase-cxx-client/core/error_context/key_value_error_map_info.hxx +139 -0
  75. package/deps/couchbase-cxx-client/core/error_context/key_value_extended_error_info.hxx +86 -0
  76. package/deps/couchbase-cxx-client/core/error_context/key_value_json.hxx +83 -0
  77. package/deps/couchbase-cxx-client/core/error_context/key_value_status_code.hxx +109 -0
  78. package/deps/couchbase-cxx-client/core/error_context/query.hxx +18 -18
  79. package/deps/couchbase-cxx-client/core/error_context/query_error_context.hxx +150 -0
  80. package/deps/couchbase-cxx-client/core/error_context/query_json.hxx +114 -0
  81. package/deps/couchbase-cxx-client/core/error_context/query_public_json.hxx +84 -0
  82. package/deps/couchbase-cxx-client/core/error_context/search.hxx +17 -17
  83. package/deps/couchbase-cxx-client/core/error_context/search_json.hxx +101 -0
  84. package/deps/couchbase-cxx-client/core/error_context/subdocument_error_context.hxx +147 -0
  85. package/deps/couchbase-cxx-client/core/error_context/subdocument_json.hxx +48 -0
  86. package/deps/couchbase-cxx-client/{couchbase → core/error_context}/transaction_error_context.hxx +22 -22
  87. package/deps/couchbase-cxx-client/core/error_context/transaction_op_error_context.hxx +79 -0
  88. package/deps/couchbase-cxx-client/core/error_context/view.hxx +17 -17
  89. package/deps/couchbase-cxx-client/core/fmt/key_value_error_map_attribute.hxx +100 -0
  90. package/deps/couchbase-cxx-client/{couchbase → core}/fmt/key_value_extended_error_info.hxx +20 -20
  91. package/deps/couchbase-cxx-client/core/fmt/key_value_status_code.hxx +269 -0
  92. package/deps/couchbase-cxx-client/core/free_form_http_request.cxx +26 -26
  93. package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +34 -33
  94. package/deps/couchbase-cxx-client/core/impl/analytics.cxx +111 -131
  95. package/deps/couchbase-cxx-client/core/impl/analytics.hxx +5 -7
  96. package/deps/couchbase-cxx-client/core/impl/analytics_error_category.cxx +29 -28
  97. package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +615 -516
  98. package/deps/couchbase-cxx-client/core/impl/best_effort_retry_strategy.cxx +53 -50
  99. package/deps/couchbase-cxx-client/core/impl/binary_collection.cxx +346 -285
  100. package/deps/couchbase-cxx-client/core/impl/boolean_field_query.cxx +10 -10
  101. package/deps/couchbase-cxx-client/core/impl/boolean_query.cxx +27 -27
  102. package/deps/couchbase-cxx-client/core/impl/bootstrap_state_listener.hxx +6 -6
  103. package/deps/couchbase-cxx-client/core/impl/bucket.cxx +39 -34
  104. package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +354 -313
  105. package/deps/couchbase-cxx-client/core/impl/cluster.cxx +430 -325
  106. package/deps/couchbase-cxx-client/core/impl/collection.cxx +1033 -1187
  107. package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +201 -170
  108. package/deps/couchbase-cxx-client/core/impl/common_error_category.cxx +58 -55
  109. package/deps/couchbase-cxx-client/core/impl/configuration_profiles_registry.cxx +46 -32
  110. package/deps/couchbase-cxx-client/core/impl/conjunction_query.cxx +17 -17
  111. package/deps/couchbase-cxx-client/core/impl/date_range.cxx +24 -20
  112. package/deps/couchbase-cxx-client/core/impl/date_range_facet.cxx +22 -22
  113. package/deps/couchbase-cxx-client/core/impl/date_range_facet_result.cxx +6 -6
  114. package/deps/couchbase-cxx-client/core/impl/date_range_query.cxx +50 -48
  115. package/deps/couchbase-cxx-client/core/impl/diagnostics.cxx +211 -198
  116. package/deps/couchbase-cxx-client/core/impl/diagnostics.hxx +7 -6
  117. package/deps/couchbase-cxx-client/core/impl/disjunction_query.cxx +18 -17
  118. package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +92 -75
  119. package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.hxx +24 -20
  120. package/deps/couchbase-cxx-client/core/impl/doc_id_query.cxx +9 -9
  121. package/deps/couchbase-cxx-client/core/impl/encoded_search_facet.hxx +2 -2
  122. package/deps/couchbase-cxx-client/core/impl/encoded_search_query.hxx +2 -2
  123. package/deps/couchbase-cxx-client/core/impl/encoded_search_sort.hxx +2 -2
  124. package/deps/couchbase-cxx-client/core/impl/error.cxx +171 -0
  125. package/deps/couchbase-cxx-client/core/impl/error.hxx +64 -0
  126. package/deps/couchbase-cxx-client/core/impl/error_context.cxx +56 -0
  127. package/deps/couchbase-cxx-client/core/impl/expiry.cxx +66 -53
  128. package/deps/couchbase-cxx-client/core/impl/fail_fast_retry_strategy.cxx +5 -4
  129. package/deps/couchbase-cxx-client/core/impl/field_level_encryption_error_category.cxx +30 -28
  130. package/deps/couchbase-cxx-client/core/impl/geo_bounding_box_query.cxx +17 -17
  131. package/deps/couchbase-cxx-client/core/impl/geo_distance_query.cxx +14 -14
  132. package/deps/couchbase-cxx-client/core/impl/geo_polygon_query.cxx +17 -17
  133. package/deps/couchbase-cxx-client/core/impl/get_all_replicas.hxx +26 -22
  134. package/deps/couchbase-cxx-client/core/impl/get_any_replica.hxx +25 -23
  135. package/deps/couchbase-cxx-client/core/impl/get_replica.cxx +18 -15
  136. package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +23 -18
  137. package/deps/couchbase-cxx-client/core/impl/internal_date_range_facet_result.cxx +16 -14
  138. package/deps/couchbase-cxx-client/core/impl/internal_date_range_facet_result.hxx +16 -15
  139. package/deps/couchbase-cxx-client/core/impl/internal_error_context.cxx +79 -0
  140. package/deps/couchbase-cxx-client/core/impl/internal_error_context.hxx +52 -0
  141. package/deps/couchbase-cxx-client/core/impl/internal_numeric_range_facet_result.cxx +18 -15
  142. package/deps/couchbase-cxx-client/core/impl/internal_numeric_range_facet_result.hxx +16 -15
  143. package/deps/couchbase-cxx-client/core/impl/internal_scan_result.hxx +7 -7
  144. package/deps/couchbase-cxx-client/core/impl/internal_search_error_context.cxx +25 -22
  145. package/deps/couchbase-cxx-client/core/impl/internal_search_error_context.hxx +32 -31
  146. package/deps/couchbase-cxx-client/core/impl/internal_search_meta_data.cxx +15 -13
  147. package/deps/couchbase-cxx-client/core/impl/internal_search_meta_data.hxx +10 -9
  148. package/deps/couchbase-cxx-client/core/impl/internal_search_result.cxx +30 -22
  149. package/deps/couchbase-cxx-client/core/impl/internal_search_result.hxx +10 -9
  150. package/deps/couchbase-cxx-client/core/impl/internal_search_row.cxx +10 -10
  151. package/deps/couchbase-cxx-client/core/impl/internal_search_row.hxx +16 -16
  152. package/deps/couchbase-cxx-client/core/impl/internal_search_row_location.hxx +2 -2
  153. package/deps/couchbase-cxx-client/core/impl/internal_search_row_locations.cxx +68 -65
  154. package/deps/couchbase-cxx-client/core/impl/internal_search_row_locations.hxx +16 -13
  155. package/deps/couchbase-cxx-client/core/impl/internal_term_facet_result.cxx +16 -14
  156. package/deps/couchbase-cxx-client/core/impl/internal_term_facet_result.hxx +15 -15
  157. package/deps/couchbase-cxx-client/core/impl/key_value_error_category.cxx +73 -72
  158. package/deps/couchbase-cxx-client/core/impl/key_value_error_context.cxx +65 -65
  159. package/deps/couchbase-cxx-client/core/impl/logger.cxx +91 -0
  160. package/deps/couchbase-cxx-client/core/impl/lookup_in_all_replicas.hxx +32 -29
  161. package/deps/couchbase-cxx-client/core/impl/lookup_in_any_replica.hxx +33 -29
  162. package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.cxx +75 -68
  163. package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +30 -26
  164. package/deps/couchbase-cxx-client/core/impl/management_error_category.cxx +41 -40
  165. package/deps/couchbase-cxx-client/core/impl/match_all_query.cxx +6 -6
  166. package/deps/couchbase-cxx-client/core/impl/match_none_query.cxx +6 -6
  167. package/deps/couchbase-cxx-client/core/impl/match_phrase_query.cxx +13 -13
  168. package/deps/couchbase-cxx-client/core/impl/match_query.cxx +28 -28
  169. package/deps/couchbase-cxx-client/core/impl/network_error_category.cxx +39 -38
  170. package/deps/couchbase-cxx-client/core/impl/numeric_range.cxx +6 -6
  171. package/deps/couchbase-cxx-client/core/impl/numeric_range_facet.cxx +22 -22
  172. package/deps/couchbase-cxx-client/core/impl/numeric_range_facet_result.cxx +6 -6
  173. package/deps/couchbase-cxx-client/core/impl/numeric_range_query.cxx +22 -22
  174. package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +294 -277
  175. package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -1
  176. package/deps/couchbase-cxx-client/core/impl/observe_seqno.cxx +21 -18
  177. package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +31 -26
  178. package/deps/couchbase-cxx-client/core/impl/phrase_query.cxx +10 -10
  179. package/deps/couchbase-cxx-client/core/impl/prefix_query.cxx +10 -10
  180. package/deps/couchbase-cxx-client/core/impl/query.cxx +163 -154
  181. package/deps/couchbase-cxx-client/core/impl/query.hxx +6 -7
  182. package/deps/couchbase-cxx-client/core/impl/query_error_category.cxx +22 -21
  183. package/deps/couchbase-cxx-client/core/impl/query_error_context.cxx +45 -45
  184. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +488 -408
  185. package/deps/couchbase-cxx-client/core/impl/query_string_query.cxx +7 -7
  186. package/deps/couchbase-cxx-client/core/impl/regexp_query.cxx +10 -10
  187. package/deps/couchbase-cxx-client/core/impl/replica_utils.cxx +66 -0
  188. package/deps/couchbase-cxx-client/core/impl/replica_utils.hxx +48 -0
  189. package/deps/couchbase-cxx-client/core/impl/retry_action.cxx +3 -3
  190. package/deps/couchbase-cxx-client/core/impl/retry_reason.cxx +129 -56
  191. package/deps/couchbase-cxx-client/core/impl/retry_reason.hxx +28 -0
  192. package/deps/couchbase-cxx-client/core/impl/scan_result.cxx +53 -49
  193. package/deps/couchbase-cxx-client/core/impl/scope.cxx +103 -94
  194. package/deps/couchbase-cxx-client/core/impl/search.cxx +139 -130
  195. package/deps/couchbase-cxx-client/core/impl/search.hxx +4 -4
  196. package/deps/couchbase-cxx-client/core/impl/search_error_category.cxx +18 -17
  197. package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +492 -390
  198. package/deps/couchbase-cxx-client/core/impl/search_meta_data.cxx +3 -3
  199. package/deps/couchbase-cxx-client/core/impl/search_request.cxx +78 -78
  200. package/deps/couchbase-cxx-client/core/impl/search_result.cxx +5 -5
  201. package/deps/couchbase-cxx-client/core/impl/search_row.cxx +7 -7
  202. package/deps/couchbase-cxx-client/core/impl/search_row_location.cxx +9 -8
  203. package/deps/couchbase-cxx-client/core/impl/search_row_locations.cxx +8 -7
  204. package/deps/couchbase-cxx-client/core/impl/search_sort_field.cxx +53 -53
  205. package/deps/couchbase-cxx-client/core/impl/search_sort_geo_distance.cxx +49 -48
  206. package/deps/couchbase-cxx-client/core/impl/search_sort_id.cxx +10 -10
  207. package/deps/couchbase-cxx-client/core/impl/search_sort_score.cxx +10 -10
  208. package/deps/couchbase-cxx-client/core/impl/streaming_json_lexer_error_category.cxx +70 -68
  209. package/deps/couchbase-cxx-client/core/impl/subdoc/array_add_unique.cxx +6 -6
  210. package/deps/couchbase-cxx-client/core/impl/subdoc/array_append.cxx +6 -6
  211. package/deps/couchbase-cxx-client/core/impl/subdoc/array_insert.cxx +6 -6
  212. package/deps/couchbase-cxx-client/core/impl/subdoc/array_prepend.cxx +6 -6
  213. package/deps/couchbase-cxx-client/core/impl/subdoc/command.hxx +5 -5
  214. package/deps/couchbase-cxx-client/core/impl/subdoc/command_bundle.hxx +11 -11
  215. package/deps/couchbase-cxx-client/core/impl/subdoc/count.cxx +6 -6
  216. package/deps/couchbase-cxx-client/core/impl/subdoc/counter.cxx +6 -6
  217. package/deps/couchbase-cxx-client/core/impl/subdoc/exists.cxx +6 -6
  218. package/deps/couchbase-cxx-client/core/impl/subdoc/get.cxx +6 -6
  219. package/deps/couchbase-cxx-client/core/impl/subdoc/insert.cxx +6 -6
  220. package/deps/couchbase-cxx-client/core/impl/subdoc/join_values.cxx +25 -25
  221. package/deps/couchbase-cxx-client/core/impl/subdoc/lookup_in_macro.cxx +61 -60
  222. package/deps/couchbase-cxx-client/core/impl/subdoc/lookup_in_specs.cxx +9 -9
  223. package/deps/couchbase-cxx-client/core/impl/subdoc/mutate_in_macro.cxx +48 -39
  224. package/deps/couchbase-cxx-client/core/impl/subdoc/mutate_in_specs.cxx +9 -9
  225. package/deps/couchbase-cxx-client/core/impl/subdoc/opcode.hxx +16 -16
  226. package/deps/couchbase-cxx-client/core/impl/subdoc/path_flags.hxx +40 -17
  227. package/deps/couchbase-cxx-client/core/impl/subdoc/remove.cxx +6 -6
  228. package/deps/couchbase-cxx-client/core/impl/subdoc/replace.cxx +6 -6
  229. package/deps/couchbase-cxx-client/core/impl/subdoc/upsert.cxx +6 -6
  230. package/deps/couchbase-cxx-client/core/impl/term_facet.cxx +8 -8
  231. package/deps/couchbase-cxx-client/core/impl/term_facet_result.cxx +6 -6
  232. package/deps/couchbase-cxx-client/core/impl/term_query.cxx +25 -25
  233. package/deps/couchbase-cxx-client/core/impl/term_range_query.cxx +22 -22
  234. package/deps/couchbase-cxx-client/core/impl/transaction_error_category.cxx +21 -20
  235. package/deps/couchbase-cxx-client/core/impl/transaction_get_result.cxx +41 -30
  236. package/deps/couchbase-cxx-client/core/impl/transaction_op_error_category.cxx +55 -56
  237. package/deps/couchbase-cxx-client/core/impl/vector_query.cxx +15 -10
  238. package/deps/couchbase-cxx-client/core/impl/vector_search.cxx +9 -9
  239. package/deps/couchbase-cxx-client/core/impl/view_error_category.cxx +17 -16
  240. package/deps/couchbase-cxx-client/core/impl/wildcard_query.cxx +10 -10
  241. package/deps/couchbase-cxx-client/core/impl/with_legacy_durability.hxx +30 -29
  242. package/deps/couchbase-cxx-client/core/io/dns_client.cxx +257 -232
  243. package/deps/couchbase-cxx-client/core/io/dns_client.hxx +19 -18
  244. package/deps/couchbase-cxx-client/core/io/dns_codec.hxx +156 -154
  245. package/deps/couchbase-cxx-client/core/io/dns_config.cxx +114 -109
  246. package/deps/couchbase-cxx-client/core/io/dns_config.hxx +15 -13
  247. package/deps/couchbase-cxx-client/core/io/dns_message.hxx +365 -342
  248. package/deps/couchbase-cxx-client/core/io/http_command.hxx +155 -134
  249. package/deps/couchbase-cxx-client/core/io/http_context.hxx +5 -5
  250. package/deps/couchbase-cxx-client/core/io/http_message.hxx +75 -71
  251. package/deps/couchbase-cxx-client/core/io/http_parser.cxx +70 -67
  252. package/deps/couchbase-cxx-client/core/io/http_parser.hxx +18 -18
  253. package/deps/couchbase-cxx-client/core/io/http_session.hxx +620 -520
  254. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +406 -315
  255. package/deps/couchbase-cxx-client/core/io/http_traits.hxx +7 -0
  256. package/deps/couchbase-cxx-client/core/io/ip_protocol.hxx +3 -3
  257. package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +298 -278
  258. package/deps/couchbase-cxx-client/core/io/mcbp_context.hxx +7 -6
  259. package/deps/couchbase-cxx-client/core/io/mcbp_message.cxx +8 -8
  260. package/deps/couchbase-cxx-client/core/io/mcbp_message.hxx +19 -19
  261. package/deps/couchbase-cxx-client/core/io/mcbp_parser.cxx +60 -51
  262. package/deps/couchbase-cxx-client/core/io/mcbp_parser.hxx +21 -17
  263. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +1769 -1616
  264. package/deps/couchbase-cxx-client/core/io/mcbp_session.hxx +63 -57
  265. package/deps/couchbase-cxx-client/core/io/query_cache.hxx +34 -34
  266. package/deps/couchbase-cxx-client/core/io/retry_context.hxx +45 -45
  267. package/deps/couchbase-cxx-client/core/io/retry_orchestrator.hxx +52 -42
  268. package/deps/couchbase-cxx-client/core/io/streams.hxx +210 -193
  269. package/deps/couchbase-cxx-client/core/json_string.hxx +47 -47
  270. package/deps/couchbase-cxx-client/core/key_value_config.cxx +8 -8
  271. package/deps/couchbase-cxx-client/core/key_value_config.hxx +12 -11
  272. package/deps/couchbase-cxx-client/core/logger/configuration.hxx +35 -35
  273. package/deps/couchbase-cxx-client/core/logger/custom_rotating_file_sink.cxx +73 -72
  274. package/deps/couchbase-cxx-client/core/logger/custom_rotating_file_sink.hxx +20 -18
  275. package/deps/couchbase-cxx-client/core/logger/level.hxx +9 -1
  276. package/deps/couchbase-cxx-client/core/logger/logger.cxx +279 -252
  277. package/deps/couchbase-cxx-client/core/logger/logger.hxx +110 -58
  278. package/deps/couchbase-cxx-client/core/management/analytics_dataset.hxx +4 -4
  279. package/deps/couchbase-cxx-client/core/management/analytics_index.hxx +4 -4
  280. package/deps/couchbase-cxx-client/core/management/analytics_link_azure_blob_external.cxx +35 -33
  281. package/deps/couchbase-cxx-client/core/management/analytics_link_azure_blob_external.hxx +36 -35
  282. package/deps/couchbase-cxx-client/core/management/analytics_link_azure_blob_external_json.hxx +24 -20
  283. package/deps/couchbase-cxx-client/core/management/analytics_link_couchbase_remote.cxx +66 -65
  284. package/deps/couchbase-cxx-client/core/management/analytics_link_couchbase_remote.hxx +77 -70
  285. package/deps/couchbase-cxx-client/core/management/analytics_link_couchbase_remote_json.hxx +38 -32
  286. package/deps/couchbase-cxx-client/core/management/analytics_link_s3_external.cxx +26 -25
  287. package/deps/couchbase-cxx-client/core/management/analytics_link_s3_external.hxx +30 -30
  288. package/deps/couchbase-cxx-client/core/management/analytics_link_s3_external_json.hxx +18 -16
  289. package/deps/couchbase-cxx-client/core/management/bucket_settings.hxx +109 -91
  290. package/deps/couchbase-cxx-client/core/management/bucket_settings_json.hxx +112 -94
  291. package/deps/couchbase-cxx-client/core/management/design_document.hxx +9 -9
  292. package/deps/couchbase-cxx-client/core/management/eventing_function.hxx +124 -121
  293. package/deps/couchbase-cxx-client/core/management/eventing_function_json.hxx +228 -184
  294. package/deps/couchbase-cxx-client/core/management/eventing_status.hxx +41 -41
  295. package/deps/couchbase-cxx-client/core/management/eventing_status_json.hxx +53 -45
  296. package/deps/couchbase-cxx-client/core/management/rbac.hxx +33 -28
  297. package/deps/couchbase-cxx-client/core/management/rbac_fmt.hxx +21 -21
  298. package/deps/couchbase-cxx-client/core/management/rbac_json.hxx +132 -125
  299. package/deps/couchbase-cxx-client/core/management/search_index.cxx +79 -0
  300. package/deps/couchbase-cxx-client/core/management/search_index.hxx +11 -10
  301. package/deps/couchbase-cxx-client/core/management/search_index_json.hxx +27 -26
  302. package/deps/couchbase-cxx-client/core/mcbp/barrier_frame.hxx +4 -3
  303. package/deps/couchbase-cxx-client/core/mcbp/big_endian.cxx +22 -22
  304. package/deps/couchbase-cxx-client/core/mcbp/buffer_writer.cxx +22 -19
  305. package/deps/couchbase-cxx-client/core/mcbp/buffer_writer.hxx +9 -9
  306. package/deps/couchbase-cxx-client/core/mcbp/codec.cxx +419 -397
  307. package/deps/couchbase-cxx-client/core/mcbp/codec.hxx +14 -12
  308. package/deps/couchbase-cxx-client/core/mcbp/command_code.cxx +48 -48
  309. package/deps/couchbase-cxx-client/core/mcbp/completion_token.hxx +33 -33
  310. package/deps/couchbase-cxx-client/core/mcbp/datatype.hxx +3 -3
  311. package/deps/couchbase-cxx-client/core/mcbp/durability_level.hxx +8 -7
  312. package/deps/couchbase-cxx-client/core/mcbp/durability_level_frame.hxx +3 -2
  313. package/deps/couchbase-cxx-client/core/mcbp/durability_timeout_frame.hxx +4 -3
  314. package/deps/couchbase-cxx-client/core/mcbp/open_tracing_frame.hxx +3 -2
  315. package/deps/couchbase-cxx-client/core/mcbp/operation_consumer.cxx +3 -3
  316. package/deps/couchbase-cxx-client/core/mcbp/operation_consumer.hxx +9 -9
  317. package/deps/couchbase-cxx-client/core/mcbp/operation_queue.cxx +76 -70
  318. package/deps/couchbase-cxx-client/core/mcbp/operation_queue.hxx +18 -17
  319. package/deps/couchbase-cxx-client/core/mcbp/packet.cxx +65 -51
  320. package/deps/couchbase-cxx-client/core/mcbp/packet.hxx +25 -25
  321. package/deps/couchbase-cxx-client/core/mcbp/preserve_expiry_frame.hxx +4 -2
  322. package/deps/couchbase-cxx-client/core/mcbp/queue_callback.hxx +3 -2
  323. package/deps/couchbase-cxx-client/core/mcbp/queue_request.cxx +65 -62
  324. package/deps/couchbase-cxx-client/core/mcbp/queue_request.hxx +54 -52
  325. package/deps/couchbase-cxx-client/core/mcbp/queue_request_connection_info.hxx +3 -3
  326. package/deps/couchbase-cxx-client/core/mcbp/queue_response.hxx +7 -7
  327. package/deps/couchbase-cxx-client/core/mcbp/read_units_frame.hxx +3 -2
  328. package/deps/couchbase-cxx-client/core/mcbp/server_duration.cxx +7 -7
  329. package/deps/couchbase-cxx-client/core/mcbp/server_duration_frame.hxx +3 -2
  330. package/deps/couchbase-cxx-client/core/mcbp/stream_id_frame.hxx +3 -2
  331. package/deps/couchbase-cxx-client/core/mcbp/unsupported_frame.hxx +4 -3
  332. package/deps/couchbase-cxx-client/core/mcbp/user_impersonation_frame.hxx +1 -1
  333. package/deps/couchbase-cxx-client/core/mcbp/write_units_frame.hxx +3 -2
  334. package/deps/couchbase-cxx-client/core/meta/features.hxx +58 -0
  335. package/deps/couchbase-cxx-client/core/meta/version.cxx +255 -204
  336. package/deps/couchbase-cxx-client/core/meta/version.hxx +31 -20
  337. package/deps/couchbase-cxx-client/core/metrics/logging_meter.cxx +160 -154
  338. package/deps/couchbase-cxx-client/core/metrics/logging_meter.hxx +16 -15
  339. package/deps/couchbase-cxx-client/core/metrics/logging_meter_options.hxx +1 -1
  340. package/deps/couchbase-cxx-client/core/metrics/noop_meter.hxx +14 -13
  341. package/deps/couchbase-cxx-client/core/mozilla_ca_bundle.hxx +2 -2
  342. package/deps/couchbase-cxx-client/core/n1ql_query_options.cxx +31 -31
  343. package/deps/couchbase-cxx-client/core/n1ql_query_options.hxx +22 -21
  344. package/deps/couchbase-cxx-client/core/operation_map.hxx +3 -3
  345. package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +187 -176
  346. package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +79 -71
  347. package/deps/couchbase-cxx-client/core/operations/document_append.cxx +18 -15
  348. package/deps/couchbase-cxx-client/core/operations/document_append.hxx +18 -16
  349. package/deps/couchbase-cxx-client/core/operations/document_decrement.cxx +26 -23
  350. package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +24 -20
  351. package/deps/couchbase-cxx-client/core/operations/document_exists.cxx +23 -21
  352. package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +25 -23
  353. package/deps/couchbase-cxx-client/core/operations/document_get.cxx +17 -15
  354. package/deps/couchbase-cxx-client/core/operations/document_get.hxx +17 -15
  355. package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +121 -92
  356. package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.cxx +19 -16
  357. package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +21 -17
  358. package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.cxx +19 -16
  359. package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +22 -18
  360. package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +111 -82
  361. package/deps/couchbase-cxx-client/core/operations/document_get_projected.cxx +193 -184
  362. package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +25 -21
  363. package/deps/couchbase-cxx-client/core/operations/document_increment.cxx +26 -23
  364. package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +24 -20
  365. package/deps/couchbase-cxx-client/core/operations/document_insert.cxx +23 -20
  366. package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +20 -18
  367. package/deps/couchbase-cxx-client/core/operations/document_lookup_in.cxx +80 -67
  368. package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +31 -27
  369. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +187 -149
  370. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +190 -145
  371. package/deps/couchbase-cxx-client/core/operations/document_mutate_in.cxx +98 -80
  372. package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +38 -33
  373. package/deps/couchbase-cxx-client/core/operations/document_prepend.cxx +18 -15
  374. package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +18 -16
  375. package/deps/couchbase-cxx-client/core/operations/document_query.cxx +367 -356
  376. package/deps/couchbase-cxx-client/core/operations/document_query.hxx +83 -79
  377. package/deps/couchbase-cxx-client/core/operations/document_remove.cxx +18 -15
  378. package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +18 -16
  379. package/deps/couchbase-cxx-client/core/operations/document_replace.cxx +27 -24
  380. package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +22 -20
  381. package/deps/couchbase-cxx-client/core/operations/document_search.cxx +322 -308
  382. package/deps/couchbase-cxx-client/core/operations/document_search.hxx +125 -121
  383. package/deps/couchbase-cxx-client/core/operations/document_touch.cxx +16 -14
  384. package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +19 -17
  385. package/deps/couchbase-cxx-client/core/operations/document_unlock.cxx +16 -14
  386. package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +19 -17
  387. package/deps/couchbase-cxx-client/core/operations/document_upsert.cxx +26 -23
  388. package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +21 -19
  389. package/deps/couchbase-cxx-client/core/operations/document_view.cxx +169 -159
  390. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +68 -65
  391. package/deps/couchbase-cxx-client/core/operations/http_noop.cxx +38 -35
  392. package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +12 -10
  393. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.cxx +58 -56
  394. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +20 -17
  395. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.cxx +49 -44
  396. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +18 -15
  397. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.cxx +46 -43
  398. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +16 -13
  399. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.cxx +48 -43
  400. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +17 -14
  401. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.cxx +48 -43
  402. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +17 -14
  403. package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.cxx +38 -35
  404. package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +16 -14
  405. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.cxx +68 -66
  406. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +20 -17
  407. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.cxx +56 -51
  408. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +19 -16
  409. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.cxx +44 -42
  410. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +16 -13
  411. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.cxx +49 -43
  412. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +23 -20
  413. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.cxx +52 -51
  414. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +33 -30
  415. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.cxx +46 -42
  416. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +22 -19
  417. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.cxx +70 -67
  418. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +22 -19
  419. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +92 -85
  420. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +27 -24
  421. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.cxx +52 -51
  422. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +33 -30
  423. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_utils.hxx +6 -4
  424. package/deps/couchbase-cxx-client/core/operations/management/analytics_problem.hxx +2 -2
  425. package/deps/couchbase-cxx-client/core/operations/management/bucket_create.cxx +158 -149
  426. package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +14 -12
  427. package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +118 -42
  428. package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +47 -22
  429. package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +19 -18
  430. package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +13 -11
  431. package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +25 -24
  432. package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +13 -11
  433. package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +24 -22
  434. package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +14 -12
  435. package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.cxx +25 -23
  436. package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +13 -11
  437. package/deps/couchbase-cxx-client/core/operations/management/bucket_update.cxx +112 -107
  438. package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +15 -13
  439. package/deps/couchbase-cxx-client/core/operations/management/change_password.cxx +22 -20
  440. package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +13 -11
  441. package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.cxx +52 -50
  442. package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +31 -29
  443. package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.cxx +14 -12
  444. package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +13 -11
  445. package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +48 -46
  446. package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +19 -16
  447. package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +37 -35
  448. package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +16 -14
  449. package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +49 -47
  450. package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +19 -16
  451. package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.cxx +11 -9
  452. package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +17 -13
  453. package/deps/couchbase-cxx-client/core/operations/management/error_utils.cxx +210 -198
  454. package/deps/couchbase-cxx-client/core/operations/management/error_utils.hxx +3 -1
  455. package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.cxx +30 -28
  456. package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +17 -14
  457. package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.cxx +31 -29
  458. package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +17 -14
  459. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.cxx +49 -43
  460. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +17 -14
  461. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.cxx +29 -27
  462. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +18 -15
  463. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.cxx +45 -39
  464. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +17 -14
  465. package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.cxx +30 -28
  466. package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +17 -14
  467. package/deps/couchbase-cxx-client/core/operations/management/eventing_problem.hxx +3 -3
  468. package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.cxx +30 -28
  469. package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +17 -14
  470. package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.cxx +30 -28
  471. package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +17 -14
  472. package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.cxx +328 -318
  473. package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +17 -14
  474. package/deps/couchbase-cxx-client/core/operations/management/freeform.cxx +23 -22
  475. package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +19 -17
  476. package/deps/couchbase-cxx-client/core/operations/management/group_drop.cxx +18 -17
  477. package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +13 -11
  478. package/deps/couchbase-cxx-client/core/operations/management/group_get.cxx +25 -23
  479. package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +14 -12
  480. package/deps/couchbase-cxx-client/core/operations/management/group_get_all.cxx +23 -22
  481. package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +13 -11
  482. package/deps/couchbase-cxx-client/core/operations/management/group_upsert.cxx +58 -55
  483. package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +14 -12
  484. package/deps/couchbase-cxx-client/core/operations/management/query_index_build.cxx +53 -48
  485. package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +25 -22
  486. package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +75 -67
  487. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.cxx +128 -122
  488. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +31 -28
  489. package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.cxx +95 -93
  490. package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +26 -24
  491. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.cxx +97 -93
  492. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +24 -21
  493. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.cxx +66 -62
  494. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +24 -22
  495. package/deps/couchbase-cxx-client/core/operations/management/role_get_all.cxx +24 -22
  496. package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +13 -11
  497. package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +38 -36
  498. package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +15 -13
  499. package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +33 -32
  500. package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +15 -13
  501. package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +27 -25
  502. package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +14 -12
  503. package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.cxx +12 -10
  504. package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +13 -11
  505. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +72 -67
  506. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +20 -18
  507. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +62 -59
  508. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +19 -16
  509. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +62 -59
  510. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +19 -17
  511. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +62 -59
  512. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +19 -16
  513. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +58 -55
  514. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +18 -15
  515. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +59 -56
  516. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +18 -16
  517. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +51 -46
  518. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +18 -15
  519. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +66 -61
  520. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +19 -17
  521. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.cxx +38 -36
  522. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +17 -14
  523. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +98 -95
  524. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +20 -17
  525. package/deps/couchbase-cxx-client/core/operations/management/user_drop.cxx +18 -17
  526. package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +16 -12
  527. package/deps/couchbase-cxx-client/core/operations/management/user_get.cxx +25 -23
  528. package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +17 -13
  529. package/deps/couchbase-cxx-client/core/operations/management/user_get_all.cxx +24 -22
  530. package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +16 -12
  531. package/deps/couchbase-cxx-client/core/operations/management/user_upsert.cxx +63 -60
  532. package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +17 -13
  533. package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +16 -12
  534. package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +15 -13
  535. package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +40 -35
  536. package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +16 -14
  537. package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +73 -69
  538. package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +16 -13
  539. package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +39 -35
  540. package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +15 -12
  541. package/deps/couchbase-cxx-client/core/origin.cxx +259 -249
  542. package/deps/couchbase-cxx-client/core/origin.hxx +55 -49
  543. package/deps/couchbase-cxx-client/core/pending_operation.hxx +3 -3
  544. package/deps/couchbase-cxx-client/core/ping_collector.hxx +3 -3
  545. package/deps/couchbase-cxx-client/core/ping_options.hxx +30 -30
  546. package/deps/couchbase-cxx-client/core/ping_reporter.hxx +3 -3
  547. package/deps/couchbase-cxx-client/core/platform/backtrace.c +100 -91
  548. package/deps/couchbase-cxx-client/core/platform/base64.cc +135 -134
  549. package/deps/couchbase-cxx-client/core/platform/dirutils.cc +66 -63
  550. package/deps/couchbase-cxx-client/core/platform/random.cc +43 -42
  551. package/deps/couchbase-cxx-client/core/platform/random.h +4 -4
  552. package/deps/couchbase-cxx-client/core/platform/string_hex.cc +42 -40
  553. package/deps/couchbase-cxx-client/core/platform/terminate_handler.cc +54 -52
  554. package/deps/couchbase-cxx-client/core/platform/uuid.cc +47 -47
  555. package/deps/couchbase-cxx-client/core/protocol/client_opcode.hxx +336 -327
  556. package/deps/couchbase-cxx-client/core/protocol/client_opcode_fmt.hxx +291 -291
  557. package/deps/couchbase-cxx-client/core/protocol/client_request.cxx +13 -10
  558. package/deps/couchbase-cxx-client/core/protocol/client_request.hxx +133 -130
  559. package/deps/couchbase-cxx-client/core/protocol/client_response.cxx +40 -40
  560. package/deps/couchbase-cxx-client/core/protocol/client_response.hxx +153 -150
  561. package/deps/couchbase-cxx-client/core/protocol/cmd_append.cxx +24 -23
  562. package/deps/couchbase-cxx-client/core/protocol/cmd_append.hxx +65 -65
  563. package/deps/couchbase-cxx-client/core/protocol/cmd_cluster_map_change_notification.cxx +25 -21
  564. package/deps/couchbase-cxx-client/core/protocol/cmd_cluster_map_change_notification.hxx +33 -25
  565. package/deps/couchbase-cxx-client/core/protocol/cmd_decrement.cxx +38 -38
  566. package/deps/couchbase-cxx-client/core/protocol/cmd_decrement.hxx +87 -87
  567. package/deps/couchbase-cxx-client/core/protocol/cmd_get.cxx +17 -17
  568. package/deps/couchbase-cxx-client/core/protocol/cmd_get.hxx +59 -59
  569. package/deps/couchbase-cxx-client/core/protocol/cmd_get_and_lock.cxx +20 -20
  570. package/deps/couchbase-cxx-client/core/protocol/cmd_get_and_lock.hxx +72 -72
  571. package/deps/couchbase-cxx-client/core/protocol/cmd_get_and_touch.cxx +20 -20
  572. package/deps/couchbase-cxx-client/core/protocol/cmd_get_and_touch.hxx +72 -72
  573. package/deps/couchbase-cxx-client/core/protocol/cmd_get_cluster_config.cxx +46 -39
  574. package/deps/couchbase-cxx-client/core/protocol/cmd_get_cluster_config.hxx +57 -49
  575. package/deps/couchbase-cxx-client/core/protocol/cmd_get_collection_id.cxx +17 -17
  576. package/deps/couchbase-cxx-client/core/protocol/cmd_get_collection_id.hxx +59 -59
  577. package/deps/couchbase-cxx-client/core/protocol/cmd_get_collections_manifest.cxx +16 -14
  578. package/deps/couchbase-cxx-client/core/protocol/cmd_get_collections_manifest.hxx +39 -39
  579. package/deps/couchbase-cxx-client/core/protocol/cmd_get_error_map.cxx +18 -17
  580. package/deps/couchbase-cxx-client/core/protocol/cmd_get_error_map.hxx +62 -62
  581. package/deps/couchbase-cxx-client/core/protocol/cmd_get_meta.cxx +24 -23
  582. package/deps/couchbase-cxx-client/core/protocol/cmd_get_meta.hxx +81 -79
  583. package/deps/couchbase-cxx-client/core/protocol/cmd_get_replica.cxx +23 -23
  584. package/deps/couchbase-cxx-client/core/protocol/cmd_get_replica.hxx +44 -44
  585. package/deps/couchbase-cxx-client/core/protocol/cmd_hello.cxx +28 -27
  586. package/deps/couchbase-cxx-client/core/protocol/cmd_hello.hxx +106 -105
  587. package/deps/couchbase-cxx-client/core/protocol/cmd_increment.cxx +38 -38
  588. package/deps/couchbase-cxx-client/core/protocol/cmd_increment.hxx +87 -87
  589. package/deps/couchbase-cxx-client/core/protocol/cmd_info.hxx +3 -3
  590. package/deps/couchbase-cxx-client/core/protocol/cmd_insert.cxx +27 -27
  591. package/deps/couchbase-cxx-client/core/protocol/cmd_insert.hxx +81 -81
  592. package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in.cxx +54 -51
  593. package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in.hxx +90 -90
  594. package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in_replica.cxx +54 -51
  595. package/deps/couchbase-cxx-client/core/protocol/cmd_lookup_in_replica.hxx +88 -88
  596. package/deps/couchbase-cxx-client/core/protocol/cmd_mutate_in.cxx +105 -97
  597. package/deps/couchbase-cxx-client/core/protocol/cmd_mutate_in.hxx +161 -153
  598. package/deps/couchbase-cxx-client/core/protocol/cmd_noop.cxx +4 -4
  599. package/deps/couchbase-cxx-client/core/protocol/cmd_noop.hxx +32 -32
  600. package/deps/couchbase-cxx-client/core/protocol/cmd_observe_seqno.cxx +36 -34
  601. package/deps/couchbase-cxx-client/core/protocol/cmd_observe_seqno.hxx +89 -89
  602. package/deps/couchbase-cxx-client/core/protocol/cmd_prepend.cxx +22 -22
  603. package/deps/couchbase-cxx-client/core/protocol/cmd_prepend.hxx +63 -63
  604. package/deps/couchbase-cxx-client/core/protocol/cmd_remove.cxx +23 -23
  605. package/deps/couchbase-cxx-client/core/protocol/cmd_remove.hxx +54 -54
  606. package/deps/couchbase-cxx-client/core/protocol/cmd_replace.cxx +28 -28
  607. package/deps/couchbase-cxx-client/core/protocol/cmd_replace.hxx +88 -88
  608. package/deps/couchbase-cxx-client/core/protocol/cmd_sasl_auth.cxx +17 -15
  609. package/deps/couchbase-cxx-client/core/protocol/cmd_sasl_auth.hxx +56 -56
  610. package/deps/couchbase-cxx-client/core/protocol/cmd_sasl_list_mechs.cxx +24 -19
  611. package/deps/couchbase-cxx-client/core/protocol/cmd_sasl_list_mechs.hxx +39 -39
  612. package/deps/couchbase-cxx-client/core/protocol/cmd_sasl_step.cxx +17 -15
  613. package/deps/couchbase-cxx-client/core/protocol/cmd_sasl_step.hxx +56 -56
  614. package/deps/couchbase-cxx-client/core/protocol/cmd_select_bucket.cxx +6 -6
  615. package/deps/couchbase-cxx-client/core/protocol/cmd_select_bucket.hxx +36 -36
  616. package/deps/couchbase-cxx-client/core/protocol/cmd_touch.cxx +8 -8
  617. package/deps/couchbase-cxx-client/core/protocol/cmd_touch.hxx +38 -38
  618. package/deps/couchbase-cxx-client/core/protocol/cmd_unlock.cxx +5 -5
  619. package/deps/couchbase-cxx-client/core/protocol/cmd_unlock.hxx +36 -36
  620. package/deps/couchbase-cxx-client/core/protocol/cmd_upsert.cxx +28 -28
  621. package/deps/couchbase-cxx-client/core/protocol/cmd_upsert.hxx +83 -83
  622. package/deps/couchbase-cxx-client/core/protocol/datatype.hxx +19 -18
  623. package/deps/couchbase-cxx-client/core/protocol/frame_info_id.hxx +108 -103
  624. package/deps/couchbase-cxx-client/core/protocol/frame_info_id_fmt.hxx +45 -45
  625. package/deps/couchbase-cxx-client/core/protocol/frame_info_utils.cxx +24 -21
  626. package/deps/couchbase-cxx-client/core/protocol/frame_info_utils.hxx +3 -1
  627. package/deps/couchbase-cxx-client/core/protocol/hello_feature.hxx +211 -175
  628. package/deps/couchbase-cxx-client/core/protocol/hello_feature_fmt.hxx +93 -90
  629. package/deps/couchbase-cxx-client/core/protocol/magic.hxx +24 -24
  630. package/deps/couchbase-cxx-client/core/protocol/magic_fmt.hxx +30 -30
  631. package/deps/couchbase-cxx-client/core/protocol/server_opcode.hxx +11 -11
  632. package/deps/couchbase-cxx-client/core/protocol/server_opcode_fmt.hxx +18 -18
  633. package/deps/couchbase-cxx-client/core/protocol/server_request.hxx +90 -86
  634. package/deps/couchbase-cxx-client/core/protocol/status.cxx +138 -138
  635. package/deps/couchbase-cxx-client/core/protocol/status.hxx +86 -86
  636. package/deps/couchbase-cxx-client/core/query_context.hxx +44 -43
  637. package/deps/couchbase-cxx-client/core/range_scan_load_balancer.cxx +51 -50
  638. package/deps/couchbase-cxx-client/core/range_scan_load_balancer.hxx +26 -25
  639. package/deps/couchbase-cxx-client/core/range_scan_options.cxx +2 -2
  640. package/deps/couchbase-cxx-client/core/range_scan_options.hxx +62 -59
  641. package/deps/couchbase-cxx-client/core/range_scan_orchestrator.cxx +515 -470
  642. package/deps/couchbase-cxx-client/core/range_scan_orchestrator.hxx +23 -18
  643. package/deps/couchbase-cxx-client/core/range_scan_orchestrator_options.hxx +10 -10
  644. package/deps/couchbase-cxx-client/core/resource_units.hxx +2 -2
  645. package/deps/couchbase-cxx-client/core/response_handler.hxx +8 -8
  646. package/deps/couchbase-cxx-client/core/retry_orchestrator.cxx +27 -19
  647. package/deps/couchbase-cxx-client/core/retry_orchestrator.hxx +3 -2
  648. package/deps/couchbase-cxx-client/core/sasl/client.cc +22 -18
  649. package/deps/couchbase-cxx-client/core/sasl/client.h +66 -62
  650. package/deps/couchbase-cxx-client/core/sasl/context.cc +4 -4
  651. package/deps/couchbase-cxx-client/core/sasl/context.h +19 -19
  652. package/deps/couchbase-cxx-client/core/sasl/error.h +12 -1
  653. package/deps/couchbase-cxx-client/core/sasl/error_fmt.h +42 -42
  654. package/deps/couchbase-cxx-client/core/sasl/mechanism.cc +13 -10
  655. package/deps/couchbase-cxx-client/core/sasl/mechanism.h +8 -3
  656. package/deps/couchbase-cxx-client/core/sasl/plain/plain.cc +8 -8
  657. package/deps/couchbase-cxx-client/core/sasl/plain/plain.h +25 -24
  658. package/deps/couchbase-cxx-client/core/sasl/scram-sha/scram-sha.cc +225 -218
  659. package/deps/couchbase-cxx-client/core/sasl/scram-sha/scram-sha.h +133 -115
  660. package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.cc +20 -20
  661. package/deps/couchbase-cxx-client/core/scan_result.cxx +38 -38
  662. package/deps/couchbase-cxx-client/core/scan_result.hxx +16 -16
  663. package/deps/couchbase-cxx-client/core/search_highlight_style.hxx +4 -1
  664. package/deps/couchbase-cxx-client/core/search_query_options.cxx +21 -21
  665. package/deps/couchbase-cxx-client/core/search_query_options.hxx +19 -18
  666. package/deps/couchbase-cxx-client/core/search_scan_consistency.hxx +3 -1
  667. package/deps/couchbase-cxx-client/core/seed_config.cxx +10 -7
  668. package/deps/couchbase-cxx-client/core/seed_config.hxx +8 -8
  669. package/deps/couchbase-cxx-client/core/service_type.hxx +7 -7
  670. package/deps/couchbase-cxx-client/core/service_type_fmt.hxx +33 -33
  671. package/deps/couchbase-cxx-client/core/stats_options.hxx +13 -13
  672. package/deps/couchbase-cxx-client/core/subdoc_options.hxx +60 -58
  673. package/deps/couchbase-cxx-client/core/tls_verify_mode.hxx +2 -2
  674. package/deps/couchbase-cxx-client/core/topology/capabilities.hxx +83 -83
  675. package/deps/couchbase-cxx-client/core/topology/capabilities_fmt.hxx +111 -111
  676. package/deps/couchbase-cxx-client/core/topology/collections_manifest.hxx +14 -14
  677. package/deps/couchbase-cxx-client/core/topology/collections_manifest_fmt.hxx +23 -21
  678. package/deps/couchbase-cxx-client/core/topology/collections_manifest_json.hxx +26 -25
  679. package/deps/couchbase-cxx-client/core/topology/configuration.cxx +213 -192
  680. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +104 -91
  681. package/deps/couchbase-cxx-client/core/topology/configuration_fmt.hxx +131 -128
  682. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +276 -242
  683. package/deps/couchbase-cxx-client/core/topology/error_map.hxx +5 -5
  684. package/deps/couchbase-cxx-client/core/topology/error_map_json.hxx +65 -60
  685. package/deps/couchbase-cxx-client/core/tracing/constants.hxx +153 -153
  686. package/deps/couchbase-cxx-client/core/tracing/noop_tracer.hxx +29 -28
  687. package/deps/couchbase-cxx-client/core/tracing/threshold_logging_options.hxx +30 -30
  688. package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.cxx +354 -344
  689. package/deps/couchbase-cxx-client/core/tracing/threshold_logging_tracer.hxx +12 -12
  690. package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.cxx +153 -33
  691. package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.hxx +30 -118
  692. package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.cxx +8 -2
  693. package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.hxx +163 -127
  694. package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +358 -334
  695. package/deps/couchbase-cxx-client/core/transactions/atr_ids.cxx +270 -185
  696. package/deps/couchbase-cxx-client/core/transactions/atr_ids.hxx +4 -4
  697. package/deps/couchbase-cxx-client/core/transactions/attempt_context.cxx +9 -5
  698. package/deps/couchbase-cxx-client/core/transactions/attempt_context.hxx +194 -154
  699. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +3278 -2159
  700. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +446 -573
  701. package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.cxx +15 -10
  702. package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.hxx +58 -49
  703. package/deps/couchbase-cxx-client/core/transactions/attempt_state.hxx +72 -72
  704. package/deps/couchbase-cxx-client/core/transactions/binary.cxx +3 -3
  705. package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.cxx +2 -2
  706. package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.hxx +28 -24
  707. package/deps/couchbase-cxx-client/core/transactions/document_metadata.hxx +68 -68
  708. package/deps/couchbase-cxx-client/core/transactions/durability_level.hxx +53 -53
  709. package/deps/couchbase-cxx-client/core/transactions/error_class.hxx +12 -12
  710. package/deps/couchbase-cxx-client/core/transactions/error_list.hxx +22 -22
  711. package/deps/couchbase-cxx-client/core/transactions/exceptions.cxx +167 -114
  712. package/deps/couchbase-cxx-client/core/transactions/exceptions.hxx +170 -139
  713. package/deps/couchbase-cxx-client/core/transactions/exceptions_fmt.hxx +105 -0
  714. package/deps/couchbase-cxx-client/core/transactions/forward_compat.cxx +220 -0
  715. package/deps/couchbase-cxx-client/core/transactions/forward_compat.hxx +63 -207
  716. package/deps/couchbase-cxx-client/core/transactions/internal/atr_cleanup_entry.hxx +110 -102
  717. package/deps/couchbase-cxx-client/core/transactions/internal/atr_entry.hxx +144 -144
  718. package/deps/couchbase-cxx-client/core/transactions/internal/client_record.hxx +53 -50
  719. package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.cxx +5 -5
  720. package/deps/couchbase-cxx-client/core/transactions/internal/doc_record.hxx +38 -35
  721. package/deps/couchbase-cxx-client/core/transactions/internal/doc_record_fmt.hxx +17 -16
  722. package/deps/couchbase-cxx-client/core/transactions/internal/exceptions_internal.hxx +238 -281
  723. package/deps/couchbase-cxx-client/core/transactions/internal/exceptions_internal_fmt.hxx +103 -0
  724. package/deps/couchbase-cxx-client/core/transactions/internal/logging.hxx +52 -29
  725. package/deps/couchbase-cxx-client/core/transactions/internal/transaction_attempt.hxx +3 -3
  726. package/deps/couchbase-cxx-client/core/transactions/internal/transaction_context.hxx +136 -120
  727. package/deps/couchbase-cxx-client/core/transactions/internal/transaction_fields.hxx +2 -1
  728. package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +127 -122
  729. package/deps/couchbase-cxx-client/core/transactions/internal/utils.hxx +244 -219
  730. package/deps/couchbase-cxx-client/core/transactions/result.cxx +41 -40
  731. package/deps/couchbase-cxx-client/core/transactions/result.hxx +143 -141
  732. package/deps/couchbase-cxx-client/core/transactions/result_fmt.hxx +21 -20
  733. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +759 -627
  734. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.hxx +175 -156
  735. package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +231 -179
  736. package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.cxx +185 -198
  737. package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +207 -222
  738. package/deps/couchbase-cxx-client/core/transactions/transaction_keyspace.cxx +15 -11
  739. package/deps/couchbase-cxx-client/core/transactions/transaction_links.cxx +11 -7
  740. package/deps/couchbase-cxx-client/core/transactions/transaction_links.hxx +222 -201
  741. package/deps/couchbase-cxx-client/core/transactions/transaction_options.cxx +44 -41
  742. package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +167 -125
  743. package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +491 -424
  744. package/deps/couchbase-cxx-client/core/transactions/transactions_config.cxx +25 -19
  745. package/deps/couchbase-cxx-client/core/transactions/uid_generator.cxx +3 -3
  746. package/deps/couchbase-cxx-client/core/transactions/uid_generator.hxx +2 -2
  747. package/deps/couchbase-cxx-client/core/transactions/utils.cxx +82 -69
  748. package/deps/couchbase-cxx-client/core/transactions/waitable_op_list.hxx +154 -140
  749. package/deps/couchbase-cxx-client/core/transactions.hxx +184 -180
  750. package/deps/couchbase-cxx-client/core/utils/binary.cxx +3 -3
  751. package/deps/couchbase-cxx-client/core/utils/binary.hxx +19 -15
  752. package/deps/couchbase-cxx-client/core/utils/byteswap.hxx +17 -17
  753. package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +395 -328
  754. package/deps/couchbase-cxx-client/core/utils/connection_string.hxx +37 -36
  755. package/deps/couchbase-cxx-client/core/utils/crc32.hxx +42 -34
  756. package/deps/couchbase-cxx-client/core/utils/duration_parser.cxx +142 -133
  757. package/deps/couchbase-cxx-client/core/utils/duration_parser.hxx +9 -9
  758. package/deps/couchbase-cxx-client/core/utils/join_strings.hxx +24 -24
  759. package/deps/couchbase-cxx-client/core/utils/json.cxx +234 -228
  760. package/deps/couchbase-cxx-client/core/utils/json.hxx +12 -12
  761. package/deps/couchbase-cxx-client/core/utils/json_stream_control.hxx +8 -8
  762. package/deps/couchbase-cxx-client/core/utils/json_streaming_lexer.cxx +288 -263
  763. package/deps/couchbase-cxx-client/core/utils/json_streaming_lexer.hxx +20 -17
  764. package/deps/couchbase-cxx-client/core/utils/keyspace.hxx +22 -21
  765. package/deps/couchbase-cxx-client/core/utils/movable_function.hxx +78 -76
  766. package/deps/couchbase-cxx-client/core/utils/mutation_token.cxx +7 -3
  767. package/deps/couchbase-cxx-client/core/utils/mutation_token.hxx +3 -1
  768. package/deps/couchbase-cxx-client/core/utils/name_codec.hxx +13 -13
  769. package/deps/couchbase-cxx-client/core/utils/split_string.cxx +9 -9
  770. package/deps/couchbase-cxx-client/core/utils/split_string.hxx +2 -2
  771. package/deps/couchbase-cxx-client/core/utils/unsigned_leb128.hxx +92 -88
  772. package/deps/couchbase-cxx-client/core/utils/url_codec.cxx +301 -297
  773. package/deps/couchbase-cxx-client/core/utils/url_codec.hxx +35 -35
  774. package/deps/couchbase-cxx-client/core/vector_query_combination.hxx +4 -1
  775. package/deps/couchbase-cxx-client/core/view_on_error.hxx +4 -3
  776. package/deps/couchbase-cxx-client/core/view_query_options.cxx +21 -21
  777. package/deps/couchbase-cxx-client/core/view_query_options.hxx +23 -22
  778. package/deps/couchbase-cxx-client/core/view_scan_consistency.hxx +3 -3
  779. package/deps/couchbase-cxx-client/core/view_sort_order.hxx +4 -1
  780. package/deps/couchbase-cxx-client/core/wait_until_ready_options.hxx +11 -10
  781. package/deps/couchbase-cxx-client/couchbase/allow_querying_search_index_options.hxx +11 -11
  782. package/deps/couchbase-cxx-client/couchbase/analytics_index_manager.hxx +423 -405
  783. package/deps/couchbase-cxx-client/couchbase/analytics_meta_data.hxx +105 -105
  784. package/deps/couchbase-cxx-client/couchbase/analytics_metrics.hxx +120 -118
  785. package/deps/couchbase-cxx-client/couchbase/analytics_options.hxx +318 -292
  786. package/deps/couchbase-cxx-client/couchbase/analytics_result.hxx +56 -55
  787. package/deps/couchbase-cxx-client/couchbase/analytics_scan_consistency.hxx +24 -21
  788. package/deps/couchbase-cxx-client/couchbase/analytics_status.hxx +10 -10
  789. package/deps/couchbase-cxx-client/couchbase/analytics_warning.hxx +44 -43
  790. package/deps/couchbase-cxx-client/couchbase/analyze_document_options.hxx +9 -9
  791. package/deps/couchbase-cxx-client/couchbase/append_options.hxx +51 -47
  792. package/deps/couchbase-cxx-client/couchbase/behavior_options.hxx +75 -69
  793. package/deps/couchbase-cxx-client/couchbase/best_effort_retry_strategy.hxx +12 -10
  794. package/deps/couchbase-cxx-client/couchbase/binary_collection.hxx +213 -183
  795. package/deps/couchbase-cxx-client/couchbase/boolean_field_query.hxx +38 -38
  796. package/deps/couchbase-cxx-client/couchbase/boolean_query.hxx +166 -157
  797. package/deps/couchbase-cxx-client/couchbase/bucket.hxx +69 -68
  798. package/deps/couchbase-cxx-client/couchbase/bucket_manager.hxx +97 -88
  799. package/deps/couchbase-cxx-client/couchbase/build_query_index_options.hxx +22 -21
  800. package/deps/couchbase-cxx-client/couchbase/cas.hxx +74 -73
  801. package/deps/couchbase-cxx-client/couchbase/certificate_authenticator.hxx +10 -10
  802. package/deps/couchbase-cxx-client/couchbase/cluster.hxx +266 -310
  803. package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +235 -241
  804. package/deps/couchbase-cxx-client/couchbase/codec/binary_noop_serializer.hxx +11 -11
  805. package/deps/couchbase-cxx-client/couchbase/codec/codec_flags.hxx +39 -35
  806. package/deps/couchbase-cxx-client/couchbase/codec/encoded_value.hxx +15 -2
  807. package/deps/couchbase-cxx-client/couchbase/codec/json_transcoder.hxx +17 -15
  808. package/deps/couchbase-cxx-client/couchbase/codec/raw_binary_transcoder.hxx +19 -17
  809. package/deps/couchbase-cxx-client/couchbase/codec/raw_json_transcoder.hxx +31 -24
  810. package/deps/couchbase-cxx-client/couchbase/codec/raw_string_transcoder.hxx +20 -18
  811. package/deps/couchbase-cxx-client/couchbase/codec/tao_json_serializer.hxx +38 -30
  812. package/deps/couchbase-cxx-client/couchbase/collection.hxx +1007 -902
  813. package/deps/couchbase-cxx-client/couchbase/collection_manager.hxx +115 -107
  814. package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +200 -188
  815. package/deps/couchbase-cxx-client/couchbase/common_durability_options.hxx +68 -62
  816. package/deps/couchbase-cxx-client/couchbase/common_options.hxx +67 -67
  817. package/deps/couchbase-cxx-client/couchbase/compression_options.hxx +33 -33
  818. package/deps/couchbase-cxx-client/couchbase/configuration_profile.hxx +12 -11
  819. package/deps/couchbase-cxx-client/couchbase/configuration_profiles_registry.hxx +24 -22
  820. package/deps/couchbase-cxx-client/couchbase/conjunction_query.hxx +47 -45
  821. package/deps/couchbase-cxx-client/couchbase/connect_link_analytics_options.hxx +74 -72
  822. package/deps/couchbase-cxx-client/couchbase/counter_result.hxx +32 -32
  823. package/deps/couchbase-cxx-client/couchbase/create_bucket_options.hxx +9 -10
  824. package/deps/couchbase-cxx-client/couchbase/create_collection_options.hxx +35 -34
  825. package/deps/couchbase-cxx-client/couchbase/create_dataset_analytics_options.hxx +76 -76
  826. package/deps/couchbase-cxx-client/couchbase/create_dataverse_analytics_options.hxx +44 -44
  827. package/deps/couchbase-cxx-client/couchbase/create_index_analytics_options.hxx +60 -60
  828. package/deps/couchbase-cxx-client/couchbase/create_link_analytics_options.hxx +25 -25
  829. package/deps/couchbase-cxx-client/couchbase/create_primary_query_index_options.hxx +95 -94
  830. package/deps/couchbase-cxx-client/couchbase/create_query_index_options.hxx +97 -96
  831. package/deps/couchbase-cxx-client/couchbase/create_scope_options.hxx +9 -9
  832. package/deps/couchbase-cxx-client/couchbase/date_range.hxx +29 -27
  833. package/deps/couchbase-cxx-client/couchbase/date_range_facet.hxx +20 -20
  834. package/deps/couchbase-cxx-client/couchbase/date_range_facet_result.hxx +14 -14
  835. package/deps/couchbase-cxx-client/couchbase/date_range_query.hxx +219 -205
  836. package/deps/couchbase-cxx-client/couchbase/decrement_options.hxx +93 -91
  837. package/deps/couchbase-cxx-client/couchbase/diagnostics_options.hxx +42 -41
  838. package/deps/couchbase-cxx-client/couchbase/diagnostics_result.hxx +82 -83
  839. package/deps/couchbase-cxx-client/couchbase/disallow_querying_search_index_options.hxx +11 -10
  840. package/deps/couchbase-cxx-client/couchbase/disconnect_link_analytics_options.hxx +62 -62
  841. package/deps/couchbase-cxx-client/couchbase/disjunction_query.hxx +61 -60
  842. package/deps/couchbase-cxx-client/couchbase/dns_options.hxx +30 -30
  843. package/deps/couchbase-cxx-client/couchbase/doc_id_query.hxx +69 -69
  844. package/deps/couchbase-cxx-client/couchbase/drop_bucket_options.hxx +9 -9
  845. package/deps/couchbase-cxx-client/couchbase/drop_collection_options.hxx +9 -9
  846. package/deps/couchbase-cxx-client/couchbase/drop_dataset_analytics_options.hxx +60 -60
  847. package/deps/couchbase-cxx-client/couchbase/drop_dataverse_analytics_options.hxx +44 -44
  848. package/deps/couchbase-cxx-client/couchbase/drop_index_analytics_options.hxx +60 -60
  849. package/deps/couchbase-cxx-client/couchbase/drop_link_analytics_options.hxx +25 -25
  850. package/deps/couchbase-cxx-client/couchbase/drop_primary_query_index_options.hxx +58 -58
  851. package/deps/couchbase-cxx-client/couchbase/drop_query_index_options.hxx +44 -44
  852. package/deps/couchbase-cxx-client/couchbase/drop_scope_options.hxx +9 -9
  853. package/deps/couchbase-cxx-client/couchbase/drop_search_index_options.hxx +9 -9
  854. package/deps/couchbase-cxx-client/couchbase/durability_level.hxx +32 -29
  855. package/deps/couchbase-cxx-client/couchbase/endpoint_diagnostics.hxx +171 -171
  856. package/deps/couchbase-cxx-client/couchbase/endpoint_ping_report.hxx +166 -169
  857. package/deps/couchbase-cxx-client/couchbase/error.hxx +51 -0
  858. package/deps/couchbase-cxx-client/couchbase/error_codes.hxx +975 -940
  859. package/deps/couchbase-cxx-client/couchbase/error_context.hxx +19 -152
  860. package/deps/couchbase-cxx-client/couchbase/exists_options.hxx +25 -24
  861. package/deps/couchbase-cxx-client/couchbase/exists_result.hxx +32 -32
  862. package/deps/couchbase-cxx-client/couchbase/fail_fast_retry_strategy.hxx +4 -4
  863. package/deps/couchbase-cxx-client/couchbase/flush_bucket_options.hxx +9 -9
  864. package/deps/couchbase-cxx-client/couchbase/fmt/analytics_scan_consistency.hxx +18 -18
  865. package/deps/couchbase-cxx-client/couchbase/fmt/analytics_status.hxx +42 -42
  866. package/deps/couchbase-cxx-client/couchbase/fmt/cas.hxx +10 -10
  867. package/deps/couchbase-cxx-client/couchbase/fmt/durability_level.hxx +24 -24
  868. package/deps/couchbase-cxx-client/couchbase/fmt/error.hxx +53 -0
  869. package/deps/couchbase-cxx-client/couchbase/fmt/error_context.hxx +43 -0
  870. package/deps/couchbase-cxx-client/couchbase/fmt/mutation_token.hxx +15 -11
  871. package/deps/couchbase-cxx-client/couchbase/fmt/query_profile.hxx +21 -21
  872. package/deps/couchbase-cxx-client/couchbase/fmt/query_scan_consistency.hxx +18 -18
  873. package/deps/couchbase-cxx-client/couchbase/fmt/query_status.hxx +42 -42
  874. package/deps/couchbase-cxx-client/couchbase/fmt/retry_reason.hxx +75 -75
  875. package/deps/couchbase-cxx-client/couchbase/fmt/search_scan_consistency.hxx +15 -15
  876. package/deps/couchbase-cxx-client/couchbase/fmt/tls_verify_mode.hxx +18 -18
  877. package/deps/couchbase-cxx-client/couchbase/fmt/transaction_keyspace.hxx +15 -11
  878. package/deps/couchbase-cxx-client/couchbase/fork_event.hxx +12 -12
  879. package/deps/couchbase-cxx-client/couchbase/freeze_plan_search_index_options.hxx +9 -9
  880. package/deps/couchbase-cxx-client/couchbase/geo_bounding_box_query.hxx +71 -64
  881. package/deps/couchbase-cxx-client/couchbase/geo_distance_query.hxx +73 -66
  882. package/deps/couchbase-cxx-client/couchbase/geo_point.hxx +2 -2
  883. package/deps/couchbase-cxx-client/couchbase/geo_polygon_query.hxx +40 -39
  884. package/deps/couchbase-cxx-client/couchbase/get_all_buckets_options.hxx +9 -9
  885. package/deps/couchbase-cxx-client/couchbase/get_all_datasets_analytics_options.hxx +25 -25
  886. package/deps/couchbase-cxx-client/couchbase/get_all_indexes_analytics_options.hxx +26 -25
  887. package/deps/couchbase-cxx-client/couchbase/get_all_query_indexes_options.hxx +27 -25
  888. package/deps/couchbase-cxx-client/couchbase/get_all_replicas_options.hxx +49 -26
  889. package/deps/couchbase-cxx-client/couchbase/get_all_scopes_options.hxx +9 -9
  890. package/deps/couchbase-cxx-client/couchbase/get_all_search_indexes_options.hxx +9 -9
  891. package/deps/couchbase-cxx-client/couchbase/get_and_lock_options.hxx +25 -24
  892. package/deps/couchbase-cxx-client/couchbase/get_and_touch_options.hxx +25 -24
  893. package/deps/couchbase-cxx-client/couchbase/get_any_replica_options.hxx +49 -26
  894. package/deps/couchbase-cxx-client/couchbase/get_bucket_options.hxx +9 -9
  895. package/deps/couchbase-cxx-client/couchbase/get_indexed_search_index_options.hxx +9 -9
  896. package/deps/couchbase-cxx-client/couchbase/get_links_analytics_options.hxx +74 -74
  897. package/deps/couchbase-cxx-client/couchbase/get_options.hxx +63 -60
  898. package/deps/couchbase-cxx-client/couchbase/get_pending_mutations_analytics_options.hxx +30 -28
  899. package/deps/couchbase-cxx-client/couchbase/get_replica_result.hxx +79 -75
  900. package/deps/couchbase-cxx-client/couchbase/get_result.hxx +86 -80
  901. package/deps/couchbase-cxx-client/couchbase/get_search_index_options.hxx +9 -9
  902. package/deps/couchbase-cxx-client/couchbase/highlight_style.hxx +14 -14
  903. package/deps/couchbase-cxx-client/couchbase/increment_options.hxx +94 -91
  904. package/deps/couchbase-cxx-client/couchbase/insert_options.hxx +62 -59
  905. package/deps/couchbase-cxx-client/couchbase/ip_protocol.hxx +3 -3
  906. package/deps/couchbase-cxx-client/couchbase/logger.hxx +51 -0
  907. package/deps/couchbase-cxx-client/couchbase/lookup_in_all_replicas_options.hxx +54 -43
  908. package/deps/couchbase-cxx-client/couchbase/lookup_in_any_replica_options.hxx +54 -44
  909. package/deps/couchbase-cxx-client/couchbase/lookup_in_options.hxx +40 -40
  910. package/deps/couchbase-cxx-client/couchbase/lookup_in_replica_result.hxx +38 -35
  911. package/deps/couchbase-cxx-client/couchbase/lookup_in_result.hxx +222 -216
  912. package/deps/couchbase-cxx-client/couchbase/lookup_in_specs.hxx +101 -101
  913. package/deps/couchbase-cxx-client/couchbase/management/analytics_dataset.hxx +16 -16
  914. package/deps/couchbase-cxx-client/couchbase/management/analytics_index.hxx +16 -16
  915. package/deps/couchbase-cxx-client/couchbase/management/analytics_link.hxx +193 -189
  916. package/deps/couchbase-cxx-client/couchbase/management/bucket_settings.hxx +91 -75
  917. package/deps/couchbase-cxx-client/couchbase/management/collection_spec.hxx +4 -4
  918. package/deps/couchbase-cxx-client/couchbase/management/query_index.hxx +10 -10
  919. package/deps/couchbase-cxx-client/couchbase/management/scope_spec.hxx +2 -2
  920. package/deps/couchbase-cxx-client/couchbase/management/search_index.hxx +9 -9
  921. package/deps/couchbase-cxx-client/couchbase/match_all_query.hxx +10 -9
  922. package/deps/couchbase-cxx-client/couchbase/match_none_query.hxx +10 -9
  923. package/deps/couchbase-cxx-client/couchbase/match_operator.hxx +15 -14
  924. package/deps/couchbase-cxx-client/couchbase/match_phrase_query.hxx +70 -65
  925. package/deps/couchbase-cxx-client/couchbase/match_query.hxx +115 -114
  926. package/deps/couchbase-cxx-client/couchbase/metrics/meter.hxx +33 -30
  927. package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +86 -74
  928. package/deps/couchbase-cxx-client/couchbase/metrics_options.hxx +34 -34
  929. package/deps/couchbase-cxx-client/couchbase/mutate_in_options.hxx +160 -149
  930. package/deps/couchbase-cxx-client/couchbase/mutate_in_result.hxx +130 -123
  931. package/deps/couchbase-cxx-client/couchbase/mutate_in_specs.hxx +473 -454
  932. package/deps/couchbase-cxx-client/couchbase/mutation_result.hxx +32 -32
  933. package/deps/couchbase-cxx-client/couchbase/mutation_state.hxx +35 -34
  934. package/deps/couchbase-cxx-client/couchbase/mutation_token.hxx +78 -78
  935. package/deps/couchbase-cxx-client/couchbase/network_options.hxx +101 -72
  936. package/deps/couchbase-cxx-client/couchbase/numeric_range.hxx +26 -26
  937. package/deps/couchbase-cxx-client/couchbase/numeric_range_facet.hxx +20 -20
  938. package/deps/couchbase-cxx-client/couchbase/numeric_range_facet_result.hxx +14 -14
  939. package/deps/couchbase-cxx-client/couchbase/numeric_range_query.hxx +97 -95
  940. package/deps/couchbase-cxx-client/couchbase/password_authenticator.hxx +17 -17
  941. package/deps/couchbase-cxx-client/couchbase/pause_ingest_search_index_options.hxx +11 -10
  942. package/deps/couchbase-cxx-client/couchbase/persist_to.hxx +45 -44
  943. package/deps/couchbase-cxx-client/couchbase/phrase_query.hxx +69 -65
  944. package/deps/couchbase-cxx-client/couchbase/ping_options.hxx +55 -54
  945. package/deps/couchbase-cxx-client/couchbase/ping_result.hxx +79 -77
  946. package/deps/couchbase-cxx-client/couchbase/prefix_query.hxx +43 -40
  947. package/deps/couchbase-cxx-client/couchbase/prepend_options.hxx +51 -47
  948. package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +207 -199
  949. package/deps/couchbase-cxx-client/couchbase/query_meta_data.hxx +120 -120
  950. package/deps/couchbase-cxx-client/couchbase/query_metrics.hxx +135 -133
  951. package/deps/couchbase-cxx-client/couchbase/query_options.hxx +518 -493
  952. package/deps/couchbase-cxx-client/couchbase/query_profile.hxx +29 -26
  953. package/deps/couchbase-cxx-client/couchbase/query_result.hxx +56 -55
  954. package/deps/couchbase-cxx-client/couchbase/query_scan_consistency.hxx +24 -21
  955. package/deps/couchbase-cxx-client/couchbase/query_status.hxx +10 -10
  956. package/deps/couchbase-cxx-client/couchbase/query_string_query.hxx +34 -29
  957. package/deps/couchbase-cxx-client/couchbase/query_warning.hxx +75 -71
  958. package/deps/couchbase-cxx-client/couchbase/read_preference.hxx +58 -0
  959. package/deps/couchbase-cxx-client/couchbase/regexp_query.hxx +40 -39
  960. package/deps/couchbase-cxx-client/couchbase/remove_options.hxx +51 -47
  961. package/deps/couchbase-cxx-client/couchbase/replace_link_analytics_options.hxx +25 -25
  962. package/deps/couchbase-cxx-client/couchbase/replace_options.hxx +112 -104
  963. package/deps/couchbase-cxx-client/couchbase/replicate_to.hxx +28 -28
  964. package/deps/couchbase-cxx-client/couchbase/result.hxx +28 -28
  965. package/deps/couchbase-cxx-client/couchbase/resume_ingest_search_index_options.hxx +11 -10
  966. package/deps/couchbase-cxx-client/couchbase/retry_action.hxx +10 -10
  967. package/deps/couchbase-cxx-client/couchbase/retry_reason.hxx +53 -51
  968. package/deps/couchbase-cxx-client/couchbase/retry_request.hxx +7 -7
  969. package/deps/couchbase-cxx-client/couchbase/retry_strategy.hxx +4 -4
  970. package/deps/couchbase-cxx-client/couchbase/scan_options.hxx +114 -108
  971. package/deps/couchbase-cxx-client/couchbase/scan_result.hxx +97 -96
  972. package/deps/couchbase-cxx-client/couchbase/scan_result_item.hxx +120 -118
  973. package/deps/couchbase-cxx-client/couchbase/scan_type.hxx +237 -232
  974. package/deps/couchbase-cxx-client/couchbase/scope.hxx +164 -157
  975. package/deps/couchbase-cxx-client/couchbase/scope_search_index_manager.hxx +263 -238
  976. package/deps/couchbase-cxx-client/couchbase/search_date_range.hxx +32 -29
  977. package/deps/couchbase-cxx-client/couchbase/search_facet.hxx +25 -25
  978. package/deps/couchbase-cxx-client/couchbase/search_facet_result.hxx +11 -11
  979. package/deps/couchbase-cxx-client/couchbase/search_geo_distance_units.hxx +11 -1
  980. package/deps/couchbase-cxx-client/couchbase/search_index_manager.hxx +261 -238
  981. package/deps/couchbase-cxx-client/couchbase/search_meta_data.hxx +37 -37
  982. package/deps/couchbase-cxx-client/couchbase/search_metrics.hxx +84 -83
  983. package/deps/couchbase-cxx-client/couchbase/search_numeric_range.hxx +32 -32
  984. package/deps/couchbase-cxx-client/couchbase/search_options.hxx +449 -435
  985. package/deps/couchbase-cxx-client/couchbase/search_query.hxx +32 -30
  986. package/deps/couchbase-cxx-client/couchbase/search_request.hxx +69 -68
  987. package/deps/couchbase-cxx-client/couchbase/search_result.hxx +29 -26
  988. package/deps/couchbase-cxx-client/couchbase/search_row.hxx +52 -52
  989. package/deps/couchbase-cxx-client/couchbase/search_row_location.hxx +20 -20
  990. package/deps/couchbase-cxx-client/couchbase/search_row_locations.hxx +39 -38
  991. package/deps/couchbase-cxx-client/couchbase/search_scan_consistency.hxx +11 -10
  992. package/deps/couchbase-cxx-client/couchbase/search_sort.hxx +20 -20
  993. package/deps/couchbase-cxx-client/couchbase/search_sort_field.hxx +77 -71
  994. package/deps/couchbase-cxx-client/couchbase/search_sort_field_missing.hxx +2 -2
  995. package/deps/couchbase-cxx-client/couchbase/search_sort_field_mode.hxx +3 -3
  996. package/deps/couchbase-cxx-client/couchbase/search_sort_field_type.hxx +4 -4
  997. package/deps/couchbase-cxx-client/couchbase/search_sort_geo_distance.hxx +41 -41
  998. package/deps/couchbase-cxx-client/couchbase/search_sort_id.hxx +23 -23
  999. package/deps/couchbase-cxx-client/couchbase/search_sort_score.hxx +23 -23
  1000. package/deps/couchbase-cxx-client/couchbase/search_term_range.hxx +17 -17
  1001. package/deps/couchbase-cxx-client/couchbase/security_options.hxx +50 -50
  1002. package/deps/couchbase-cxx-client/couchbase/service_type.hxx +34 -34
  1003. package/deps/couchbase-cxx-client/couchbase/store_semantics.hxx +28 -28
  1004. package/deps/couchbase-cxx-client/couchbase/subdoc/array_add_unique.hxx +54 -54
  1005. package/deps/couchbase-cxx-client/couchbase/subdoc/array_append.hxx +40 -40
  1006. package/deps/couchbase-cxx-client/couchbase/subdoc/array_insert.hxx +41 -41
  1007. package/deps/couchbase-cxx-client/couchbase/subdoc/array_prepend.hxx +41 -41
  1008. package/deps/couchbase-cxx-client/couchbase/subdoc/count.hxx +24 -24
  1009. package/deps/couchbase-cxx-client/couchbase/subdoc/counter.hxx +41 -41
  1010. package/deps/couchbase-cxx-client/couchbase/subdoc/exists.hxx +24 -24
  1011. package/deps/couchbase-cxx-client/couchbase/subdoc/get.hxx +45 -29
  1012. package/deps/couchbase-cxx-client/couchbase/subdoc/insert.hxx +70 -54
  1013. package/deps/couchbase-cxx-client/couchbase/subdoc/lookup_in_macro.hxx +13 -12
  1014. package/deps/couchbase-cxx-client/couchbase/subdoc/mutate_in_macro.hxx +7 -2
  1015. package/deps/couchbase-cxx-client/couchbase/subdoc/remove.hxx +24 -24
  1016. package/deps/couchbase-cxx-client/couchbase/subdoc/replace.hxx +55 -39
  1017. package/deps/couchbase-cxx-client/couchbase/subdoc/upsert.hxx +70 -54
  1018. package/deps/couchbase-cxx-client/couchbase/term_facet.hxx +16 -16
  1019. package/deps/couchbase-cxx-client/couchbase/term_facet_result.hxx +14 -14
  1020. package/deps/couchbase-cxx-client/couchbase/term_query.hxx +107 -104
  1021. package/deps/couchbase-cxx-client/couchbase/term_range_query.hxx +99 -96
  1022. package/deps/couchbase-cxx-client/couchbase/timeout_options.hxx +118 -112
  1023. package/deps/couchbase-cxx-client/couchbase/tls_verify_mode.hxx +2 -2
  1024. package/deps/couchbase-cxx-client/couchbase/touch_options.hxx +25 -24
  1025. package/deps/couchbase-cxx-client/couchbase/tracing/otel_tracer.hxx +45 -44
  1026. package/deps/couchbase-cxx-client/couchbase/tracing/request_span.hxx +34 -34
  1027. package/deps/couchbase-cxx-client/couchbase/tracing/request_tracer.hxx +27 -25
  1028. package/deps/couchbase-cxx-client/couchbase/tracing_options.hxx +147 -142
  1029. package/deps/couchbase-cxx-client/couchbase/transactions/async_attempt_context.hxx +149 -115
  1030. package/deps/couchbase-cxx-client/couchbase/transactions/attempt_context.hxx +146 -95
  1031. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_get_result.hxx +52 -80
  1032. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_keyspace.hxx +33 -29
  1033. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +101 -96
  1034. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_options.hxx +228 -223
  1035. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_result.hxx +11 -12
  1036. package/deps/couchbase-cxx-client/couchbase/transactions/transaction_result.hxx +2 -3
  1037. package/deps/couchbase-cxx-client/couchbase/transactions/transactions_cleanup_config.hxx +105 -104
  1038. package/deps/couchbase-cxx-client/couchbase/transactions/transactions_config.hxx +191 -187
  1039. package/deps/couchbase-cxx-client/couchbase/transactions/transactions_query_config.hxx +32 -32
  1040. package/deps/couchbase-cxx-client/couchbase/transactions.hxx +56 -37
  1041. package/deps/couchbase-cxx-client/couchbase/unfreeze_plan_search_index_options.hxx +11 -10
  1042. package/deps/couchbase-cxx-client/couchbase/unlock_options.hxx +25 -24
  1043. package/deps/couchbase-cxx-client/couchbase/update_bucket_options.hxx +9 -9
  1044. package/deps/couchbase-cxx-client/couchbase/update_collection_options.hxx +35 -34
  1045. package/deps/couchbase-cxx-client/couchbase/upsert_options.hxx +85 -80
  1046. package/deps/couchbase-cxx-client/couchbase/upsert_search_index_options.hxx +9 -9
  1047. package/deps/couchbase-cxx-client/couchbase/vector_query.hxx +82 -62
  1048. package/deps/couchbase-cxx-client/couchbase/vector_search.hxx +51 -47
  1049. package/deps/couchbase-cxx-client/couchbase/vector_search_options.hxx +45 -41
  1050. package/deps/couchbase-cxx-client/couchbase/wan_development_configuration_profile.hxx +13 -13
  1051. package/deps/couchbase-cxx-client/couchbase/watch_query_indexes_options.hxx +41 -41
  1052. package/deps/couchbase-cxx-client/couchbase/wildcard_query.hxx +42 -41
  1053. package/deps/couchbase-cxx-client/third_party/expected/include/tl/expected.hpp +1746 -1584
  1054. package/deps/couchbase-cxx-client/third_party/jsonsl/jsonsl.c +2664 -2638
  1055. package/deps/couchbase-cxx-client/third_party/jsonsl/jsonsl.h +359 -342
  1056. package/dist/binding.d.ts +39 -4
  1057. package/dist/binding.js +4 -1
  1058. package/dist/collection.js +0 -1
  1059. package/dist/diagnosticstypes.js +2 -2
  1060. package/dist/searchtypes.d.ts +0 -4
  1061. package/dist/searchtypes.js +0 -4
  1062. package/dist/transactions.d.ts +1 -0
  1063. package/dist/transactions.js +12 -2
  1064. package/dist/vectorsearch.d.ts +4 -19
  1065. package/dist/vectorsearch.js +24 -19
  1066. package/package.json +28 -28
  1067. package/src/constants.cpp +111 -75
  1068. package/src/jstocbpp_autogen.hpp +146 -15
  1069. package/src/jstocbpp_basic.hpp +23 -0
  1070. package/src/jstocbpp_errors.hpp +9 -9
  1071. package/src/jstocbpp_transactions.hpp +17 -12
  1072. package/src/transaction.cpp +10 -5
  1073. package/tools/gen-bindings-js.js +1 -0
  1074. package/tools/gen-bindings-json.py +5 -2
  1075. package/deps/couchbase-cxx-client/core/impl/internal_manager_error_context.cxx +0 -113
  1076. package/deps/couchbase-cxx-client/core/impl/internal_manager_error_context.hxx +0 -60
  1077. package/deps/couchbase-cxx-client/core/impl/manager_error_context.cxx +0 -100
  1078. package/deps/couchbase-cxx-client/core/impl/search_error_context.cxx +0 -147
  1079. package/deps/couchbase-cxx-client/couchbase/analytics_error_context.hxx +0 -143
  1080. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_error_map_attribute.hxx +0 -100
  1081. package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +0 -269
  1082. package/deps/couchbase-cxx-client/couchbase/key_value_error_context.hxx +0 -229
  1083. package/deps/couchbase-cxx-client/couchbase/key_value_error_map_attribute.hxx +0 -136
  1084. package/deps/couchbase-cxx-client/couchbase/key_value_error_map_info.hxx +0 -138
  1085. package/deps/couchbase-cxx-client/couchbase/key_value_extended_error_info.hxx +0 -86
  1086. package/deps/couchbase-cxx-client/couchbase/key_value_status_code.hxx +0 -109
  1087. package/deps/couchbase-cxx-client/couchbase/manager_error_context.hxx +0 -111
  1088. package/deps/couchbase-cxx-client/couchbase/query_error_context.hxx +0 -145
  1089. package/deps/couchbase-cxx-client/couchbase/search_error_context.hxx +0 -138
  1090. package/deps/couchbase-cxx-client/couchbase/subdocument_error_context.hxx +0 -147
  1091. package/deps/couchbase-cxx-client/couchbase/transaction_op_error_context.hxx +0 -76
@@ -68,662 +68,789 @@ class ping_collector_impl
68
68
  , public diag::ping_reporter
69
69
  , public diag::ping_collector
70
70
  {
71
- diag::ping_result res_;
72
- utils::movable_function<void(diag::ping_result)> handler_;
73
- std::atomic_int expected_{ 0 };
74
- std::mutex mutex_{};
75
-
76
- public:
77
- ping_collector_impl(std::string report_id, utils::movable_function<void(diag::ping_result)>&& handler)
78
- : res_{ std::move(report_id), meta::sdk_id() }
79
- , handler_(std::move(handler))
80
- {
81
- }
82
-
83
- ~ping_collector_impl() override
84
- {
85
- invoke_handler();
86
- }
87
-
88
- [[nodiscard]] diag::ping_result& result()
89
- {
90
- return res_;
71
+ diag::ping_result res_;
72
+ utils::movable_function<void(diag::ping_result)> handler_;
73
+ std::atomic_int expected_{ 0 };
74
+ std::mutex mutex_{};
75
+
76
+ public:
77
+ ping_collector_impl(std::string report_id,
78
+ utils::movable_function<void(diag::ping_result)>&& handler)
79
+ : res_{ std::move(report_id), meta::sdk_id() }
80
+ , handler_(std::move(handler))
81
+ {
82
+ }
83
+
84
+ ~ping_collector_impl() override
85
+ {
86
+ invoke_handler();
87
+ }
88
+
89
+ [[nodiscard]] diag::ping_result& result()
90
+ {
91
+ return res_;
92
+ }
93
+
94
+ void report(diag::endpoint_ping_info&& info) override
95
+ {
96
+ const std::scoped_lock lock(mutex_);
97
+ res_.services[info.type].emplace_back(std::move(info));
98
+ if (--expected_ == 0) {
99
+ invoke_handler();
91
100
  }
92
-
93
- void report(diag::endpoint_ping_info&& info) override
94
- {
95
- const std::scoped_lock lock(mutex_);
96
- res_.services[info.type].emplace_back(std::move(info));
97
- if (--expected_ == 0) {
98
- invoke_handler();
99
- }
100
- }
101
-
102
- auto build_reporter() -> std::shared_ptr<diag::ping_reporter> override
103
- {
104
- ++expected_;
105
- return shared_from_this();
106
- }
107
-
108
- void invoke_handler()
109
- {
110
- if (handler_ != nullptr) {
111
- handler_(std::move(res_));
112
- handler_ = nullptr;
113
- }
101
+ }
102
+
103
+ auto build_reporter() -> std::shared_ptr<diag::ping_reporter> override
104
+ {
105
+ ++expected_;
106
+ return shared_from_this();
107
+ }
108
+
109
+ void invoke_handler()
110
+ {
111
+ if (handler_ != nullptr) {
112
+ handler_(std::move(res_));
113
+ handler_ = nullptr;
114
114
  }
115
+ }
115
116
  };
116
117
 
117
118
  template<typename Request>
118
- constexpr bool
119
- is_feature_supported(const Request& /* request */, const configuration_capabilities& /* capabilities */)
119
+ bool
120
+ is_feature_supported(const Request& /* request */,
121
+ const configuration_capabilities& /* capabilities */)
120
122
  {
121
- return true;
123
+ return true;
122
124
  }
123
125
 
124
- constexpr bool
125
- is_feature_supported(const operations::search_request& request, const configuration_capabilities& capabilities)
126
+ bool
127
+ is_feature_supported(const operations::search_request& request,
128
+ const configuration_capabilities& capabilities)
126
129
  {
127
- if (request.scope_name && !capabilities.supports_scoped_search_indexes()) {
128
- return false;
129
- }
130
- if (request.vector_search && !capabilities.supports_vector_search()) {
131
- return false;
132
- }
130
+ if (request.scope_name && !capabilities.supports_scoped_search_indexes()) {
131
+ return false;
132
+ }
133
+ if (request.vector_search && !capabilities.supports_vector_search()) {
134
+ return false;
135
+ }
133
136
 
134
- return true;
137
+ return true;
138
+ }
139
+
140
+ bool
141
+ is_feature_supported(const operations::management::search_index_upsert_request& request,
142
+ const configuration_capabilities& capabilities)
143
+ {
144
+ if (request.index.is_vector_index() && !capabilities.supports_vector_search()) {
145
+ return false;
146
+ }
147
+ return true;
135
148
  }
136
149
 
137
150
  class cluster_impl : public std::enable_shared_from_this<cluster_impl>
138
151
  {
139
- public:
140
- explicit cluster_impl(asio::io_context& ctx)
141
- : ctx_(ctx)
142
- , work_(asio::make_work_guard(ctx_))
143
- , session_manager_(std::make_shared<io::http_session_manager>(id_, ctx_, tls_))
144
- {
152
+ public:
153
+ explicit cluster_impl(asio::io_context& ctx)
154
+ : ctx_(ctx)
155
+ , work_(asio::make_work_guard(ctx_))
156
+ , session_manager_(std::make_shared<io::http_session_manager>(id_, ctx_, tls_))
157
+ {
158
+ }
159
+
160
+ auto io_context() -> asio::io_context&
161
+ {
162
+ return ctx_;
163
+ }
164
+
165
+ void configure_tls_options(bool has_capella_host)
166
+ {
167
+ asio::ssl::context::options tls_options =
168
+ asio::ssl::context::default_workarounds | // various bug workarounds that should be rather
169
+ // harmless
170
+ asio::ssl::context::no_sslv2 | // published: 1995, deprecated: 2011
171
+ asio::ssl::context::no_sslv3; // published: 1996, deprecated: 2015
172
+ if (origin_.options().tls_disable_deprecated_protocols) {
173
+ tls_options |= asio::ssl::context::no_tlsv1 | // published: 1999, deprecated: 2021
174
+ asio::ssl::context::no_tlsv1_1; // published: 2006, deprecated: 2021
145
175
  }
146
-
147
- auto io_context() -> asio::io_context&
148
- {
149
- return ctx_;
176
+ if (origin_.options().tls_disable_v1_2 || has_capella_host) {
177
+ tls_options |= asio::ssl::context::no_tlsv1_2; // published: 2008, still in use
178
+ }
179
+ tls_.set_options(tls_options);
180
+ switch (origin_.options().tls_verify) {
181
+ case tls_verify_mode::none:
182
+ tls_.set_verify_mode(asio::ssl::verify_none);
183
+ break;
184
+
185
+ case tls_verify_mode::peer:
186
+ tls_.set_verify_mode(asio::ssl::verify_peer);
187
+ break;
150
188
  }
151
-
152
- void configure_tls_options(bool has_capella_host)
153
- {
154
- asio::ssl::context::options tls_options =
155
- asio::ssl::context::default_workarounds | // various bug workarounds that should be rather harmless
156
- asio::ssl::context::no_sslv2 | // published: 1995, deprecated: 2011
157
- asio::ssl::context::no_sslv3; // published: 1996, deprecated: 2015
158
- if (origin_.options().tls_disable_deprecated_protocols) {
159
- tls_options |= asio::ssl::context::no_tlsv1 | // published: 1999, deprecated: 2021
160
- asio::ssl::context::no_tlsv1_1; // published: 2006, deprecated: 2021
161
- }
162
- if (origin_.options().tls_disable_v1_2 || has_capella_host) {
163
- tls_options |= asio::ssl::context::no_tlsv1_2; // published: 2008, still in use
164
- }
165
- tls_.set_options(tls_options);
166
- switch (origin_.options().tls_verify) {
167
- case tls_verify_mode::none:
168
- tls_.set_verify_mode(asio::ssl::verify_none);
169
- break;
170
-
171
- case tls_verify_mode::peer:
172
- tls_.set_verify_mode(asio::ssl::verify_peer);
173
- break;
174
- }
175
189
 
176
190
  #ifdef COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE
177
- SSL_CTX_set_keylog_callback(tls_.native_handle(), [](const SSL* /* ssl */, const char* line) {
178
- std::ofstream keylog(COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE, std::ios::out | std::ios::app | std::ios::binary);
179
- keylog << std::string_view(line) << std::endl;
180
- });
181
- CB_LOG_CRITICAL(
182
- "COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE was set to \"{}\" during build, all TLS keys will be logged for network analysis "
183
- "(https://wiki.wireshark.org/TLS). DO NOT USE THIS BUILD IN PRODUCTION",
184
- COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE);
191
+ SSL_CTX_set_keylog_callback(tls_.native_handle(), [](const SSL* /* ssl */, const char* line) {
192
+ std::ofstream keylog(COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE,
193
+ std::ios::out | std::ios::app | std::ios::binary);
194
+ keylog << std::string_view(line) << std::endl;
195
+ });
196
+ CB_LOG_CRITICAL("COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE was set to \"{}\" during build, all TLS "
197
+ "keys will be logged "
198
+ "for network analysis "
199
+ "(https://wiki.wireshark.org/TLS). DO NOT USE THIS BUILD IN PRODUCTION",
200
+ COUCHBASE_CXX_CLIENT_TLS_KEY_LOG_FILE);
185
201
  #endif
186
- }
202
+ }
187
203
 
188
- void open(couchbase::core::origin origin, utils::movable_function<void(std::error_code)>&& handler)
189
- {
190
- if (stopped_) {
191
- return handler(errc::network::cluster_closed);
192
- }
193
- if (origin.get_nodes().empty()) {
194
- stopped_ = true;
195
- work_.reset();
196
- return handler(errc::common::invalid_argument);
197
- }
198
-
199
- origin_ = std::move(origin);
200
- CB_LOG_DEBUG(R"(open cluster, id: "{}", core version: "{}", {})", id_, couchbase::core::meta::sdk_semver(), origin_.to_json());
201
- // ignore the enable_tracing flag if a tracer was passed in
202
- if (nullptr != origin_.options().tracer) {
203
- tracer_ = origin_.options().tracer;
204
- } else {
205
- if (origin_.options().enable_tracing) {
206
- tracer_ = std::make_shared<tracing::threshold_logging_tracer>(ctx_, origin_.options().tracing_options);
207
- } else {
208
- tracer_ = std::make_shared<tracing::noop_tracer>();
209
- }
210
- }
211
- tracer_->start();
212
- // ignore the metrics options if a meter was passed in.
213
- if (nullptr != origin_.options().meter) {
214
- meter_ = origin_.options().meter;
215
- } else {
216
- if (origin_.options().enable_metrics) {
217
- meter_ = std::make_shared<metrics::logging_meter>(ctx_, origin_.options().metrics_options);
218
- } else {
219
- meter_ = std::make_shared<metrics::noop_meter>();
220
- }
221
- }
222
- meter_->start();
223
- session_manager_->set_tracer(tracer_);
224
- if (origin_.options().enable_dns_srv) {
225
- std::string hostname;
226
- std::string port;
227
- std::tie(hostname, port) = origin_.next_address();
228
- dns_srv_tracker_ =
229
- std::make_shared<impl::dns_srv_tracker>(ctx_, hostname, origin_.options().dns_config, origin_.options().enable_tls);
230
- return asio::post(asio::bind_executor(
231
- ctx_, [self = shared_from_this(), hostname = std::move(hostname), handler = std::move(handler)]() mutable {
232
- return self->dns_srv_tracker_->get_srv_nodes([self, hostname = std::move(hostname), handler = std::move(handler)](
233
- origin::node_list nodes, std::error_code ec) mutable {
234
- if (ec) {
235
- return self->close([ec, handler = std::move(handler)]() mutable { handler(ec); });
236
- }
237
- if (!nodes.empty()) {
238
- self->origin_.set_nodes(std::move(nodes));
239
- CB_LOG_INFO("replace list of bootstrap nodes with addresses from DNS SRV of \"{}\": [{}]",
240
- hostname,
241
- utils::join_strings(self->origin_.get_nodes(), ", "));
242
- }
243
- return self->do_open(std::move(handler));
244
- });
245
- }));
246
- }
247
- do_open(std::move(handler));
204
+ void open(couchbase::core::origin origin,
205
+ utils::movable_function<void(std::error_code)>&& handler)
206
+ {
207
+ if (stopped_) {
208
+ return handler(errc::network::cluster_closed);
209
+ }
210
+ if (origin.get_nodes().empty()) {
211
+ stopped_ = true;
212
+ work_.reset();
213
+ return handler(errc::common::invalid_argument);
248
214
  }
249
215
 
250
- void open_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler)
216
+ origin_ = std::move(origin);
217
+ CB_LOG_DEBUG(R"(open cluster, id: "{}", core version: "{}", {})",
218
+ id_,
219
+ couchbase::core::meta::sdk_semver(),
220
+ origin_.to_json());
221
+ // ignore the enable_tracing flag if a tracer was passed in
222
+ if (nullptr != origin_.options().tracer) {
223
+ tracer_ = origin_.options().tracer;
224
+ } else {
225
+ if (origin_.options().enable_tracing) {
226
+ tracer_ = std::make_shared<tracing::threshold_logging_tracer>(
227
+ ctx_, origin_.options().tracing_options);
228
+ } else {
229
+ tracer_ = std::make_shared<tracing::noop_tracer>();
230
+ }
231
+ }
232
+ tracer_->start();
233
+ // ignore the metrics options if a meter was passed in.
234
+ if (nullptr != origin_.options().meter) {
235
+ meter_ = origin_.options().meter;
236
+ } else {
237
+ if (origin_.options().enable_metrics) {
238
+ meter_ = std::make_shared<metrics::logging_meter>(ctx_, origin_.options().metrics_options);
239
+ } else {
240
+ meter_ = std::make_shared<metrics::noop_meter>();
241
+ }
242
+ }
243
+ meter_->start();
244
+ session_manager_->set_tracer(tracer_);
245
+ if (origin_.options().enable_dns_srv) {
246
+ std::string hostname;
247
+ std::string port;
248
+ std::tie(hostname, port) = origin_.next_address();
249
+ dns_srv_tracker_ = std::make_shared<impl::dns_srv_tracker>(
250
+ ctx_, hostname, origin_.options().dns_config, origin_.options().enable_tls);
251
+ return asio::post(asio::bind_executor(
252
+ ctx_,
253
+ [self = shared_from_this(),
254
+ hostname = std::move(hostname),
255
+ handler = std::move(handler)]() mutable {
256
+ return self->dns_srv_tracker_->get_srv_nodes(
257
+ [self, hostname = std::move(hostname), handler = std::move(handler)](
258
+ origin::node_list nodes, std::error_code ec) mutable {
259
+ if (ec) {
260
+ return self->close([ec, handler = std::move(handler)]() mutable {
261
+ handler(ec);
262
+ });
263
+ }
264
+ if (!nodes.empty()) {
265
+ self->origin_.set_nodes(std::move(nodes));
266
+ CB_LOG_INFO(
267
+ "replace list of bootstrap nodes with addresses from DNS SRV of \"{}\": [{}]",
268
+ hostname,
269
+ utils::join_strings(self->origin_.get_nodes(), ", "));
270
+ }
271
+ return self->do_open(std::move(handler));
272
+ });
273
+ }));
274
+ }
275
+ do_open(std::move(handler));
276
+ }
277
+
278
+ void open_bucket(const std::string& bucket_name,
279
+ utils::movable_function<void(std::error_code)>&& handler)
280
+ {
281
+ if (stopped_) {
282
+ return handler(errc::network::cluster_closed);
283
+ }
284
+ std::shared_ptr<bucket> b{};
251
285
  {
252
- if (stopped_) {
253
- return handler(errc::network::cluster_closed);
286
+ std::scoped_lock lock(buckets_mutex_);
287
+ auto ptr = buckets_.find(bucket_name);
288
+ if (ptr == buckets_.end()) {
289
+ std::vector<protocol::hello_feature> known_features;
290
+
291
+ auto origin = origin_;
292
+ if (session_ && session_->has_config()) {
293
+ known_features = session_->supported_features();
294
+ origin = { origin_, session_->config().value() };
254
295
  }
255
- std::shared_ptr<bucket> b{};
256
- {
257
- std::scoped_lock lock(buckets_mutex_);
258
- auto ptr = buckets_.find(bucket_name);
259
- if (ptr == buckets_.end()) {
260
- std::vector<protocol::hello_feature> known_features;
261
-
262
- auto origin = origin_;
263
- if (session_ && session_->has_config()) {
264
- known_features = session_->supported_features();
265
- origin = { origin_, session_->config().value() };
266
- }
267
296
 
268
- b = std::make_shared<bucket>(id_, ctx_, tls_, tracer_, meter_, bucket_name, origin, known_features, dns_srv_tracker_);
269
- buckets_.try_emplace(bucket_name, b);
270
- }
271
- }
272
- if (b == nullptr) {
273
- return handler({});
274
- }
275
-
276
- b->on_configuration_update(session_manager_);
277
- b->bootstrap([self = shared_from_this(), bucket_name, handler = std::move(handler)](std::error_code ec,
278
- const topology::configuration& config) mutable {
279
- if (ec) {
280
- std::scoped_lock lock(self->buckets_mutex_);
281
- self->buckets_.erase(bucket_name);
282
- } else if (self->session_ && !self->session_->supports_gcccp()) {
283
- self->session_manager_->set_configuration(config, self->origin_.options());
284
- }
285
- handler(ec);
286
- });
297
+ b = std::make_shared<bucket>(
298
+ id_, ctx_, tls_, tracer_, meter_, bucket_name, origin, known_features, dns_srv_tracker_);
299
+ buckets_.try_emplace(bucket_name, b);
300
+ }
301
+ }
302
+ if (b == nullptr) {
303
+ return handler({});
287
304
  }
288
305
 
289
- void close_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler)
306
+ b->on_configuration_update(session_manager_);
307
+ b->bootstrap([self = shared_from_this(), bucket_name, handler = std::move(handler)](
308
+ std::error_code ec, const topology::configuration& config) mutable {
309
+ if (ec) {
310
+ std::scoped_lock lock(self->buckets_mutex_);
311
+ self->buckets_.erase(bucket_name);
312
+ } else if (self->session_ && !self->session_->supports_gcccp()) {
313
+ self->session_manager_->set_configuration(config, self->origin_.options());
314
+ }
315
+ handler(ec);
316
+ });
317
+ }
318
+
319
+ void close_bucket(const std::string& bucket_name,
320
+ utils::movable_function<void(std::error_code)>&& handler)
321
+ {
322
+ if (stopped_) {
323
+ return handler(errc::network::cluster_closed);
324
+ }
325
+ std::shared_ptr<bucket> b{};
290
326
  {
291
- if (stopped_) {
292
- return handler(errc::network::cluster_closed);
293
- }
294
- std::shared_ptr<bucket> b{};
295
- {
296
- std::scoped_lock lock(buckets_mutex_);
327
+ std::scoped_lock lock(buckets_mutex_);
297
328
 
298
- if (auto ptr = buckets_.find(bucket_name); ptr != buckets_.end()) {
299
- b = std::move(ptr->second);
300
- buckets_.erase(ptr);
301
- }
302
- }
303
- if (b != nullptr) {
304
- b->close();
305
- }
306
- return handler({});
329
+ if (auto ptr = buckets_.find(bucket_name); ptr != buckets_.end()) {
330
+ b = std::move(ptr->second);
331
+ buckets_.erase(ptr);
332
+ }
307
333
  }
308
-
309
- std::pair<std::error_code, couchbase::core::origin> origin() const
310
- {
311
- if (stopped_) {
312
- return { errc::network::cluster_closed, {} };
313
- }
314
- return { {}, origin_ };
334
+ if (b != nullptr) {
335
+ b->close();
315
336
  }
337
+ return handler({});
338
+ }
316
339
 
317
- template<class Request,
318
- class Handler,
319
- typename std::enable_if_t<!std::is_same_v<typename Request::encoded_request_type, io::http_request>, int> = 0>
320
- void execute(Request request, Handler&& handler)
321
- {
322
- using response_type = typename Request::encoded_response_type;
323
- if (stopped_) {
324
- return handler(request.make_response(make_key_value_error_context(errc::network::cluster_closed, request.id), response_type{}));
325
- }
326
- if (auto bucket = find_bucket_by_name(request.id.bucket()); bucket != nullptr) {
327
- return bucket->execute(std::move(request), std::forward<Handler>(handler));
328
- }
329
- if (request.id.bucket().empty()) {
330
- return handler(
331
- request.make_response(make_key_value_error_context(errc::common::bucket_not_found, request.id), response_type{}));
332
- }
333
- auto bucket_name = request.id.bucket();
334
- return open_bucket(
335
- bucket_name,
336
- [self = shared_from_this(), request = std::move(request), handler = std::forward<Handler>(handler)](std::error_code ec) mutable {
337
- if (ec) {
338
- return handler(request.make_response(make_key_value_error_context(ec, request.id), response_type{}));
339
- }
340
- return self->execute(std::move(request), std::forward<Handler>(handler));
341
- });
340
+ std::pair<std::error_code, couchbase::core::origin> origin() const
341
+ {
342
+ if (stopped_) {
343
+ return { errc::network::cluster_closed, {} };
342
344
  }
343
-
344
- template<class Request,
345
- class Handler,
346
- typename std::enable_if_t<std::is_same_v<typename Request::encoded_request_type, io::http_request>, int> = 0>
347
- void execute(Request request, Handler&& handler)
348
- {
349
- using response_type = typename Request::encoded_response_type;
350
- if (stopped_) {
351
- return handler(request.make_response({ errc::network::cluster_closed }, response_type{}));
352
- }
353
- if (!is_feature_supported(request, session_manager_->configuration_capabilities())) {
354
- return handler(request.make_response({ errc::common::feature_not_available }, response_type{}));
355
- }
356
- if constexpr (operations::is_compound_operation_v<Request>) {
357
- return request.execute(shared_from_this(), std::forward<Handler>(handler));
358
- } else {
359
- return session_manager_->execute(std::move(request), std::forward<Handler>(handler), origin_.credentials());
360
- }
345
+ return { {}, origin_ };
346
+ }
347
+
348
+ template<class Request,
349
+ class Handler,
350
+ typename std::enable_if_t<
351
+ !std::is_same_v<typename Request::encoded_request_type, io::http_request>,
352
+ int> = 0>
353
+ void execute(Request request, Handler&& handler)
354
+ {
355
+ using response_type = typename Request::encoded_response_type;
356
+ if (stopped_) {
357
+ return handler(request.make_response(
358
+ make_key_value_error_context(errc::network::cluster_closed, request.id), response_type{}));
361
359
  }
362
-
363
- template<class Request,
364
- class Handler,
365
- typename std::enable_if_t<std::is_same_v<typename Request::encoded_request_type, io::http_request>, int> = 0>
366
- void execute_with_bucket_capability_check(Request request, bucket_capability cap, Handler&& handler)
367
- {
368
- auto bucket_name = request.bucket_name;
369
- return open_bucket(
360
+ if (auto bucket = find_bucket_by_name(request.id.bucket()); bucket != nullptr) {
361
+ return bucket->execute(std::move(request), std::forward<Handler>(handler));
362
+ }
363
+ if (request.id.bucket().empty()) {
364
+ return handler(request.make_response(
365
+ make_key_value_error_context(errc::common::bucket_not_found, request.id), response_type{}));
366
+ }
367
+ auto bucket_name = request.id.bucket();
368
+ return open_bucket(bucket_name,
369
+ [self = shared_from_this(),
370
+ request = std::move(request),
371
+ handler = std::forward<Handler>(handler)](std::error_code ec) mutable {
372
+ if (ec) {
373
+ return handler(request.make_response(
374
+ make_key_value_error_context(ec, request.id), response_type{}));
375
+ }
376
+ return self->execute(std::move(request), std::forward<Handler>(handler));
377
+ });
378
+ }
379
+
380
+ template<class Request,
381
+ class Handler,
382
+ typename std::enable_if_t<
383
+ std::is_same_v<typename Request::encoded_request_type, io::http_request>,
384
+ int> = 0>
385
+ void execute(Request request, Handler&& handler)
386
+ {
387
+ using response_type = typename Request::encoded_response_type;
388
+ if (stopped_) {
389
+ return handler(request.make_response({ errc::network::cluster_closed }, response_type{}));
390
+ }
391
+ if (!is_feature_supported(request, session_manager_->configuration_capabilities())) {
392
+ return handler(
393
+ request.make_response({ errc::common::feature_not_available }, response_type{}));
394
+ }
395
+ if constexpr (operations::is_compound_operation_v<Request>) {
396
+ return request.execute(shared_from_this(), std::forward<Handler>(handler));
397
+ } else {
398
+ return session_manager_->execute(
399
+ std::move(request), std::forward<Handler>(handler), origin_.credentials());
400
+ }
401
+ }
402
+
403
+ template<class Request,
404
+ class Handler,
405
+ typename std::enable_if_t<
406
+ std::is_same_v<typename Request::encoded_request_type, io::http_request>,
407
+ int> = 0>
408
+ void execute_with_bucket_capability_check(Request request,
409
+ bucket_capability cap,
410
+ Handler&& handler)
411
+ {
412
+ auto bucket_name = request.bucket_name;
413
+ return open_bucket(
414
+ bucket_name,
415
+ [self = shared_from_this(),
416
+ bucket_name,
417
+ cap,
418
+ request = std::move(request),
419
+ handler = std::forward<Handler>(handler)](std::error_code ec) mutable {
420
+ if (ec) {
421
+ handler(request.make_response({ ec }, {}));
422
+ return;
423
+ }
424
+ return self->with_bucket_configuration(
370
425
  bucket_name,
371
- [self = shared_from_this(), bucket_name, cap, request = std::move(request), handler = std::forward<Handler>(handler)](
372
- std::error_code ec) mutable {
373
- if (ec) {
374
- handler(request.make_response({ ec }, {}));
375
- return;
376
- }
377
- return self->with_bucket_configuration(
378
- bucket_name,
379
- [self = std::move(self), cap, request = std::move(request), handler = std::forward<Handler>(handler)](
380
- std::error_code ec, topology::configuration config) mutable {
381
- if (ec) {
382
- handler(request.make_response({ ec }, {}));
383
- return;
384
- }
385
- if (!config.capabilities.has_bucket_capability(cap)) {
386
- handler(request.make_response({ errc::common::feature_not_available }, {}));
387
- return;
388
- }
389
- return self->execute(std::move(request), std::forward<Handler>(handler));
390
- });
426
+ [self = std::move(self),
427
+ cap,
428
+ request = std::move(request),
429
+ handler = std::forward<Handler>(handler)](std::error_code ec,
430
+ topology::configuration config) mutable {
431
+ if (ec) {
432
+ handler(request.make_response({ ec }, {}));
433
+ return;
434
+ }
435
+ if (!config.capabilities.has_bucket_capability(cap)) {
436
+ handler(request.make_response({ errc::common::feature_not_available }, {}));
437
+ return;
438
+ }
439
+ return self->execute(std::move(request), std::forward<Handler>(handler));
391
440
  });
392
- }
441
+ });
442
+ }
393
443
 
394
- std::shared_ptr<bucket> find_bucket_by_name(const std::string& name)
395
- {
396
- std::scoped_lock lock(buckets_mutex_);
444
+ std::shared_ptr<bucket> find_bucket_by_name(const std::string& name)
445
+ {
446
+ std::scoped_lock lock(buckets_mutex_);
397
447
 
398
- auto bucket = buckets_.find(name);
399
- if (bucket == buckets_.end()) {
400
- return {};
401
- }
402
- return bucket->second;
448
+ auto bucket = buckets_.find(name);
449
+ if (bucket == buckets_.end()) {
450
+ return {};
403
451
  }
452
+ return bucket->second;
453
+ }
404
454
 
405
- void for_each_bucket(utils::movable_function<void(std::shared_ptr<bucket>)> handler)
455
+ void for_each_bucket(utils::movable_function<void(std::shared_ptr<bucket>)> handler)
456
+ {
457
+ std::vector<std::shared_ptr<bucket>> buckets{};
406
458
  {
407
- std::vector<std::shared_ptr<bucket>> buckets{};
408
- {
409
- std::scoped_lock lock(buckets_mutex_);
410
- buckets.reserve(buckets_.size());
411
- for (const auto& [name, bucket] : buckets_) {
412
- buckets.push_back(bucket);
413
- }
414
- }
415
- for (auto bucket : buckets) {
416
- handler(bucket);
417
- }
459
+ std::scoped_lock lock(buckets_mutex_);
460
+ buckets.reserve(buckets_.size());
461
+ for (const auto& [name, bucket] : buckets_) {
462
+ buckets.push_back(bucket);
463
+ }
464
+ }
465
+ for (auto bucket : buckets) {
466
+ handler(bucket);
467
+ }
468
+ }
469
+
470
+ void do_open(utils::movable_function<void(std::error_code)> handler)
471
+ {
472
+ // Warn users if idle_http_connection_timeout is too close to server idle timeouts
473
+ if (origin_.options().idle_http_connection_timeout > std::chrono::milliseconds(4'500)) {
474
+ CB_LOG_INFO("[{}]: The SDK may produce trivial warnings due to the idle HTTP connection "
475
+ "timeout being set above the idle"
476
+ "timeout of various services",
477
+ id_);
418
478
  }
419
479
 
420
- void do_open(utils::movable_function<void(std::error_code)> handler)
480
+ // Warn users if they attempt to use Capella without TLS being enabled.
481
+ bool has_capella_host = false;
421
482
  {
422
- // Warn users if idle_http_connection_timeout is too close to server idle timeouts
423
- if (origin_.options().idle_http_connection_timeout > std::chrono::milliseconds(4'500)) {
424
- CB_LOG_INFO("[{}]: The SDK may produce trivial warnings due to the idle HTTP connection timeout being set above the idle"
425
- "timeout of various services",
426
- id_);
483
+ bool has_non_capella_host = false;
484
+ static std::string suffix = "cloud.couchbase.com";
485
+ for (const auto& node : origin_.get_hostnames()) {
486
+ if (auto pos = node.find(suffix);
487
+ pos != std::string::npos && pos + suffix.size() == node.size()) {
488
+ has_capella_host = true;
489
+ } else {
490
+ has_non_capella_host = true;
427
491
  }
492
+ }
493
+
494
+ if (has_capella_host && !origin_.options().enable_tls) {
495
+ CB_LOG_WARNING("[{}]: TLS is required when connecting to Couchbase Capella. Please enable "
496
+ "TLS by prefixing "
497
+ "the connection string with \"couchbases://\" (note the final 's').",
498
+ id_);
499
+ }
500
+
501
+ if (origin_.options().enable_tls /* TLS is enabled */
502
+ && origin_.options()
503
+ .trust_certificate.empty() /* No CA certificate (or other SDK-specific trust source) is specified */
504
+ && origin_.options().trust_certificate_value.empty() /* and certificate value has not been specified */
505
+ && origin_.options().tls_verify != tls_verify_mode::none /* The user did not disable all TLS verification */
506
+ &&
507
+ has_non_capella_host /* The connection string has a hostname that does NOT end in ".cloud.couchbase.com" */) {
508
+ CB_LOG_WARNING("[{}] When TLS is enabled, the cluster options must specify certificate(s) "
509
+ "to trust or ensure that they are "
510
+ "available in system CA store. (Unless connecting to cloud.couchbase.com.)",
511
+ id_);
512
+ }
513
+ }
428
514
 
429
- // Warn users if they attempt to use Capella without TLS being enabled.
430
- bool has_capella_host = false;
431
- {
432
- bool has_non_capella_host = false;
433
- static std::string suffix = "cloud.couchbase.com";
434
- for (const auto& node : origin_.get_hostnames()) {
435
- if (auto pos = node.find(suffix); pos != std::string::npos && pos + suffix.size() == node.size()) {
436
- has_capella_host = true;
437
- } else {
438
- has_non_capella_host = true;
439
- }
440
- }
515
+ if (origin_.options().enable_tls) {
516
+ configure_tls_options(has_capella_host);
441
517
 
442
- if (has_capella_host && !origin_.options().enable_tls) {
443
- CB_LOG_WARNING("[{}]: TLS is required when connecting to Couchbase Capella. Please enable TLS by prefixing "
444
- "the connection string with \"couchbases://\" (note the final 's').",
445
- id_);
446
- }
518
+ if (origin_.options().trust_certificate.empty() &&
519
+ origin_.options()
520
+ .trust_certificate_value.empty()) { // trust certificate is not explicitly specified
521
+ CB_LOG_DEBUG(R"([{}]: use default CA for TLS verify)", id_);
522
+ std::error_code ec{};
447
523
 
448
- if (origin_.options().enable_tls /* TLS is enabled */
449
- && origin_.options().trust_certificate.empty() /* No CA certificate (or other SDK-specific trust source) is specified */
450
- && origin_.options().trust_certificate_value.empty() /* and certificate value has not been specified */
451
- && origin_.options().tls_verify != tls_verify_mode::none /* The user did not disable all TLS verification */
452
- && has_non_capella_host /* The connection string has a hostname that does NOT end in ".cloud.couchbase.com" */) {
453
- CB_LOG_WARNING("[{}] When TLS is enabled, the cluster options must specify certificate(s) to trust or ensure that they are "
454
- "available in system CA store. (Unless connecting to cloud.couchbase.com.)",
455
- id_);
456
- }
524
+ // load system certificates
525
+ tls_.set_default_verify_paths(ec);
526
+ if (ec) {
527
+ CB_LOG_WARNING(R"([{}]: failed to load system CAs: {})", id_, ec.message());
457
528
  }
458
529
 
459
- if (origin_.options().enable_tls) {
460
- configure_tls_options(has_capella_host);
461
-
462
- if (origin_.options().trust_certificate.empty() &&
463
- origin_.options().trust_certificate_value.empty()) { // trust certificate is not explicitly specified
464
- CB_LOG_DEBUG(R"([{}]: use default CA for TLS verify)", id_);
465
- std::error_code ec{};
466
-
467
- // load system certificates
468
- tls_.set_default_verify_paths(ec);
469
- if (ec) {
470
- CB_LOG_WARNING(R"([{}]: failed to load system CAs: {})", id_, ec.message());
471
- }
472
-
473
- // add the Capella Root CA in addition to system CAs
474
- tls_.add_certificate_authority(
475
- asio::const_buffer(couchbase::core::default_ca::capellaCaCert, strlen(couchbase::core::default_ca::capellaCaCert)), ec);
476
- if (ec) {
477
- CB_LOG_WARNING("[{}]: unable to load default CAs: {}", id_, ec.message());
478
- // we don't consider this fatal and try to continue without it
479
- }
480
-
481
- if (const auto certificates = default_ca::mozilla_ca_certs();
482
- !origin_.options().disable_mozilla_ca_certificates && !certificates.empty()) {
483
- CB_LOG_DEBUG("[{}]: loading {} CA certificates from Mozilla bundle. Update date: \"{}\", SHA256: \"{}\"",
484
- id_,
485
- certificates.size(),
486
- default_ca::mozilla_ca_certs_date(),
487
- default_ca::mozilla_ca_certs_sha256());
488
- for (const auto& cert : certificates) {
489
- tls_.add_certificate_authority(asio::const_buffer(cert.body.data(), cert.body.size()), ec);
490
- if (ec) {
491
- CB_LOG_WARNING("[{}]: unable to load CA \"{}\" from Mozilla bundle: {}", id_, cert.authority, ec.message());
492
- }
493
- }
494
- }
495
- } else { // trust certificate is explicitly specified
496
- std::error_code ec{};
497
- // load only the explicit certificate
498
- // system and default capella certificates are not loaded
499
- if (!origin_.options().trust_certificate_value.empty()) {
500
- CB_LOG_DEBUG(R"([{}]: use TLS certificate passed through via options object)", id_);
501
- tls_.add_certificate_authority(asio::const_buffer(origin_.options().trust_certificate_value.data(),
502
- origin_.options().trust_certificate_value.size()),
503
- ec);
504
- if (ec) {
505
- CB_LOG_WARNING("[{}]: unable to load CA passed via options object: {}", id_, ec.message());
506
- }
507
- }
508
- if (!origin_.options().trust_certificate.empty()) {
509
- CB_LOG_DEBUG(R"([{}]: use TLS verify file: "{}")", id_, origin_.options().trust_certificate);
510
- tls_.load_verify_file(origin_.options().trust_certificate, ec);
511
- if (ec) {
512
- CB_LOG_ERROR("[{}]: unable to load verify file \"{}\": {}", id_, origin_.options().trust_certificate, ec.message());
513
- return close([ec, handler = std::move(handler)]() mutable { return handler(ec); });
514
- }
515
- }
516
- }
517
- if (origin_.credentials().uses_certificate()) {
518
- std::error_code ec{};
519
- CB_LOG_DEBUG(R"([{}]: use TLS certificate chain: "{}")", id_, origin_.certificate_path());
520
- tls_.use_certificate_chain_file(origin_.certificate_path(), ec);
521
- if (ec) {
522
- CB_LOG_ERROR("[{}]: unable to load certificate chain \"{}\": {}", id_, origin_.certificate_path(), ec.message());
523
- return close([ec, handler = std::move(handler)]() mutable { return handler(ec); });
524
- }
525
- CB_LOG_DEBUG(R"([{}]: use TLS private key: "{}")", id_, origin_.key_path());
526
- tls_.use_private_key_file(origin_.key_path(), asio::ssl::context::file_format::pem, ec);
527
- if (ec) {
528
- CB_LOG_ERROR("[{}]: unable to load private key \"{}\": {}", id_, origin_.key_path(), ec.message());
529
- return close([ec, handler = std::move(handler)]() mutable { return handler(ec); });
530
- }
531
- }
532
- session_ = io::mcbp_session(id_, ctx_, tls_, origin_, dns_srv_tracker_);
533
- } else {
534
- session_ = io::mcbp_session(id_, ctx_, origin_, dns_srv_tracker_);
530
+ // add the Capella Root CA in addition to system CAs
531
+ tls_.add_certificate_authority(
532
+ asio::const_buffer(couchbase::core::default_ca::capellaCaCert,
533
+ strlen(couchbase::core::default_ca::capellaCaCert)),
534
+ ec);
535
+ if (ec) {
536
+ CB_LOG_WARNING("[{}]: unable to load default CAs: {}", id_, ec.message());
537
+ // we don't consider this fatal and try to continue without it
535
538
  }
536
- session_->bootstrap(
537
- [self = shared_from_this(), handler = std::move(handler)](std::error_code ec, const topology::configuration& config) mutable {
538
- if (!ec) {
539
- if (self->origin_.options().network == "auto") {
540
- self->origin_.options().network = config.select_network(self->session_->bootstrap_hostname());
541
- if (self->origin_.options().network == "default") {
542
- CB_LOG_DEBUG(R"({} detected network is "{}")", self->session_->log_prefix(), self->origin_.options().network);
543
- } else {
544
- CB_LOG_INFO(R"({} detected network is "{}")", self->session_->log_prefix(), self->origin_.options().network);
545
- }
546
- }
547
- if (self->origin_.options().network != "default") {
548
- self->origin_.set_nodes_from_config(config);
549
- CB_LOG_INFO("replace list of bootstrap nodes with addresses of alternative network \"{}\": [{}]",
550
- self->origin_.options().network,
551
- utils::join_strings(self->origin_.get_nodes(), ","));
552
- }
553
- self->session_manager_->set_configuration(config, self->origin_.options());
554
- self->session_->on_configuration_update(self->session_manager_);
555
- self->session_->on_stop([self]() {
556
- if (self->session_) {
557
- self->session_.reset();
558
- }
559
- });
560
- }
561
- if (ec) {
562
- return self->close([ec, handler = std::move(handler)]() mutable { handler(ec); });
563
- }
564
- handler(ec);
565
- });
566
- }
567
539
 
568
- void with_bucket_configuration(const std::string& bucket_name,
569
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler)
570
- {
571
- if (stopped_) {
572
- return handler(errc::network::cluster_closed, {});
540
+ if (const auto certificates = default_ca::mozilla_ca_certs();
541
+ !origin_.options().disable_mozilla_ca_certificates && !certificates.empty()) {
542
+ CB_LOG_DEBUG("[{}]: loading {} CA certificates from Mozilla bundle. Update date: \"{}\", "
543
+ "SHA256: \"{}\"",
544
+ id_,
545
+ certificates.size(),
546
+ default_ca::mozilla_ca_certs_date(),
547
+ default_ca::mozilla_ca_certs_sha256());
548
+ for (const auto& cert : certificates) {
549
+ tls_.add_certificate_authority(asio::const_buffer(cert.body.data(), cert.body.size()),
550
+ ec);
551
+ if (ec) {
552
+ CB_LOG_WARNING("[{}]: unable to load CA \"{}\" from Mozilla bundle: {}",
553
+ id_,
554
+ cert.authority,
555
+ ec.message());
556
+ }
557
+ }
573
558
  }
574
- if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
575
- return bucket->with_configuration(std::move(handler));
559
+ } else { // trust certificate is explicitly specified
560
+ std::error_code ec{};
561
+ // load only the explicit certificate
562
+ // system and default capella certificates are not loaded
563
+ if (!origin_.options().trust_certificate_value.empty()) {
564
+ CB_LOG_DEBUG(R"([{}]: use TLS certificate passed through via options object)", id_);
565
+ tls_.add_certificate_authority(
566
+ asio::const_buffer(origin_.options().trust_certificate_value.data(),
567
+ origin_.options().trust_certificate_value.size()),
568
+ ec);
569
+ if (ec) {
570
+ CB_LOG_WARNING(
571
+ "[{}]: unable to load CA passed via options object: {}", id_, ec.message());
572
+ }
576
573
  }
577
- return handler(errc::common::bucket_not_found, {});
578
- }
579
-
580
- void ping(std::optional<std::string> report_id,
581
- std::optional<std::string> bucket_name,
582
- std::set<service_type> services,
583
- std::optional<std::chrono::milliseconds> timeout,
584
- utils::movable_function<void(diag::ping_result)> handler)
585
- {
586
- if (!report_id) {
587
- report_id = std::make_optional(uuid::to_string(uuid::random()));
574
+ if (!origin_.options().trust_certificate.empty()) {
575
+ CB_LOG_DEBUG(
576
+ R"([{}]: use TLS verify file: "{}")", id_, origin_.options().trust_certificate);
577
+ tls_.load_verify_file(origin_.options().trust_certificate, ec);
578
+ if (ec) {
579
+ CB_LOG_ERROR("[{}]: unable to load verify file \"{}\": {}",
580
+ id_,
581
+ origin_.options().trust_certificate,
582
+ ec.message());
583
+ return close([ec, handler = std::move(handler)]() mutable {
584
+ return handler(ec);
585
+ });
586
+ }
588
587
  }
589
- if (stopped_) {
590
- return handler({ report_id.value(), meta::sdk_id() });
588
+ }
589
+ if (origin_.credentials().uses_certificate()) {
590
+ std::error_code ec{};
591
+ CB_LOG_DEBUG(R"([{}]: use TLS certificate chain: "{}")", id_, origin_.certificate_path());
592
+ tls_.use_certificate_chain_file(origin_.certificate_path(), ec);
593
+ if (ec) {
594
+ CB_LOG_ERROR("[{}]: unable to load certificate chain \"{}\": {}",
595
+ id_,
596
+ origin_.certificate_path(),
597
+ ec.message());
598
+ return close([ec, handler = std::move(handler)]() mutable {
599
+ return handler(ec);
600
+ });
591
601
  }
592
- if (services.empty()) {
593
- services = {
594
- service_type::key_value, service_type::view, service_type::query, service_type::search,
595
- service_type::analytics, service_type::management, service_type::eventing,
596
- };
602
+ CB_LOG_DEBUG(R"([{}]: use TLS private key: "{}")", id_, origin_.key_path());
603
+ tls_.use_private_key_file(origin_.key_path(), asio::ssl::context::file_format::pem, ec);
604
+ if (ec) {
605
+ CB_LOG_ERROR(
606
+ "[{}]: unable to load private key \"{}\": {}", id_, origin_.key_path(), ec.message());
607
+ return close([ec, handler = std::move(handler)]() mutable {
608
+ return handler(ec);
609
+ });
597
610
  }
598
- asio::post(asio::bind_executor(
599
- ctx_, [cluster = shared_from_this(), report_id, bucket_name, services, timeout, handler = std::move(handler)]() mutable {
600
- auto collector = std::make_shared<ping_collector_impl>(report_id.value(), std::move(handler));
601
- if (bucket_name) {
602
- if (services.find(service_type::key_value) != services.end()) {
603
- if (auto bucket = cluster->find_bucket_by_name(bucket_name.value()); bucket) {
604
- return bucket->ping(collector, timeout);
605
- }
606
- cluster->open_bucket(bucket_name.value(), [collector, cluster, bucket_name, timeout](std::error_code ec) {
607
- if (!ec) {
608
- if (auto bucket = cluster->find_bucket_by_name(bucket_name.value()); bucket) {
609
- return bucket->ping(collector, timeout);
610
- }
611
- }
612
- });
613
- }
614
- } else {
615
- if (services.find(service_type::key_value) != services.end()) {
616
- if (cluster->session_) {
617
- cluster->session_->ping(collector->build_reporter(), timeout);
618
- }
619
- cluster->for_each_bucket([&collector, &timeout](auto bucket) { bucket->ping(collector, timeout); });
620
- }
621
- cluster->session_manager_->ping(services, timeout, collector, cluster->origin_.credentials());
622
- }
623
- }));
611
+ }
612
+ session_ = io::mcbp_session(id_, ctx_, tls_, origin_, dns_srv_tracker_);
613
+ } else {
614
+ session_ = io::mcbp_session(id_, ctx_, origin_, dns_srv_tracker_);
624
615
  }
625
-
626
- void diagnostics(std::optional<std::string> report_id, utils::movable_function<void(diag::diagnostics_result)>&& handler)
627
- {
628
- if (!report_id) {
629
- report_id = std::make_optional(uuid::to_string(uuid::random()));
616
+ session_->bootstrap([self = shared_from_this(), handler = std::move(handler)](
617
+ std::error_code ec, const topology::configuration& config) mutable {
618
+ if (!ec) {
619
+ if (self->origin_.options().network == "auto") {
620
+ self->origin_.options().network =
621
+ config.select_network(self->session_->bootstrap_hostname());
622
+ if (self->origin_.options().network == "default") {
623
+ CB_LOG_DEBUG(R"({} detected network is "{}")",
624
+ self->session_->log_prefix(),
625
+ self->origin_.options().network);
626
+ } else {
627
+ CB_LOG_INFO(R"({} detected network is "{}")",
628
+ self->session_->log_prefix(),
629
+ self->origin_.options().network);
630
+ }
630
631
  }
631
- if (stopped_) {
632
- return handler({ report_id.value(), couchbase::core::meta::sdk_id() });
632
+ if (self->origin_.options().network != "default") {
633
+ self->origin_.set_nodes_from_config(config);
634
+ CB_LOG_INFO(
635
+ "replace list of bootstrap nodes with addresses of alternative network \"{}\": [{}]",
636
+ self->origin_.options().network,
637
+ utils::join_strings(self->origin_.get_nodes(), ","));
633
638
  }
634
- asio::post(asio::bind_executor(ctx_, [self = shared_from_this(), report_id, handler = std::move(handler)]() mutable {
635
- diag::diagnostics_result res{ report_id.value(), couchbase::core::meta::sdk_id() };
636
- if (self->session_) {
637
- res.services[service_type::key_value].emplace_back(self->session_->diag_info());
638
- }
639
- self->for_each_bucket([&res](const auto& bucket) { bucket->export_diag_info(res); });
640
- self->session_manager_->export_diag_info(res);
641
- handler(std::move(res));
642
- }));
639
+ self->session_manager_->set_configuration(config, self->origin_.options());
640
+ self->session_->on_configuration_update(self->session_manager_);
641
+ self->session_->on_stop([self]() {
642
+ if (self->session_) {
643
+ self->session_.reset();
644
+ }
645
+ });
646
+ }
647
+ if (ec) {
648
+ return self->close([ec, handler = std::move(handler)]() mutable {
649
+ handler(ec);
650
+ });
651
+ }
652
+ handler(ec);
653
+ });
654
+ }
655
+
656
+ void with_bucket_configuration(
657
+ const std::string& bucket_name,
658
+ utils::movable_function<void(std::error_code, topology::configuration)>&& handler)
659
+ {
660
+ if (stopped_) {
661
+ return handler(errc::network::cluster_closed, {});
662
+ }
663
+ if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
664
+ return bucket->with_configuration(std::move(handler));
643
665
  }
666
+ return open_bucket(
667
+ bucket_name,
668
+ [self = shared_from_this(), bucket_name, handler = std::move(handler)](auto ec) mutable {
669
+ if (ec) {
670
+ return handler(ec, {});
671
+ }
644
672
 
645
- void close(utils::movable_function<void()>&& handler)
646
- {
647
- if (stopped_) {
648
- return handler();
673
+ if (auto bucket = self->find_bucket_by_name(bucket_name); bucket != nullptr) {
674
+ return bucket->with_configuration(std::move(handler));
675
+ } else {
676
+ return handler(errc::common::bucket_not_found, {});
649
677
  }
650
- stopped_ = true;
651
- asio::post(asio::bind_executor(ctx_, [self = shared_from_this(), handler = std::move(handler)]() mutable {
652
- if (self->session_) {
653
- self->session_->stop(retry_reason::do_not_retry);
654
- self->session_.reset();
655
- }
656
- self->for_each_bucket([](auto bucket) { bucket->close(); });
657
- self->session_manager_->close();
658
- handler();
659
- self->work_.reset();
660
- if (self->tracer_) {
661
- self->tracer_->stop();
678
+ });
679
+ }
680
+
681
+ void ping(std::optional<std::string> report_id,
682
+ std::optional<std::string> bucket_name,
683
+ std::set<service_type> services,
684
+ std::optional<std::chrono::milliseconds> timeout,
685
+ utils::movable_function<void(diag::ping_result)> handler)
686
+ {
687
+ if (!report_id) {
688
+ report_id = std::make_optional(uuid::to_string(uuid::random()));
689
+ }
690
+ if (stopped_) {
691
+ return handler({ report_id.value(), meta::sdk_id() });
692
+ }
693
+ if (services.empty()) {
694
+ services = {
695
+ service_type::key_value, service_type::view, service_type::query,
696
+ service_type::search, service_type::analytics, service_type::management,
697
+ service_type::eventing,
698
+ };
699
+ }
700
+ asio::post(asio::bind_executor(
701
+ ctx_,
702
+ [cluster = shared_from_this(),
703
+ report_id,
704
+ bucket_name,
705
+ services,
706
+ timeout,
707
+ handler = std::move(handler)]() mutable {
708
+ auto collector =
709
+ std::make_shared<ping_collector_impl>(report_id.value(), std::move(handler));
710
+ if (bucket_name) {
711
+ if (services.find(service_type::key_value) != services.end()) {
712
+ if (auto bucket = cluster->find_bucket_by_name(bucket_name.value()); bucket) {
713
+ return bucket->ping(collector, timeout);
662
714
  }
663
- self->tracer_.reset();
664
- if (self->meter_) {
665
- self->meter_->stop();
715
+ cluster->open_bucket(
716
+ bucket_name.value(), [collector, cluster, bucket_name, timeout](std::error_code ec) {
717
+ if (!ec) {
718
+ if (auto bucket = cluster->find_bucket_by_name(bucket_name.value()); bucket) {
719
+ return bucket->ping(collector, timeout);
720
+ }
721
+ }
722
+ });
723
+ }
724
+ } else {
725
+ if (services.find(service_type::key_value) != services.end()) {
726
+ if (cluster->session_) {
727
+ cluster->session_->ping(collector->build_reporter(), timeout);
666
728
  }
667
- self->meter_.reset();
668
- }));
669
- }
670
-
671
- auto direct_dispatch(const std::string& bucket_name, std::shared_ptr<couchbase::core::mcbp::queue_request> req) -> std::error_code
672
- {
673
- if (stopped_) {
674
- return errc::network::cluster_closed;
675
- }
676
- if (bucket_name.empty()) {
677
- return errc::common::invalid_argument;
729
+ cluster->for_each_bucket([&collector, &timeout](auto bucket) {
730
+ bucket->ping(collector, timeout);
731
+ });
732
+ }
733
+ cluster->session_manager_->ping(
734
+ services, timeout, collector, cluster->origin_.credentials());
678
735
  }
679
- if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
680
- return bucket->direct_dispatch(std::move(req));
736
+ }));
737
+ }
738
+
739
+ void diagnostics(std::optional<std::string> report_id,
740
+ utils::movable_function<void(diag::diagnostics_result)>&& handler)
741
+ {
742
+ if (!report_id) {
743
+ report_id = std::make_optional(uuid::to_string(uuid::random()));
744
+ }
745
+ if (stopped_) {
746
+ return handler({ report_id.value(), couchbase::core::meta::sdk_id() });
747
+ }
748
+ asio::post(asio::bind_executor(
749
+ ctx_, [self = shared_from_this(), report_id, handler = std::move(handler)]() mutable {
750
+ diag::diagnostics_result res{ report_id.value(), couchbase::core::meta::sdk_id() };
751
+ if (self->session_) {
752
+ res.services[service_type::key_value].emplace_back(self->session_->diag_info());
681
753
  }
682
-
683
- open_bucket(bucket_name, [self = shared_from_this(), req = std::move(req), bucket_name](std::error_code ec) mutable {
684
- if (ec) {
685
- return req->cancel(ec);
686
- }
687
- self->direct_dispatch(bucket_name, std::move(req));
754
+ self->for_each_bucket([&res](const auto& bucket) {
755
+ bucket->export_diag_info(res);
688
756
  });
689
- return {};
757
+ self->session_manager_->export_diag_info(res);
758
+ handler(std::move(res));
759
+ }));
760
+ }
761
+
762
+ void close(utils::movable_function<void()>&& handler)
763
+ {
764
+ if (stopped_) {
765
+ return handler();
690
766
  }
691
-
692
- auto direct_re_queue(const std::string& bucket_name, std::shared_ptr<mcbp::queue_request> req, bool is_retry) -> std::error_code
693
- {
694
- if (stopped_) {
695
- return errc::network::cluster_closed;
767
+ stopped_ = true;
768
+ asio::post(asio::bind_executor(
769
+ ctx_, [self = shared_from_this(), handler = std::move(handler)]() mutable {
770
+ if (self->session_) {
771
+ self->session_->stop(retry_reason::do_not_retry);
772
+ self->session_.reset();
696
773
  }
697
- if (bucket_name.empty()) {
698
- return errc::common::invalid_argument;
774
+ self->for_each_bucket([](auto bucket) {
775
+ bucket->close();
776
+ });
777
+ self->session_manager_->close();
778
+ self->work_.reset();
779
+ if (self->tracer_) {
780
+ self->tracer_->stop();
699
781
  }
700
- if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
701
- return bucket->direct_re_queue(std::move(req), is_retry);
782
+ self->tracer_.reset();
783
+ if (self->meter_) {
784
+ self->meter_->stop();
702
785
  }
786
+ self->meter_.reset();
787
+ handler();
788
+ }));
789
+ }
790
+
791
+ auto direct_dispatch(const std::string& bucket_name,
792
+ std::shared_ptr<couchbase::core::mcbp::queue_request> req) -> std::error_code
793
+ {
794
+ if (stopped_) {
795
+ return errc::network::cluster_closed;
796
+ }
797
+ if (bucket_name.empty()) {
798
+ return errc::common::invalid_argument;
799
+ }
800
+ if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
801
+ return bucket->direct_dispatch(std::move(req));
802
+ }
703
803
 
704
- open_bucket(bucket_name, [self = shared_from_this(), bucket_name, req = std::move(req), is_retry](std::error_code ec) mutable {
705
- if (ec) {
706
- return req->cancel(ec);
707
- }
708
- self->direct_re_queue(bucket_name, std::move(req), is_retry);
709
- });
710
- return {};
804
+ open_bucket(
805
+ bucket_name,
806
+ [self = shared_from_this(), req = std::move(req), bucket_name](std::error_code ec) mutable {
807
+ if (ec) {
808
+ return req->cancel(ec);
809
+ }
810
+ self->direct_dispatch(bucket_name, std::move(req));
811
+ });
812
+ return {};
813
+ }
814
+
815
+ auto direct_re_queue(const std::string& bucket_name,
816
+ std::shared_ptr<mcbp::queue_request> req,
817
+ bool is_retry) -> std::error_code
818
+ {
819
+ if (stopped_) {
820
+ return errc::network::cluster_closed;
821
+ }
822
+ if (bucket_name.empty()) {
823
+ return errc::common::invalid_argument;
824
+ }
825
+ if (auto bucket = find_bucket_by_name(bucket_name); bucket != nullptr) {
826
+ return bucket->direct_re_queue(std::move(req), is_retry);
711
827
  }
712
828
 
713
- private:
714
- std::string id_{ uuid::to_string(uuid::random()) };
715
- asio::io_context& ctx_;
716
- asio::executor_work_guard<asio::io_context::executor_type> work_;
717
- asio::ssl::context tls_{ asio::ssl::context::tls_client };
718
- std::shared_ptr<io::http_session_manager> session_manager_;
719
- std::optional<io::mcbp_session> session_{};
720
- std::shared_ptr<impl::dns_srv_tracker> dns_srv_tracker_{};
721
- std::mutex buckets_mutex_{};
722
- std::map<std::string, std::shared_ptr<bucket>> buckets_{};
723
- couchbase::core::origin origin_{};
724
- std::shared_ptr<couchbase::tracing::request_tracer> tracer_{ nullptr };
725
- std::shared_ptr<couchbase::metrics::meter> meter_{ nullptr };
726
- std::atomic_bool stopped_{ false };
829
+ open_bucket(bucket_name,
830
+ [self = shared_from_this(), bucket_name, req = std::move(req), is_retry](
831
+ std::error_code ec) mutable {
832
+ if (ec) {
833
+ return req->cancel(ec);
834
+ }
835
+ self->direct_re_queue(bucket_name, std::move(req), is_retry);
836
+ });
837
+ return {};
838
+ }
839
+
840
+ private:
841
+ std::string id_{ uuid::to_string(uuid::random()) };
842
+ asio::io_context& ctx_;
843
+ asio::executor_work_guard<asio::io_context::executor_type> work_;
844
+ asio::ssl::context tls_{ asio::ssl::context::tls_client };
845
+ std::shared_ptr<io::http_session_manager> session_manager_;
846
+ std::optional<io::mcbp_session> session_{};
847
+ std::shared_ptr<impl::dns_srv_tracker> dns_srv_tracker_{};
848
+ std::mutex buckets_mutex_{};
849
+ std::map<std::string, std::shared_ptr<bucket>> buckets_{};
850
+ couchbase::core::origin origin_{};
851
+ std::shared_ptr<couchbase::tracing::request_tracer> tracer_{ nullptr };
852
+ std::shared_ptr<couchbase::metrics::meter> meter_{ nullptr };
853
+ std::atomic_bool stopped_{ false };
727
854
  };
728
855
 
729
856
  cluster::cluster(asio::io_context& ctx)
@@ -732,53 +859,60 @@ cluster::cluster(asio::io_context& ctx)
732
859
  }
733
860
 
734
861
  auto
735
- cluster::direct_dispatch(const std::string& bucket_name, std::shared_ptr<couchbase::core::mcbp::queue_request> req) const -> std::error_code
862
+ cluster::direct_dispatch(const std::string& bucket_name,
863
+ std::shared_ptr<couchbase::core::mcbp::queue_request> req) const
864
+ -> std::error_code
736
865
  {
737
- if (impl_) {
738
- return impl_->direct_dispatch(bucket_name, std::move(req));
739
- }
740
- return errc::network::cluster_closed;
866
+ if (impl_) {
867
+ return impl_->direct_dispatch(bucket_name, std::move(req));
868
+ }
869
+ return errc::network::cluster_closed;
741
870
  }
742
871
 
743
872
  auto
744
- cluster::direct_re_queue(const std::string& bucket_name, std::shared_ptr<mcbp::queue_request> req, bool is_retry) const -> std::error_code
873
+ cluster::direct_re_queue(const std::string& bucket_name,
874
+ std::shared_ptr<mcbp::queue_request> req,
875
+ bool is_retry) const -> std::error_code
745
876
  {
746
- if (impl_) {
747
- return impl_->direct_re_queue(bucket_name, std::move(req), is_retry);
748
- }
749
- return errc::network::cluster_closed;
877
+ if (impl_) {
878
+ return impl_->direct_re_queue(bucket_name, std::move(req), is_retry);
879
+ }
880
+ return errc::network::cluster_closed;
750
881
  }
751
882
 
752
883
  void
753
884
  cluster::close(utils::movable_function<void()>&& handler) const
754
885
  {
755
- if (impl_) {
756
- impl_->close(std::move(handler));
757
- }
886
+ if (impl_) {
887
+ impl_->close(std::move(handler));
888
+ }
758
889
  }
759
890
 
760
891
  void
761
- cluster::open_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler) const
892
+ cluster::open_bucket(const std::string& bucket_name,
893
+ utils::movable_function<void(std::error_code)>&& handler) const
762
894
  {
763
- if (impl_) {
764
- impl_->open_bucket(bucket_name, std::move(handler));
765
- }
895
+ if (impl_) {
896
+ impl_->open_bucket(bucket_name, std::move(handler));
897
+ }
766
898
  }
767
899
 
768
900
  void
769
- cluster::open(couchbase::core::origin origin, utils::movable_function<void(std::error_code)>&& handler) const
901
+ cluster::open(couchbase::core::origin origin,
902
+ utils::movable_function<void(std::error_code)>&& handler) const
770
903
  {
771
- if (impl_) {
772
- impl_->open(std::move(origin), std::move(handler));
773
- }
904
+ if (impl_) {
905
+ impl_->open(std::move(origin), std::move(handler));
906
+ }
774
907
  }
775
908
 
776
909
  void
777
- cluster::diagnostics(std::optional<std::string> report_id, utils::movable_function<void(diag::diagnostics_result)>&& handler) const
910
+ cluster::diagnostics(std::optional<std::string> report_id,
911
+ utils::movable_function<void(diag::diagnostics_result)>&& handler) const
778
912
  {
779
- if (impl_) {
780
- impl_->diagnostics(std::move(report_id), std::move(handler));
781
- }
913
+ if (impl_) {
914
+ impl_->diagnostics(std::move(report_id), std::move(handler));
915
+ }
782
916
  }
783
917
 
784
918
  void
@@ -788,829 +922,1008 @@ cluster::ping(std::optional<std::string> report_id,
788
922
  std::optional<std::chrono::milliseconds> timeout,
789
923
  utils::movable_function<void(diag::ping_result)>&& handler) const
790
924
  {
791
- if (impl_) {
792
- impl_->ping(std::move(report_id), std::move(bucket_name), std::move(services), std::move(timeout), std::move(handler));
793
- }
925
+ if (impl_) {
926
+ impl_->ping(std::move(report_id),
927
+ std::move(bucket_name),
928
+ std::move(services),
929
+ std::move(timeout),
930
+ std::move(handler));
931
+ }
794
932
  }
795
933
 
796
934
  void
797
- cluster::with_bucket_configuration(const std::string& bucket_name,
798
- utils::movable_function<void(std::error_code, topology::configuration)>&& handler) const
935
+ cluster::with_bucket_configuration(
936
+ const std::string& bucket_name,
937
+ utils::movable_function<void(std::error_code, topology::configuration)>&& handler) const
799
938
  {
800
- if (impl_) {
801
- impl_->with_bucket_configuration(bucket_name, std::move(handler));
802
- }
939
+ if (impl_) {
940
+ impl_->with_bucket_configuration(bucket_name, std::move(handler));
941
+ }
803
942
  }
804
943
 
805
944
  void
806
- cluster::close_bucket(const std::string& bucket_name, utils::movable_function<void(std::error_code)>&& handler) const
945
+ cluster::close_bucket(const std::string& bucket_name,
946
+ utils::movable_function<void(std::error_code)>&& handler) const
807
947
  {
808
- if (impl_) {
809
- impl_->close_bucket(bucket_name, std::move(handler));
810
- }
948
+ if (impl_) {
949
+ impl_->close_bucket(bucket_name, std::move(handler));
950
+ }
811
951
  }
812
952
 
813
953
  std::pair<std::error_code, couchbase::core::origin>
814
954
  cluster::origin() const
815
955
  {
816
- if (impl_) {
817
- return impl_->origin();
818
- }
819
- return { errc::network::cluster_closed, {} };
956
+ if (impl_) {
957
+ return impl_->origin();
958
+ }
959
+ return { errc::network::cluster_closed, {} };
820
960
  }
821
961
 
822
962
  auto
823
963
  cluster::io_context() const -> asio::io_context&
824
964
  {
825
- return impl_->io_context();
965
+ return impl_->io_context();
826
966
  }
827
967
 
828
968
  void
829
- cluster::execute(operations::append_request request, utils::movable_function<void(operations::append_response)>&& handler) const
969
+ cluster::execute(operations::append_request request,
970
+ utils::movable_function<void(operations::append_response)>&& handler) const
830
971
  {
831
- return impl_->execute(std::move(request), std::move(handler));
972
+ return impl_->execute(std::move(request), std::move(handler));
832
973
  }
833
974
 
834
975
  void
835
- cluster::execute(operations::decrement_request request, utils::movable_function<void(operations::decrement_response)>&& handler) const
976
+ cluster::execute(operations::decrement_request request,
977
+ utils::movable_function<void(operations::decrement_response)>&& handler) const
836
978
  {
837
- return impl_->execute(std::move(request), std::move(handler));
979
+ return impl_->execute(std::move(request), std::move(handler));
838
980
  }
839
981
 
840
982
  void
841
- cluster::execute(operations::exists_request request, utils::movable_function<void(operations::exists_response)>&& handler) const
983
+ cluster::execute(operations::exists_request request,
984
+ utils::movable_function<void(operations::exists_response)>&& handler) const
842
985
  {
843
- return impl_->execute(std::move(request), std::move(handler));
986
+ return impl_->execute(std::move(request), std::move(handler));
844
987
  }
845
988
 
846
989
  void
847
- cluster::execute(operations::get_request request, utils::movable_function<void(operations::get_response)>&& handler) const
990
+ cluster::execute(operations::get_request request,
991
+ utils::movable_function<void(operations::get_response)>&& handler) const
848
992
  {
849
- return impl_->execute(std::move(request), std::move(handler));
993
+ return impl_->execute(std::move(request), std::move(handler));
850
994
  }
851
995
 
852
996
  void
853
- cluster::execute(operations::get_all_replicas_request request,
854
- utils::movable_function<void(operations::get_all_replicas_response)>&& handler) const
997
+ cluster::execute(
998
+ operations::get_all_replicas_request request,
999
+ utils::movable_function<void(operations::get_all_replicas_response)>&& handler) const
855
1000
  {
856
- return request.execute(impl_, std::move(handler));
1001
+ auto bucket_name = request.id.bucket();
1002
+ return open_bucket(
1003
+ bucket_name,
1004
+ [impl = impl_, request = std::move(request), handler = std::move(handler)](auto ec) mutable {
1005
+ if (ec) {
1006
+ return handler(
1007
+ operations::get_all_replicas_response{ make_key_value_error_context(ec, request.id) });
1008
+ }
1009
+ return request.execute(impl, std::move(handler));
1010
+ });
857
1011
  }
858
1012
 
859
1013
  void
860
- cluster::execute(operations::get_and_lock_request request, utils::movable_function<void(operations::get_and_lock_response)>&& handler) const
1014
+ cluster::execute(operations::get_and_lock_request request,
1015
+ utils::movable_function<void(operations::get_and_lock_response)>&& handler) const
861
1016
  {
862
- return impl_->execute(std::move(request), std::move(handler));
1017
+ return impl_->execute(std::move(request), std::move(handler));
863
1018
  }
864
1019
 
865
1020
  void
866
1021
  cluster::execute(operations::get_and_touch_request request,
867
1022
  utils::movable_function<void(operations::get_and_touch_response)>&& handler) const
868
1023
  {
869
- return impl_->execute(std::move(request), std::move(handler));
1024
+ return impl_->execute(std::move(request), std::move(handler));
870
1025
  }
871
1026
 
872
1027
  void
873
- cluster::execute(operations::get_any_replica_request request,
874
- utils::movable_function<void(operations::get_any_replica_response)>&& handler) const
1028
+ cluster::execute(
1029
+ operations::get_any_replica_request request,
1030
+ utils::movable_function<void(operations::get_any_replica_response)>&& handler) const
875
1031
  {
876
- return request.execute(impl_, std::move(handler));
1032
+ auto bucket_name = request.id.bucket();
1033
+ return open_bucket(
1034
+ bucket_name,
1035
+ [impl = impl_, request = std::move(request), handler = std::move(handler)](auto ec) mutable {
1036
+ if (ec) {
1037
+ return handler(
1038
+ operations::get_any_replica_response{ make_key_value_error_context(ec, request.id) });
1039
+ }
1040
+ return request.execute(impl, std::move(handler));
1041
+ });
877
1042
  }
878
1043
 
879
1044
  void
880
1045
  cluster::execute(operations::get_projected_request request,
881
1046
  utils::movable_function<void(operations::get_projected_response)>&& handler) const
882
1047
  {
883
- return impl_->execute(std::move(request), std::move(handler));
1048
+ return impl_->execute(std::move(request), std::move(handler));
884
1049
  }
885
1050
 
886
1051
  void
887
- cluster::execute(operations::increment_request request, utils::movable_function<void(operations::increment_response)>&& handler) const
1052
+ cluster::execute(operations::increment_request request,
1053
+ utils::movable_function<void(operations::increment_response)>&& handler) const
888
1054
  {
889
- return impl_->execute(std::move(request), std::move(handler));
1055
+ return impl_->execute(std::move(request), std::move(handler));
890
1056
  }
891
1057
 
892
1058
  void
893
- cluster::execute(operations::insert_request request, utils::movable_function<void(operations::insert_response)>&& handler) const
1059
+ cluster::execute(operations::insert_request request,
1060
+ utils::movable_function<void(operations::insert_response)>&& handler) const
894
1061
  {
895
- return impl_->execute(std::move(request), std::move(handler));
1062
+ return impl_->execute(std::move(request), std::move(handler));
896
1063
  }
897
1064
 
898
1065
  void
899
- cluster::execute(operations::lookup_in_request request, utils::movable_function<void(operations::lookup_in_response)>&& handler) const
1066
+ cluster::execute(operations::lookup_in_request request,
1067
+ utils::movable_function<void(operations::lookup_in_response)>&& handler) const
900
1068
  {
901
- return impl_->execute(std::move(request), std::move(handler));
1069
+ return impl_->execute(std::move(request), std::move(handler));
902
1070
  }
903
1071
 
904
1072
  void
905
- cluster::execute(operations::lookup_in_any_replica_request request,
906
- utils::movable_function<void(operations::lookup_in_any_replica_response)>&& handler) const
1073
+ cluster::execute(
1074
+ operations::lookup_in_any_replica_request request,
1075
+ utils::movable_function<void(operations::lookup_in_any_replica_response)>&& handler) const
907
1076
  {
908
- return request.execute(impl_, std::move(handler));
1077
+ return request.execute(impl_, std::move(handler));
909
1078
  }
910
1079
 
911
1080
  void
912
- cluster::execute(operations::lookup_in_all_replicas_request request,
913
- utils::movable_function<void(operations::lookup_in_all_replicas_response)>&& handler) const
1081
+ cluster::execute(
1082
+ operations::lookup_in_all_replicas_request request,
1083
+ utils::movable_function<void(operations::lookup_in_all_replicas_response)>&& handler) const
914
1084
  {
915
- return request.execute(impl_, std::move(handler));
1085
+ return request.execute(impl_, std::move(handler));
916
1086
  }
917
1087
 
918
1088
  void
919
- cluster::execute(operations::mutate_in_request request, utils::movable_function<void(operations::mutate_in_response)>&& handler) const
1089
+ cluster::execute(operations::mutate_in_request request,
1090
+ utils::movable_function<void(operations::mutate_in_response)>&& handler) const
920
1091
  {
921
- return impl_->execute(std::move(request), std::move(handler));
1092
+ return impl_->execute(std::move(request), std::move(handler));
922
1093
  }
923
1094
 
924
1095
  void
925
- cluster::execute(operations::prepend_request request, utils::movable_function<void(operations::prepend_response)>&& handler) const
1096
+ cluster::execute(operations::prepend_request request,
1097
+ utils::movable_function<void(operations::prepend_response)>&& handler) const
926
1098
  {
927
- return impl_->execute(std::move(request), std::move(handler));
1099
+ return impl_->execute(std::move(request), std::move(handler));
928
1100
  }
929
1101
 
930
1102
  void
931
- cluster::execute(operations::query_request request, utils::movable_function<void(operations::query_response)>&& handler) const
1103
+ cluster::execute(operations::query_request request,
1104
+ utils::movable_function<void(operations::query_response)>&& handler) const
932
1105
  {
933
- return impl_->execute(std::move(request), std::move(handler));
1106
+ return impl_->execute(std::move(request), std::move(handler));
934
1107
  }
935
1108
 
936
1109
  void
937
- cluster::execute(operations::remove_request request, utils::movable_function<void(operations::remove_response)>&& handler) const
1110
+ cluster::execute(operations::remove_request request,
1111
+ utils::movable_function<void(operations::remove_response)>&& handler) const
938
1112
  {
939
- return impl_->execute(std::move(request), std::move(handler));
1113
+ return impl_->execute(std::move(request), std::move(handler));
940
1114
  }
941
1115
 
942
1116
  void
943
- cluster::execute(operations::replace_request request, utils::movable_function<void(operations::replace_response)>&& handler) const
1117
+ cluster::execute(operations::replace_request request,
1118
+ utils::movable_function<void(operations::replace_response)>&& handler) const
944
1119
  {
945
- return impl_->execute(std::move(request), std::move(handler));
1120
+ return impl_->execute(std::move(request), std::move(handler));
946
1121
  }
947
1122
 
948
1123
  void
949
- cluster::execute(operations::search_request request, utils::movable_function<void(operations::search_response)>&& handler) const
1124
+ cluster::execute(operations::search_request request,
1125
+ utils::movable_function<void(operations::search_response)>&& handler) const
950
1126
  {
951
- return impl_->execute(std::move(request), std::move(handler));
1127
+ return impl_->execute(std::move(request), std::move(handler));
952
1128
  }
953
1129
 
954
1130
  void
955
- cluster::execute(operations::touch_request request, utils::movable_function<void(operations::touch_response)>&& handler) const
1131
+ cluster::execute(operations::touch_request request,
1132
+ utils::movable_function<void(operations::touch_response)>&& handler) const
956
1133
  {
957
- return impl_->execute(std::move(request), std::move(handler));
1134
+ return impl_->execute(std::move(request), std::move(handler));
958
1135
  }
959
1136
 
960
1137
  void
961
- cluster::execute(operations::unlock_request request, utils::movable_function<void(operations::unlock_response)>&& handler) const
1138
+ cluster::execute(operations::unlock_request request,
1139
+ utils::movable_function<void(operations::unlock_response)>&& handler) const
962
1140
  {
963
- return impl_->execute(std::move(request), std::move(handler));
1141
+ return impl_->execute(std::move(request), std::move(handler));
964
1142
  }
965
1143
 
966
1144
  void
967
- cluster::execute(operations::upsert_request request, utils::movable_function<void(operations::upsert_response)>&& handler) const
1145
+ cluster::execute(operations::upsert_request request,
1146
+ utils::movable_function<void(operations::upsert_response)>&& handler) const
968
1147
  {
969
- return impl_->execute(std::move(request), std::move(handler));
1148
+ return impl_->execute(std::move(request), std::move(handler));
970
1149
  }
971
1150
 
972
1151
  void
973
1152
  cluster::execute(operations::document_view_request request,
974
1153
  utils::movable_function<void(operations::document_view_response)>&& handler) const
975
1154
  {
976
- return impl_->execute(std::move(request), std::move(handler));
1155
+ return impl_->execute(std::move(request), std::move(handler));
977
1156
  }
978
1157
 
979
1158
  void
980
- cluster::execute(operations::http_noop_request request, utils::movable_function<void(operations::http_noop_response)>&& handler) const
1159
+ cluster::execute(operations::http_noop_request request,
1160
+ utils::movable_function<void(operations::http_noop_response)>&& handler) const
981
1161
  {
982
- return impl_->execute(std::move(request), std::move(handler));
1162
+ return impl_->execute(std::move(request), std::move(handler));
983
1163
  }
984
1164
 
985
1165
  void
986
- cluster::execute(operations::management::analytics_dataset_create_request request,
987
- utils::movable_function<void(operations::management::analytics_dataset_create_response)>&& handler) const
1166
+ cluster::execute(
1167
+ operations::management::analytics_dataset_create_request request,
1168
+ utils::movable_function<void(operations::management::analytics_dataset_create_response)>&&
1169
+ handler) const
988
1170
  {
989
- return impl_->execute(std::move(request), std::move(handler));
1171
+ return impl_->execute(std::move(request), std::move(handler));
990
1172
  }
991
1173
 
992
1174
  void
993
- cluster::execute(operations::management::analytics_dataset_drop_request request,
994
- utils::movable_function<void(operations::management::analytics_dataset_drop_response)>&& handler) const
1175
+ cluster::execute(
1176
+ operations::management::analytics_dataset_drop_request request,
1177
+ utils::movable_function<void(operations::management::analytics_dataset_drop_response)>&& handler)
1178
+ const
995
1179
  {
996
- return impl_->execute(std::move(request), std::move(handler));
1180
+ return impl_->execute(std::move(request), std::move(handler));
997
1181
  }
998
1182
 
999
1183
  void
1000
- cluster::execute(operations::management::analytics_dataset_get_all_request request,
1001
- utils::movable_function<void(operations::management::analytics_dataset_get_all_response)>&& handler) const
1184
+ cluster::execute(
1185
+ operations::management::analytics_dataset_get_all_request request,
1186
+ utils::movable_function<void(operations::management::analytics_dataset_get_all_response)>&&
1187
+ handler) const
1002
1188
  {
1003
- return impl_->execute(std::move(request), std::move(handler));
1189
+ return impl_->execute(std::move(request), std::move(handler));
1004
1190
  }
1005
1191
 
1006
1192
  void
1007
- cluster::execute(operations::management::analytics_dataverse_create_request request,
1008
- utils::movable_function<void(operations::management::analytics_dataverse_create_response)>&& handler) const
1193
+ cluster::execute(
1194
+ operations::management::analytics_dataverse_create_request request,
1195
+ utils::movable_function<void(operations::management::analytics_dataverse_create_response)>&&
1196
+ handler) const
1009
1197
  {
1010
- return impl_->execute(std::move(request), std::move(handler));
1198
+ return impl_->execute(std::move(request), std::move(handler));
1011
1199
  }
1012
1200
 
1013
1201
  void
1014
- cluster::execute(operations::management::analytics_dataverse_drop_request request,
1015
- utils::movable_function<void(operations::management::analytics_dataverse_drop_response)>&& handler) const
1202
+ cluster::execute(
1203
+ operations::management::analytics_dataverse_drop_request request,
1204
+ utils::movable_function<void(operations::management::analytics_dataverse_drop_response)>&&
1205
+ handler) const
1016
1206
  {
1017
- return impl_->execute(std::move(request), std::move(handler));
1207
+ return impl_->execute(std::move(request), std::move(handler));
1018
1208
  }
1019
1209
 
1020
1210
  void
1021
- cluster::execute(operations::management::analytics_get_pending_mutations_request request,
1022
- utils::movable_function<void(operations::management::analytics_get_pending_mutations_response)>&& handler) const
1211
+ cluster::execute(
1212
+ operations::management::analytics_get_pending_mutations_request request,
1213
+ utils::movable_function<void(operations::management::analytics_get_pending_mutations_response)>&&
1214
+ handler) const
1023
1215
  {
1024
- return impl_->execute(std::move(request), std::move(handler));
1216
+ return impl_->execute(std::move(request), std::move(handler));
1025
1217
  }
1026
1218
 
1027
1219
  void
1028
- cluster::execute(operations::management::analytics_index_create_request request,
1029
- utils::movable_function<void(operations::management::analytics_index_create_response)>&& handler) const
1220
+ cluster::execute(
1221
+ operations::management::analytics_index_create_request request,
1222
+ utils::movable_function<void(operations::management::analytics_index_create_response)>&& handler)
1223
+ const
1030
1224
  {
1031
- return impl_->execute(std::move(request), std::move(handler));
1225
+ return impl_->execute(std::move(request), std::move(handler));
1032
1226
  }
1033
1227
 
1034
1228
  void
1035
- cluster::execute(operations::management::analytics_index_drop_request request,
1036
- utils::movable_function<void(operations::management::analytics_index_drop_response)>&& handler) const
1229
+ cluster::execute(
1230
+ operations::management::analytics_index_drop_request request,
1231
+ utils::movable_function<void(operations::management::analytics_index_drop_response)>&& handler)
1232
+ const
1037
1233
  {
1038
- return impl_->execute(std::move(request), std::move(handler));
1234
+ return impl_->execute(std::move(request), std::move(handler));
1039
1235
  }
1040
1236
 
1041
1237
  void
1042
- cluster::execute(operations::management::analytics_index_get_all_request request,
1043
- utils::movable_function<void(operations::management::analytics_index_get_all_response)>&& handler) const
1238
+ cluster::execute(
1239
+ operations::management::analytics_index_get_all_request request,
1240
+ utils::movable_function<void(operations::management::analytics_index_get_all_response)>&& handler)
1241
+ const
1044
1242
  {
1045
- return impl_->execute(std::move(request), std::move(handler));
1243
+ return impl_->execute(std::move(request), std::move(handler));
1046
1244
  }
1047
1245
 
1048
1246
  void
1049
- cluster::execute(operations::management::analytics_link_connect_request request,
1050
- utils::movable_function<void(operations::management::analytics_link_connect_response)>&& handler) const
1247
+ cluster::execute(
1248
+ operations::management::analytics_link_connect_request request,
1249
+ utils::movable_function<void(operations::management::analytics_link_connect_response)>&& handler)
1250
+ const
1051
1251
  {
1052
- return impl_->execute(std::move(request), std::move(handler));
1252
+ return impl_->execute(std::move(request), std::move(handler));
1053
1253
  }
1054
1254
 
1055
1255
  void
1056
- cluster::execute(operations::management::analytics_link_disconnect_request request,
1057
- utils::movable_function<void(operations::management::analytics_link_disconnect_response)>&& handler) const
1256
+ cluster::execute(
1257
+ operations::management::analytics_link_disconnect_request request,
1258
+ utils::movable_function<void(operations::management::analytics_link_disconnect_response)>&&
1259
+ handler) const
1058
1260
  {
1059
- return impl_->execute(std::move(request), std::move(handler));
1261
+ return impl_->execute(std::move(request), std::move(handler));
1060
1262
  }
1061
1263
 
1062
1264
  void
1063
- cluster::execute(operations::management::analytics_link_drop_request request,
1064
- utils::movable_function<void(operations::management::analytics_link_drop_response)>&& handler) const
1265
+ cluster::execute(
1266
+ operations::management::analytics_link_drop_request request,
1267
+ utils::movable_function<void(operations::management::analytics_link_drop_response)>&& handler)
1268
+ const
1065
1269
  {
1066
- return impl_->execute(std::move(request), std::move(handler));
1270
+ return impl_->execute(std::move(request), std::move(handler));
1067
1271
  }
1068
1272
 
1069
1273
  void
1070
- cluster::execute(operations::management::analytics_link_get_all_request request,
1071
- utils::movable_function<void(operations::management::analytics_link_get_all_response)>&& handler) const
1274
+ cluster::execute(
1275
+ operations::management::analytics_link_get_all_request request,
1276
+ utils::movable_function<void(operations::management::analytics_link_get_all_response)>&& handler)
1277
+ const
1072
1278
  {
1073
- return impl_->execute(std::move(request), std::move(handler));
1279
+ return impl_->execute(std::move(request), std::move(handler));
1074
1280
  }
1075
1281
 
1076
1282
  void
1077
- cluster::execute(operations::management::bucket_create_request request,
1078
- utils::movable_function<void(operations::management::bucket_create_response)>&& handler) const
1283
+ cluster::execute(
1284
+ operations::management::bucket_create_request request,
1285
+ utils::movable_function<void(operations::management::bucket_create_response)>&& handler) const
1079
1286
  {
1080
- return impl_->execute(std::move(request), std::move(handler));
1287
+ return impl_->execute(std::move(request), std::move(handler));
1081
1288
  }
1082
1289
 
1083
1290
  void
1084
- cluster::execute(operations::management::bucket_drop_request request,
1085
- utils::movable_function<void(operations::management::bucket_drop_response)>&& handler) const
1291
+ cluster::execute(
1292
+ operations::management::bucket_drop_request request,
1293
+ utils::movable_function<void(operations::management::bucket_drop_response)>&& handler) const
1086
1294
  {
1087
- return impl_->execute(std::move(request), std::move(handler));
1295
+ return impl_->execute(std::move(request), std::move(handler));
1088
1296
  }
1089
1297
 
1090
1298
  void
1091
- cluster::execute(operations::management::bucket_flush_request request,
1092
- utils::movable_function<void(operations::management::bucket_flush_response)>&& handler) const
1299
+ cluster::execute(
1300
+ operations::management::bucket_flush_request request,
1301
+ utils::movable_function<void(operations::management::bucket_flush_response)>&& handler) const
1093
1302
  {
1094
- return impl_->execute(std::move(request), std::move(handler));
1303
+ return impl_->execute(std::move(request), std::move(handler));
1095
1304
  }
1096
1305
 
1097
1306
  void
1098
- cluster::execute(operations::management::bucket_get_request request,
1099
- utils::movable_function<void(operations::management::bucket_get_response)>&& handler) const
1307
+ cluster::execute(
1308
+ operations::management::bucket_get_request request,
1309
+ utils::movable_function<void(operations::management::bucket_get_response)>&& handler) const
1100
1310
  {
1101
- return impl_->execute(std::move(request), std::move(handler));
1311
+ return impl_->execute(std::move(request), std::move(handler));
1102
1312
  }
1103
1313
 
1104
1314
  void
1105
- cluster::execute(operations::management::bucket_get_all_request request,
1106
- utils::movable_function<void(operations::management::bucket_get_all_response)>&& handler) const
1315
+ cluster::execute(
1316
+ operations::management::bucket_get_all_request request,
1317
+ utils::movable_function<void(operations::management::bucket_get_all_response)>&& handler) const
1107
1318
  {
1108
- return impl_->execute(std::move(request), std::move(handler));
1319
+ return impl_->execute(std::move(request), std::move(handler));
1109
1320
  }
1110
1321
 
1111
1322
  void
1112
- cluster::execute(operations::management::bucket_update_request request,
1113
- utils::movable_function<void(operations::management::bucket_update_response)>&& handler) const
1323
+ cluster::execute(
1324
+ operations::management::bucket_update_request request,
1325
+ utils::movable_function<void(operations::management::bucket_update_response)>&& handler) const
1114
1326
  {
1115
- return impl_->execute(std::move(request), std::move(handler));
1327
+ return impl_->execute(std::move(request), std::move(handler));
1116
1328
  }
1117
1329
 
1118
1330
  void
1119
- cluster::execute(operations::management::collection_create_request request,
1120
- utils::movable_function<void(operations::management::collection_create_response)>&& handler) const
1331
+ cluster::execute(
1332
+ operations::management::collection_create_request request,
1333
+ utils::movable_function<void(operations::management::collection_create_response)>&& handler) const
1121
1334
  {
1122
- if (request.history.has_value()) {
1123
- return impl_->execute_with_bucket_capability_check(std::move(request), bucket_capability::non_deduped_history, std::move(handler));
1124
- }
1125
- return impl_->execute(std::move(request), std::move(handler));
1335
+ if (request.history.has_value()) {
1336
+ return impl_->execute_with_bucket_capability_check(
1337
+ std::move(request), bucket_capability::non_deduped_history, std::move(handler));
1338
+ }
1339
+ return impl_->execute(std::move(request), std::move(handler));
1126
1340
  }
1127
1341
 
1128
1342
  void
1129
- cluster::execute(operations::management::collection_update_request request,
1130
- utils::movable_function<void(operations::management::collection_update_response)>&& handler) const
1343
+ cluster::execute(
1344
+ operations::management::collection_update_request request,
1345
+ utils::movable_function<void(operations::management::collection_update_response)>&& handler) const
1131
1346
  {
1132
- if (request.history.has_value()) {
1133
- return impl_->execute_with_bucket_capability_check(std::move(request), bucket_capability::non_deduped_history, std::move(handler));
1134
- }
1135
- return impl_->execute(std::move(request), std::move(handler));
1347
+ if (request.history.has_value()) {
1348
+ return impl_->execute_with_bucket_capability_check(
1349
+ std::move(request), bucket_capability::non_deduped_history, std::move(handler));
1350
+ }
1351
+ return impl_->execute(std::move(request), std::move(handler));
1136
1352
  }
1137
1353
 
1138
1354
  void
1139
- cluster::execute(operations::management::collection_drop_request request,
1140
- utils::movable_function<void(operations::management::collection_drop_response)>&& handler) const
1355
+ cluster::execute(
1356
+ operations::management::collection_drop_request request,
1357
+ utils::movable_function<void(operations::management::collection_drop_response)>&& handler) const
1141
1358
  {
1142
- return impl_->execute(std::move(request), std::move(handler));
1359
+ return impl_->execute(std::move(request), std::move(handler));
1143
1360
  }
1144
1361
 
1145
1362
  void
1146
- cluster::execute(operations::management::collections_manifest_get_request request,
1147
- utils::movable_function<void(operations::management::collections_manifest_get_response)>&& handler) const
1363
+ cluster::execute(
1364
+ operations::management::collections_manifest_get_request request,
1365
+ utils::movable_function<void(operations::management::collections_manifest_get_response)>&&
1366
+ handler) const
1148
1367
  {
1149
- return impl_->execute(std::move(request), std::move(handler));
1368
+ return impl_->execute(std::move(request), std::move(handler));
1150
1369
  }
1151
1370
 
1152
1371
  void
1153
- cluster::execute(operations::management::scope_create_request request,
1154
- utils::movable_function<void(operations::management::scope_create_response)>&& handler) const
1372
+ cluster::execute(
1373
+ operations::management::scope_create_request request,
1374
+ utils::movable_function<void(operations::management::scope_create_response)>&& handler) const
1155
1375
  {
1156
- return impl_->execute(std::move(request), std::move(handler));
1376
+ return impl_->execute(std::move(request), std::move(handler));
1157
1377
  }
1158
1378
 
1159
1379
  void
1160
- cluster::execute(operations::management::scope_drop_request request,
1161
- utils::movable_function<void(operations::management::scope_drop_response)>&& handler) const
1380
+ cluster::execute(
1381
+ operations::management::scope_drop_request request,
1382
+ utils::movable_function<void(operations::management::scope_drop_response)>&& handler) const
1162
1383
  {
1163
- return impl_->execute(std::move(request), std::move(handler));
1384
+ return impl_->execute(std::move(request), std::move(handler));
1164
1385
  }
1165
1386
 
1166
1387
  void
1167
- cluster::execute(operations::management::scope_get_all_request request,
1168
- utils::movable_function<void(operations::management::scope_get_all_response)>&& handler) const
1388
+ cluster::execute(
1389
+ operations::management::scope_get_all_request request,
1390
+ utils::movable_function<void(operations::management::scope_get_all_response)>&& handler) const
1169
1391
  {
1170
- return impl_->execute(std::move(request), std::move(handler));
1392
+ return impl_->execute(std::move(request), std::move(handler));
1171
1393
  }
1172
1394
 
1173
1395
  void
1174
- cluster::execute(operations::management::eventing_deploy_function_request request,
1175
- utils::movable_function<void(operations::management::eventing_deploy_function_response)>&& handler) const
1396
+ cluster::execute(
1397
+ operations::management::eventing_deploy_function_request request,
1398
+ utils::movable_function<void(operations::management::eventing_deploy_function_response)>&&
1399
+ handler) const
1176
1400
  {
1177
- return impl_->execute(std::move(request), std::move(handler));
1401
+ return impl_->execute(std::move(request), std::move(handler));
1178
1402
  }
1179
1403
 
1180
1404
  void
1181
- cluster::execute(operations::management::eventing_drop_function_request request,
1182
- utils::movable_function<void(operations::management::eventing_drop_function_response)>&& handler) const
1405
+ cluster::execute(
1406
+ operations::management::eventing_drop_function_request request,
1407
+ utils::movable_function<void(operations::management::eventing_drop_function_response)>&& handler)
1408
+ const
1183
1409
  {
1184
- return impl_->execute(std::move(request), std::move(handler));
1410
+ return impl_->execute(std::move(request), std::move(handler));
1185
1411
  }
1186
1412
 
1187
1413
  void
1188
- cluster::execute(operations::management::eventing_get_all_functions_request request,
1189
- utils::movable_function<void(operations::management::eventing_get_all_functions_response)>&& handler) const
1414
+ cluster::execute(
1415
+ operations::management::eventing_get_all_functions_request request,
1416
+ utils::movable_function<void(operations::management::eventing_get_all_functions_response)>&&
1417
+ handler) const
1190
1418
  {
1191
- return impl_->execute(std::move(request), std::move(handler));
1419
+ return impl_->execute(std::move(request), std::move(handler));
1192
1420
  }
1193
1421
 
1194
1422
  void
1195
- cluster::execute(operations::management::eventing_get_function_request request,
1196
- utils::movable_function<void(operations::management::eventing_get_function_response)>&& handler) const
1423
+ cluster::execute(
1424
+ operations::management::eventing_get_function_request request,
1425
+ utils::movable_function<void(operations::management::eventing_get_function_response)>&& handler)
1426
+ const
1197
1427
  {
1198
- return impl_->execute(std::move(request), std::move(handler));
1428
+ return impl_->execute(std::move(request), std::move(handler));
1199
1429
  }
1200
1430
 
1201
1431
  void
1202
- cluster::execute(operations::management::eventing_get_status_request request,
1203
- utils::movable_function<void(operations::management::eventing_get_status_response)>&& handler) const
1432
+ cluster::execute(
1433
+ operations::management::eventing_get_status_request request,
1434
+ utils::movable_function<void(operations::management::eventing_get_status_response)>&& handler)
1435
+ const
1204
1436
  {
1205
- return impl_->execute(std::move(request), std::move(handler));
1437
+ return impl_->execute(std::move(request), std::move(handler));
1206
1438
  }
1207
1439
 
1208
1440
  void
1209
- cluster::execute(operations::management::eventing_pause_function_request request,
1210
- utils::movable_function<void(operations::management::eventing_pause_function_response)>&& handler) const
1441
+ cluster::execute(
1442
+ operations::management::eventing_pause_function_request request,
1443
+ utils::movable_function<void(operations::management::eventing_pause_function_response)>&& handler)
1444
+ const
1211
1445
  {
1212
- return impl_->execute(std::move(request), std::move(handler));
1446
+ return impl_->execute(std::move(request), std::move(handler));
1213
1447
  }
1214
1448
 
1215
1449
  void
1216
- cluster::execute(operations::management::eventing_resume_function_request request,
1217
- utils::movable_function<void(operations::management::eventing_resume_function_response)>&& handler) const
1450
+ cluster::execute(
1451
+ operations::management::eventing_resume_function_request request,
1452
+ utils::movable_function<void(operations::management::eventing_resume_function_response)>&&
1453
+ handler) const
1218
1454
  {
1219
- return impl_->execute(std::move(request), std::move(handler));
1455
+ return impl_->execute(std::move(request), std::move(handler));
1220
1456
  }
1221
1457
 
1222
1458
  void
1223
- cluster::execute(operations::management::eventing_undeploy_function_request request,
1224
- utils::movable_function<void(operations::management::eventing_undeploy_function_response)>&& handler) const
1459
+ cluster::execute(
1460
+ operations::management::eventing_undeploy_function_request request,
1461
+ utils::movable_function<void(operations::management::eventing_undeploy_function_response)>&&
1462
+ handler) const
1225
1463
  {
1226
- return impl_->execute(std::move(request), std::move(handler));
1464
+ return impl_->execute(std::move(request), std::move(handler));
1227
1465
  }
1228
1466
 
1229
1467
  void
1230
- cluster::execute(operations::management::eventing_upsert_function_request request,
1231
- utils::movable_function<void(operations::management::eventing_upsert_function_response)>&& handler) const
1468
+ cluster::execute(
1469
+ operations::management::eventing_upsert_function_request request,
1470
+ utils::movable_function<void(operations::management::eventing_upsert_function_response)>&&
1471
+ handler) const
1232
1472
  {
1233
- return impl_->execute(std::move(request), std::move(handler));
1473
+ return impl_->execute(std::move(request), std::move(handler));
1234
1474
  }
1235
1475
 
1236
1476
  void
1237
- cluster::execute(operations::management::view_index_drop_request request,
1238
- utils::movable_function<void(operations::management::view_index_drop_response)>&& handler) const
1477
+ cluster::execute(
1478
+ operations::management::view_index_drop_request request,
1479
+ utils::movable_function<void(operations::management::view_index_drop_response)>&& handler) const
1239
1480
  {
1240
- return impl_->execute(std::move(request), std::move(handler));
1481
+ return impl_->execute(std::move(request), std::move(handler));
1241
1482
  }
1242
1483
 
1243
1484
  void
1244
- cluster::execute(operations::management::view_index_get_request request,
1245
- utils::movable_function<void(operations::management::view_index_get_response)>&& handler) const
1485
+ cluster::execute(
1486
+ operations::management::view_index_get_request request,
1487
+ utils::movable_function<void(operations::management::view_index_get_response)>&& handler) const
1246
1488
  {
1247
- return impl_->execute(std::move(request), std::move(handler));
1489
+ return impl_->execute(std::move(request), std::move(handler));
1248
1490
  }
1249
1491
 
1250
1492
  void
1251
- cluster::execute(operations::management::view_index_get_all_request request,
1252
- utils::movable_function<void(operations::management::view_index_get_all_response)>&& handler) const
1493
+ cluster::execute(
1494
+ operations::management::view_index_get_all_request request,
1495
+ utils::movable_function<void(operations::management::view_index_get_all_response)>&& handler)
1496
+ const
1253
1497
  {
1254
- return impl_->execute(std::move(request), std::move(handler));
1498
+ return impl_->execute(std::move(request), std::move(handler));
1255
1499
  }
1256
1500
 
1257
1501
  void
1258
- cluster::execute(operations::management::view_index_upsert_request request,
1259
- utils::movable_function<void(operations::management::view_index_upsert_response)>&& handler) const
1502
+ cluster::execute(
1503
+ operations::management::view_index_upsert_request request,
1504
+ utils::movable_function<void(operations::management::view_index_upsert_response)>&& handler) const
1260
1505
  {
1261
- return impl_->execute(std::move(request), std::move(handler));
1506
+ return impl_->execute(std::move(request), std::move(handler));
1262
1507
  }
1263
1508
 
1264
1509
  void
1265
- cluster::execute(operations::management::change_password_request request,
1266
- utils::movable_function<void(operations::management::change_password_response)>&& handler) const
1510
+ cluster::execute(
1511
+ operations::management::change_password_request request,
1512
+ utils::movable_function<void(operations::management::change_password_response)>&& handler) const
1267
1513
  {
1268
- return impl_->execute(std::move(request), std::move(handler));
1514
+ return impl_->execute(std::move(request), std::move(handler));
1269
1515
  }
1270
1516
 
1271
1517
  void
1272
- cluster::execute(operations::management::group_drop_request request,
1273
- utils::movable_function<void(operations::management::group_drop_response)>&& handler) const
1518
+ cluster::execute(
1519
+ operations::management::group_drop_request request,
1520
+ utils::movable_function<void(operations::management::group_drop_response)>&& handler) const
1274
1521
  {
1275
- return impl_->execute(std::move(request), std::move(handler));
1522
+ return impl_->execute(std::move(request), std::move(handler));
1276
1523
  }
1277
1524
 
1278
1525
  void
1279
- cluster::execute(operations::management::group_get_request request,
1280
- utils::movable_function<void(operations::management::group_get_response)>&& handler) const
1526
+ cluster::execute(
1527
+ operations::management::group_get_request request,
1528
+ utils::movable_function<void(operations::management::group_get_response)>&& handler) const
1281
1529
  {
1282
- return impl_->execute(std::move(request), std::move(handler));
1530
+ return impl_->execute(std::move(request), std::move(handler));
1283
1531
  }
1284
1532
 
1285
1533
  void
1286
- cluster::execute(operations::management::group_get_all_request request,
1287
- utils::movable_function<void(operations::management::group_get_all_response)>&& handler) const
1534
+ cluster::execute(
1535
+ operations::management::group_get_all_request request,
1536
+ utils::movable_function<void(operations::management::group_get_all_response)>&& handler) const
1288
1537
  {
1289
- return impl_->execute(std::move(request), std::move(handler));
1538
+ return impl_->execute(std::move(request), std::move(handler));
1290
1539
  }
1291
1540
 
1292
1541
  void
1293
- cluster::execute(operations::management::group_upsert_request request,
1294
- utils::movable_function<void(operations::management::group_upsert_response)>&& handler) const
1542
+ cluster::execute(
1543
+ operations::management::group_upsert_request request,
1544
+ utils::movable_function<void(operations::management::group_upsert_response)>&& handler) const
1295
1545
  {
1296
- return impl_->execute(std::move(request), std::move(handler));
1546
+ return impl_->execute(std::move(request), std::move(handler));
1297
1547
  }
1298
1548
 
1299
1549
  void
1300
- cluster::execute(operations::management::role_get_all_request request,
1301
- utils::movable_function<void(operations::management::role_get_all_response)>&& handler) const
1550
+ cluster::execute(
1551
+ operations::management::role_get_all_request request,
1552
+ utils::movable_function<void(operations::management::role_get_all_response)>&& handler) const
1302
1553
  {
1303
- return impl_->execute(std::move(request), std::move(handler));
1554
+ return impl_->execute(std::move(request), std::move(handler));
1304
1555
  }
1305
1556
 
1306
1557
  void
1307
- cluster::execute(operations::management::user_drop_request request,
1308
- utils::movable_function<void(operations::management::user_drop_response)>&& handler) const
1558
+ cluster::execute(
1559
+ operations::management::user_drop_request request,
1560
+ utils::movable_function<void(operations::management::user_drop_response)>&& handler) const
1309
1561
  {
1310
- return impl_->execute(std::move(request), std::move(handler));
1562
+ return impl_->execute(std::move(request), std::move(handler));
1311
1563
  }
1312
1564
 
1313
1565
  void
1314
- cluster::execute(operations::management::user_get_request request,
1315
- utils::movable_function<void(operations::management::user_get_response)>&& handler) const
1566
+ cluster::execute(
1567
+ operations::management::user_get_request request,
1568
+ utils::movable_function<void(operations::management::user_get_response)>&& handler) const
1316
1569
  {
1317
- return impl_->execute(std::move(request), std::move(handler));
1570
+ return impl_->execute(std::move(request), std::move(handler));
1318
1571
  }
1319
1572
 
1320
1573
  void
1321
- cluster::execute(operations::management::user_get_all_request request,
1322
- utils::movable_function<void(operations::management::user_get_all_response)>&& handler) const
1574
+ cluster::execute(
1575
+ operations::management::user_get_all_request request,
1576
+ utils::movable_function<void(operations::management::user_get_all_response)>&& handler) const
1323
1577
  {
1324
- return impl_->execute(std::move(request), std::move(handler));
1578
+ return impl_->execute(std::move(request), std::move(handler));
1325
1579
  }
1326
1580
 
1327
1581
  void
1328
- cluster::execute(operations::management::user_upsert_request request,
1329
- utils::movable_function<void(operations::management::user_upsert_response)>&& handler) const
1582
+ cluster::execute(
1583
+ operations::management::user_upsert_request request,
1584
+ utils::movable_function<void(operations::management::user_upsert_response)>&& handler) const
1330
1585
  {
1331
- return impl_->execute(std::move(request), std::move(handler));
1586
+ return impl_->execute(std::move(request), std::move(handler));
1332
1587
  }
1333
1588
 
1334
1589
  void
1335
- cluster::execute(operations::management::search_get_stats_request request,
1336
- utils::movable_function<void(operations::management::search_get_stats_response)>&& handler) const
1590
+ cluster::execute(
1591
+ operations::management::search_get_stats_request request,
1592
+ utils::movable_function<void(operations::management::search_get_stats_response)>&& handler) const
1337
1593
  {
1338
- return impl_->execute(std::move(request), std::move(handler));
1594
+ return impl_->execute(std::move(request), std::move(handler));
1339
1595
  }
1340
1596
 
1341
1597
  void
1342
- cluster::execute(operations::management::search_index_analyze_document_request request,
1343
- utils::movable_function<void(operations::management::search_index_analyze_document_response)>&& handler) const
1598
+ cluster::execute(
1599
+ operations::management::search_index_analyze_document_request request,
1600
+ utils::movable_function<void(operations::management::search_index_analyze_document_response)>&&
1601
+ handler) const
1344
1602
  {
1345
- return impl_->execute(std::move(request), std::move(handler));
1603
+ return impl_->execute(std::move(request), std::move(handler));
1346
1604
  }
1347
1605
 
1348
1606
  void
1349
- cluster::execute(operations::management::search_index_control_ingest_request request,
1350
- utils::movable_function<void(operations::management::search_index_control_ingest_response)>&& handler) const
1607
+ cluster::execute(
1608
+ operations::management::search_index_control_ingest_request request,
1609
+ utils::movable_function<void(operations::management::search_index_control_ingest_response)>&&
1610
+ handler) const
1351
1611
  {
1352
- return impl_->execute(std::move(request), std::move(handler));
1612
+ return impl_->execute(std::move(request), std::move(handler));
1353
1613
  }
1354
1614
 
1355
1615
  void
1356
- cluster::execute(operations::management::search_index_control_plan_freeze_request request,
1357
- utils::movable_function<void(operations::management::search_index_control_plan_freeze_response)>&& handler) const
1616
+ cluster::execute(
1617
+ operations::management::search_index_control_plan_freeze_request request,
1618
+ utils::movable_function<void(operations::management::search_index_control_plan_freeze_response)>&&
1619
+ handler) const
1358
1620
  {
1359
- return impl_->execute(std::move(request), std::move(handler));
1621
+ return impl_->execute(std::move(request), std::move(handler));
1360
1622
  }
1361
1623
 
1362
1624
  void
1363
- cluster::execute(operations::management::search_index_control_query_request request,
1364
- utils::movable_function<void(operations::management::search_index_control_query_response)>&& handler) const
1625
+ cluster::execute(
1626
+ operations::management::search_index_control_query_request request,
1627
+ utils::movable_function<void(operations::management::search_index_control_query_response)>&&
1628
+ handler) const
1365
1629
  {
1366
- return impl_->execute(std::move(request), std::move(handler));
1630
+ return impl_->execute(std::move(request), std::move(handler));
1367
1631
  }
1368
1632
 
1369
1633
  void
1370
- cluster::execute(operations::management::search_index_drop_request request,
1371
- utils::movable_function<void(operations::management::search_index_drop_response)>&& handler) const
1634
+ cluster::execute(
1635
+ operations::management::search_index_drop_request request,
1636
+ utils::movable_function<void(operations::management::search_index_drop_response)>&& handler) const
1372
1637
  {
1373
- return impl_->execute(std::move(request), std::move(handler));
1638
+ return impl_->execute(std::move(request), std::move(handler));
1374
1639
  }
1375
1640
 
1376
1641
  void
1377
- cluster::execute(operations::management::search_index_get_request request,
1378
- utils::movable_function<void(operations::management::search_index_get_response)>&& handler) const
1642
+ cluster::execute(
1643
+ operations::management::search_index_get_request request,
1644
+ utils::movable_function<void(operations::management::search_index_get_response)>&& handler) const
1379
1645
  {
1380
- return impl_->execute(std::move(request), std::move(handler));
1646
+ return impl_->execute(std::move(request), std::move(handler));
1381
1647
  }
1382
1648
 
1383
1649
  void
1384
- cluster::execute(operations::management::search_index_get_all_request request,
1385
- utils::movable_function<void(operations::management::search_index_get_all_response)>&& handler) const
1650
+ cluster::execute(
1651
+ operations::management::search_index_get_all_request request,
1652
+ utils::movable_function<void(operations::management::search_index_get_all_response)>&& handler)
1653
+ const
1386
1654
  {
1387
- return impl_->execute(std::move(request), std::move(handler));
1655
+ return impl_->execute(std::move(request), std::move(handler));
1388
1656
  }
1389
1657
 
1390
1658
  void
1391
- cluster::execute(operations::management::search_index_get_documents_count_request request,
1392
- utils::movable_function<void(operations::management::search_index_get_documents_count_response)>&& handler) const
1659
+ cluster::execute(
1660
+ operations::management::search_index_get_documents_count_request request,
1661
+ utils::movable_function<void(operations::management::search_index_get_documents_count_response)>&&
1662
+ handler) const
1393
1663
  {
1394
- return impl_->execute(std::move(request), std::move(handler));
1664
+ return impl_->execute(std::move(request), std::move(handler));
1395
1665
  }
1396
1666
 
1397
1667
  void
1398
- cluster::execute(operations::management::search_index_get_stats_request request,
1399
- utils::movable_function<void(operations::management::search_index_get_stats_response)>&& handler) const
1668
+ cluster::execute(
1669
+ operations::management::search_index_get_stats_request request,
1670
+ utils::movable_function<void(operations::management::search_index_get_stats_response)>&& handler)
1671
+ const
1400
1672
  {
1401
- return impl_->execute(std::move(request), std::move(handler));
1673
+ return impl_->execute(std::move(request), std::move(handler));
1402
1674
  }
1403
1675
 
1404
1676
  void
1405
- cluster::execute(operations::management::search_index_upsert_request request,
1406
- utils::movable_function<void(operations::management::search_index_upsert_response)>&& handler) const
1677
+ cluster::execute(
1678
+ operations::management::search_index_upsert_request request,
1679
+ utils::movable_function<void(operations::management::search_index_upsert_response)>&& handler)
1680
+ const
1407
1681
  {
1408
- return impl_->execute(std::move(request), std::move(handler));
1682
+ return impl_->execute(std::move(request), std::move(handler));
1409
1683
  }
1410
1684
 
1411
1685
  void
1412
- cluster::execute(operations::management::query_index_build_request request,
1413
- utils::movable_function<void(operations::management::query_index_build_response)>&& handler) const
1686
+ cluster::execute(
1687
+ operations::management::query_index_build_request request,
1688
+ utils::movable_function<void(operations::management::query_index_build_response)>&& handler) const
1414
1689
  {
1415
- return impl_->execute(std::move(request), std::move(handler));
1690
+ return impl_->execute(std::move(request), std::move(handler));
1416
1691
  }
1417
1692
 
1418
1693
  void
1419
- cluster::execute(operations::management::query_index_build_deferred_request request,
1420
- utils::movable_function<void(operations::management::query_index_build_deferred_response)>&& handler) const
1694
+ cluster::execute(
1695
+ operations::management::query_index_build_deferred_request request,
1696
+ utils::movable_function<void(operations::management::query_index_build_deferred_response)>&&
1697
+ handler) const
1421
1698
  {
1422
- return impl_->execute(std::move(request), std::move(handler));
1699
+ return impl_->execute(std::move(request), std::move(handler));
1423
1700
  }
1424
1701
 
1425
1702
  void
1426
- cluster::execute(operations::management::query_index_create_request request,
1427
- utils::movable_function<void(operations::management::query_index_create_response)>&& handler) const
1703
+ cluster::execute(
1704
+ operations::management::query_index_create_request request,
1705
+ utils::movable_function<void(operations::management::query_index_create_response)>&& handler)
1706
+ const
1428
1707
  {
1429
- return impl_->execute(std::move(request), std::move(handler));
1708
+ return impl_->execute(std::move(request), std::move(handler));
1430
1709
  }
1431
1710
 
1432
1711
  void
1433
- cluster::execute(operations::management::query_index_drop_request request,
1434
- utils::movable_function<void(operations::management::query_index_drop_response)>&& handler) const
1712
+ cluster::execute(
1713
+ operations::management::query_index_drop_request request,
1714
+ utils::movable_function<void(operations::management::query_index_drop_response)>&& handler) const
1435
1715
  {
1436
- return impl_->execute(std::move(request), std::move(handler));
1716
+ return impl_->execute(std::move(request), std::move(handler));
1437
1717
  }
1438
1718
 
1439
1719
  void
1440
- cluster::execute(operations::management::query_index_get_all_request request,
1441
- utils::movable_function<void(operations::management::query_index_get_all_response)>&& handler) const
1720
+ cluster::execute(
1721
+ operations::management::query_index_get_all_request request,
1722
+ utils::movable_function<void(operations::management::query_index_get_all_response)>&& handler)
1723
+ const
1442
1724
  {
1443
- return impl_->execute(std::move(request), std::move(handler));
1725
+ return impl_->execute(std::move(request), std::move(handler));
1444
1726
  }
1445
1727
 
1446
1728
  void
1447
- cluster::execute(operations::management::query_index_get_all_deferred_request request,
1448
- utils::movable_function<void(operations::management::query_index_get_all_deferred_response)>&& handler) const
1729
+ cluster::execute(
1730
+ operations::management::query_index_get_all_deferred_request request,
1731
+ utils::movable_function<void(operations::management::query_index_get_all_deferred_response)>&&
1732
+ handler) const
1449
1733
  {
1450
- return impl_->execute(std::move(request), std::move(handler));
1734
+ return impl_->execute(std::move(request), std::move(handler));
1451
1735
  }
1452
1736
 
1453
1737
  void
1454
- cluster::execute(operations::management::bucket_describe_request request,
1455
- utils::movable_function<void(operations::management::bucket_describe_response)>&& handler) const
1738
+ cluster::execute(
1739
+ operations::management::bucket_describe_request request,
1740
+ utils::movable_function<void(operations::management::bucket_describe_response)>&& handler) const
1456
1741
  {
1457
- return impl_->execute(std::move(request), std::move(handler));
1742
+ return impl_->execute(std::move(request), std::move(handler));
1458
1743
  }
1459
1744
 
1460
1745
  void
1461
- cluster::execute(operations::management::cluster_describe_request request,
1462
- utils::movable_function<void(operations::management::cluster_describe_response)>&& handler) const
1746
+ cluster::execute(
1747
+ operations::management::cluster_describe_request request,
1748
+ utils::movable_function<void(operations::management::cluster_describe_response)>&& handler) const
1463
1749
  {
1464
- return impl_->execute(std::move(request), std::move(handler));
1750
+ return impl_->execute(std::move(request), std::move(handler));
1465
1751
  }
1466
1752
 
1467
1753
  void
1468
- cluster::execute(operations::management::cluster_developer_preview_enable_request request,
1469
- utils::movable_function<void(operations::management::cluster_developer_preview_enable_response)>&& handler) const
1754
+ cluster::execute(
1755
+ operations::management::cluster_developer_preview_enable_request request,
1756
+ utils::movable_function<void(operations::management::cluster_developer_preview_enable_response)>&&
1757
+ handler) const
1470
1758
  {
1471
- return impl_->execute(std::move(request), std::move(handler));
1759
+ return impl_->execute(std::move(request), std::move(handler));
1472
1760
  }
1473
1761
 
1474
1762
  void
1475
- cluster::execute(operations::management::freeform_request request,
1476
- utils::movable_function<void(operations::management::freeform_response)>&& handler) const
1763
+ cluster::execute(
1764
+ operations::management::freeform_request request,
1765
+ utils::movable_function<void(operations::management::freeform_response)>&& handler) const
1477
1766
  {
1478
- return impl_->execute(std::move(request), std::move(handler));
1767
+ return impl_->execute(std::move(request), std::move(handler));
1479
1768
  }
1480
1769
 
1481
1770
  void
1482
- cluster::execute(impl::get_replica_request request, utils::movable_function<void(impl::get_replica_response)>&& handler) const
1771
+ cluster::execute(impl::get_replica_request request,
1772
+ utils::movable_function<void(impl::get_replica_response)>&& handler) const
1483
1773
  {
1484
- return impl_->execute(std::move(request), std::move(handler));
1774
+ return impl_->execute(std::move(request), std::move(handler));
1485
1775
  }
1486
1776
 
1487
1777
  void
1488
- cluster::execute(impl::observe_seqno_request request, utils::movable_function<void(impl::observe_seqno_response)>&& handler) const
1778
+ cluster::execute(impl::observe_seqno_request request,
1779
+ utils::movable_function<void(impl::observe_seqno_response)>&& handler) const
1489
1780
  {
1490
- return impl_->execute(std::move(request), std::move(handler));
1781
+ return impl_->execute(std::move(request), std::move(handler));
1491
1782
  }
1492
1783
 
1493
1784
  void
1494
- cluster::execute(operations::management::analytics_link_replace_request<management::analytics::azure_blob_external_link> request,
1495
- utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler) const
1785
+ cluster::execute(
1786
+ operations::management::analytics_link_replace_request<
1787
+ management::analytics::azure_blob_external_link> request,
1788
+ utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler)
1789
+ const
1496
1790
  {
1497
- return impl_->execute(std::move(request), std::move(handler));
1791
+ return impl_->execute(std::move(request), std::move(handler));
1498
1792
  }
1499
1793
 
1500
1794
  void
1501
- cluster::execute(operations::management::analytics_link_replace_request<management::analytics::couchbase_remote_link> request,
1502
- utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler) const
1795
+ cluster::execute(
1796
+ operations::management::analytics_link_replace_request<
1797
+ management::analytics::couchbase_remote_link> request,
1798
+ utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler)
1799
+ const
1503
1800
  {
1504
- return impl_->execute(std::move(request), std::move(handler));
1801
+ return impl_->execute(std::move(request), std::move(handler));
1505
1802
  }
1506
1803
 
1507
1804
  void
1508
- cluster::execute(operations::management::analytics_link_replace_request<management::analytics::s3_external_link> request,
1509
- utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler) const
1805
+ cluster::execute(
1806
+ operations::management::analytics_link_replace_request<management::analytics::s3_external_link>
1807
+ request,
1808
+ utils::movable_function<void(operations::management::analytics_link_replace_response)>&& handler)
1809
+ const
1510
1810
  {
1511
- return impl_->execute(std::move(request), std::move(handler));
1811
+ return impl_->execute(std::move(request), std::move(handler));
1512
1812
  }
1513
1813
 
1514
1814
  void
1515
- cluster::execute(operations::management::analytics_link_create_request<management::analytics::azure_blob_external_link> request,
1516
- utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler) const
1815
+ cluster::execute(
1816
+ operations::management::analytics_link_create_request<
1817
+ management::analytics::azure_blob_external_link> request,
1818
+ utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler)
1819
+ const
1517
1820
  {
1518
- return impl_->execute(std::move(request), std::move(handler));
1821
+ return impl_->execute(std::move(request), std::move(handler));
1519
1822
  }
1520
1823
 
1521
1824
  void
1522
- cluster::execute(operations::management::analytics_link_create_request<management::analytics::couchbase_remote_link> request,
1523
- utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler) const
1825
+ cluster::execute(
1826
+ operations::management::analytics_link_create_request<
1827
+ management::analytics::couchbase_remote_link> request,
1828
+ utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler)
1829
+ const
1524
1830
  {
1525
- return impl_->execute(std::move(request), std::move(handler));
1831
+ return impl_->execute(std::move(request), std::move(handler));
1526
1832
  }
1527
1833
 
1528
1834
  void
1529
- cluster::execute(operations::management::analytics_link_create_request<management::analytics::s3_external_link> request,
1530
- utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler) const
1835
+ cluster::execute(
1836
+ operations::management::analytics_link_create_request<management::analytics::s3_external_link>
1837
+ request,
1838
+ utils::movable_function<void(operations::management::analytics_link_create_response)>&& handler)
1839
+ const
1531
1840
  {
1532
- return impl_->execute(std::move(request), std::move(handler));
1841
+ return impl_->execute(std::move(request), std::move(handler));
1533
1842
  }
1534
1843
 
1535
1844
  void
1536
- cluster::execute(operations::analytics_request request, utils::movable_function<void(operations::analytics_response)>&& handler) const
1845
+ cluster::execute(operations::analytics_request request,
1846
+ utils::movable_function<void(operations::analytics_response)>&& handler) const
1537
1847
  {
1538
- return impl_->execute(std::move(request), std::move(handler));
1848
+ return impl_->execute(std::move(request), std::move(handler));
1539
1849
  }
1540
1850
 
1541
1851
  void
1542
1852
  cluster::execute(operations::upsert_request_with_legacy_durability request,
1543
1853
  utils::movable_function<void(operations::upsert_response)>&& handler) const
1544
1854
  {
1545
- return request.execute(*this, std::move(handler));
1855
+ return request.execute(*this, std::move(handler));
1546
1856
  }
1547
1857
 
1548
1858
  void
1549
1859
  cluster::execute(operations::insert_request_with_legacy_durability request,
1550
1860
  utils::movable_function<void(operations::insert_response)>&& handler) const
1551
1861
  {
1552
- return request.execute(*this, std::move(handler));
1862
+ return request.execute(*this, std::move(handler));
1553
1863
  }
1554
1864
 
1555
1865
  void
1556
1866
  cluster::execute(operations::append_request_with_legacy_durability request,
1557
1867
  utils::movable_function<void(operations::append_response)>&& handler) const
1558
1868
  {
1559
- return request.execute(*this, std::move(handler));
1869
+ return request.execute(*this, std::move(handler));
1560
1870
  }
1561
1871
 
1562
1872
  void
1563
1873
  cluster::execute(operations::prepend_request_with_legacy_durability request,
1564
1874
  utils::movable_function<void(operations::prepend_response)>&& handler) const
1565
1875
  {
1566
- return request.execute(*this, std::move(handler));
1876
+ return request.execute(*this, std::move(handler));
1567
1877
  }
1568
1878
 
1569
1879
  void
1570
1880
  cluster::execute(operations::replace_request_with_legacy_durability request,
1571
1881
  utils::movable_function<void(operations::replace_response)>&& handler) const
1572
1882
  {
1573
- return request.execute(*this, std::move(handler));
1883
+ return request.execute(*this, std::move(handler));
1574
1884
  }
1575
1885
 
1576
1886
  void
1577
1887
  cluster::execute(operations::mutate_in_request_with_legacy_durability request,
1578
1888
  utils::movable_function<void(operations::mutate_in_response)>&& handler) const
1579
1889
  {
1580
- return request.execute(*this, std::move(handler));
1890
+ return request.execute(*this, std::move(handler));
1581
1891
  }
1582
1892
 
1583
1893
  void
1584
1894
  cluster::execute(operations::remove_request_with_legacy_durability request,
1585
1895
  utils::movable_function<void(operations::remove_response)>&& handler) const
1586
1896
  {
1587
- return request.execute(*this, std::move(handler));
1897
+ return request.execute(*this, std::move(handler));
1588
1898
  }
1589
1899
 
1590
1900
  void
1591
1901
  cluster::execute(operations::increment_request_with_legacy_durability request,
1592
1902
  utils::movable_function<void(operations::increment_response)>&& handler) const
1593
1903
  {
1594
- return request.execute(*this, std::move(handler));
1904
+ return request.execute(*this, std::move(handler));
1595
1905
  }
1596
1906
 
1597
1907
  void
1598
1908
  cluster::execute(operations::decrement_request_with_legacy_durability request,
1599
1909
  utils::movable_function<void(operations::decrement_response)>&& handler) const
1600
1910
  {
1601
- return request.execute(*this, std::move(handler));
1911
+ return request.execute(*this, std::move(handler));
1602
1912
  }
1603
1913
 
1604
1914
  void
1605
- cluster::execute(impl::lookup_in_replica_request request, utils::movable_function<void(impl::lookup_in_replica_response)>&& handler) const
1915
+ cluster::execute(impl::lookup_in_replica_request request,
1916
+ utils::movable_function<void(impl::lookup_in_replica_response)>&& handler) const
1606
1917
  {
1607
- return impl_->execute(std::move(request), std::move(handler));
1918
+ return impl_->execute(std::move(request), std::move(handler));
1608
1919
  }
1609
1920
 
1610
1921
  auto
1611
1922
  cluster::to_string() const -> std::string
1612
1923
  {
1613
- return fmt::format(
1614
- R"(#<cluster:{} impl={}>)", static_cast<const void*>(this), impl_ ? static_cast<const void*>(impl_.get()) : "(none)");
1924
+ return fmt::format(R"(#<cluster:{} impl={}, use_count={}>)",
1925
+ static_cast<const void*>(this),
1926
+ impl_ ? static_cast<const void*>(impl_.get()) : "(none)",
1927
+ impl_ ? std::to_string(impl_.use_count()) : "(none)");
1615
1928
  }
1616
1929
  } // namespace couchbase::core