couchbase 4.4.2 → 4.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. package/BUILDING.md +182 -0
  2. package/CMakeLists.txt +13 -0
  3. package/CONTRIBUTING.md +1 -1
  4. package/README.md +4 -2
  5. package/deps/couchbase-cxx-cache/boringssl/e31ea00c1ea52052d2d78d44006cc88c80fa24a9/boringssl/src/BUILDING.md +206 -0
  6. package/deps/couchbase-cxx-client/CMakeLists.txt +18 -13
  7. package/deps/couchbase-cxx-client/README.md +2 -2
  8. package/deps/couchbase-cxx-client/cmake/APKBUILD.in +54 -0
  9. package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +0 -5
  10. package/deps/couchbase-cxx-client/cmake/Packaging.cmake +177 -10
  11. package/deps/couchbase-cxx-client/cmake/RPath.cmake +10 -0
  12. package/deps/couchbase-cxx-client/cmake/Testing.cmake +1 -1
  13. package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +28 -2
  14. package/deps/couchbase-cxx-client/cmake/build_version.hxx.in +1 -0
  15. package/deps/couchbase-cxx-client/cmake/couchbase-cxx-client.spec.in +45 -6
  16. package/deps/couchbase-cxx-client/cmake/couchbase_cxx_client.pc.in +2 -2
  17. package/deps/couchbase-cxx-client/cmake/debian/changelog.in +5 -0
  18. package/deps/couchbase-cxx-client/cmake/debian/compat +1 -0
  19. package/deps/couchbase-cxx-client/cmake/debian/control +40 -0
  20. package/deps/couchbase-cxx-client/cmake/debian/rules +41 -0
  21. package/deps/couchbase-cxx-client/cmake/debian/source/format +1 -0
  22. package/deps/couchbase-cxx-client/core/agent_group.cxx +8 -0
  23. package/deps/couchbase-cxx-client/core/agent_group.hxx +4 -0
  24. package/deps/couchbase-cxx-client/core/bucket.cxx +16 -20
  25. package/deps/couchbase-cxx-client/core/bucket.hxx +12 -12
  26. package/deps/couchbase-cxx-client/core/cluster.cxx +44 -52
  27. package/deps/couchbase-cxx-client/core/cluster_agent.cxx +8 -0
  28. package/deps/couchbase-cxx-client/core/cluster_agent.hxx +4 -0
  29. package/deps/couchbase-cxx-client/core/collections_component.cxx +2 -2
  30. package/deps/couchbase-cxx-client/core/columnar/agent.cxx +2 -2
  31. package/deps/couchbase-cxx-client/core/columnar/agent.hxx +1 -1
  32. package/deps/couchbase-cxx-client/core/columnar/management_component.cxx +3 -3
  33. package/deps/couchbase-cxx-client/core/columnar/query_component.cxx +103 -45
  34. package/deps/couchbase-cxx-client/core/columnar/query_component.hxx +1 -0
  35. package/deps/couchbase-cxx-client/core/free_form_http_request.hxx +8 -0
  36. package/deps/couchbase-cxx-client/core/http_component.cxx +55 -24
  37. package/deps/couchbase-cxx-client/core/http_component.hxx +4 -0
  38. package/deps/couchbase-cxx-client/core/impl/analytics.cxx +1 -0
  39. package/deps/couchbase-cxx-client/core/impl/analytics_index_manager.cxx +15 -15
  40. package/deps/couchbase-cxx-client/core/impl/bootstrap_error.hxx +10 -2
  41. package/deps/couchbase-cxx-client/core/impl/bucket.cxx +1 -1
  42. package/deps/couchbase-cxx-client/core/impl/bucket_manager.cxx +6 -6
  43. package/deps/couchbase-cxx-client/core/impl/cluster.cxx +36 -40
  44. package/deps/couchbase-cxx-client/core/impl/collection.cxx +29 -5
  45. package/deps/couchbase-cxx-client/core/impl/collection_manager.cxx +5 -5
  46. package/deps/couchbase-cxx-client/core/impl/error.cxx +24 -3
  47. package/deps/couchbase-cxx-client/core/impl/get_replica.hxx +2 -0
  48. package/deps/couchbase-cxx-client/core/impl/lookup_in_replica.hxx +2 -0
  49. package/deps/couchbase-cxx-client/core/impl/observe_poll.cxx +13 -5
  50. package/deps/couchbase-cxx-client/core/impl/observe_poll.hxx +1 -3
  51. package/deps/couchbase-cxx-client/core/impl/observe_seqno.hxx +2 -0
  52. package/deps/couchbase-cxx-client/core/impl/query.cxx +1 -0
  53. package/deps/couchbase-cxx-client/core/impl/query_index_manager.cxx +6 -6
  54. package/deps/couchbase-cxx-client/core/impl/scan_result.cxx +1 -1
  55. package/deps/couchbase-cxx-client/core/impl/search.cxx +2 -0
  56. package/deps/couchbase-cxx-client/core/impl/search_index_manager.cxx +12 -12
  57. package/deps/couchbase-cxx-client/core/io/http_command.hxx +31 -20
  58. package/deps/couchbase-cxx-client/core/io/http_session.cxx +5 -0
  59. package/deps/couchbase-cxx-client/core/io/http_session.hxx +17 -4
  60. package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +97 -49
  61. package/deps/couchbase-cxx-client/core/io/mcbp_command.hxx +15 -14
  62. package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +48 -33
  63. package/deps/couchbase-cxx-client/core/io/streams.cxx +256 -0
  64. package/deps/couchbase-cxx-client/core/io/streams.hxx +31 -155
  65. package/deps/couchbase-cxx-client/core/logger/configuration.hxx +5 -0
  66. package/deps/couchbase-cxx-client/core/logger/custom_rotating_file_sink.cxx +2 -3
  67. package/deps/couchbase-cxx-client/core/logger/logger.cxx +39 -7
  68. package/deps/couchbase-cxx-client/core/logger/logger.hxx +7 -0
  69. package/deps/couchbase-cxx-client/core/meta/features.hxx +11 -0
  70. package/deps/couchbase-cxx-client/core/meta/version.cxx +47 -6
  71. package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.cxx +188 -0
  72. package/deps/couchbase-cxx-client/core/metrics/meter_wrapper.hxx +73 -0
  73. package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +23 -17
  74. package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +1 -0
  75. package/deps/couchbase-cxx-client/core/operations/document_append.hxx +2 -0
  76. package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +2 -0
  77. package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +2 -0
  78. package/deps/couchbase-cxx-client/core/operations/document_get.hxx +2 -0
  79. package/deps/couchbase-cxx-client/core/operations/document_get_all_replicas.hxx +2 -0
  80. package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +2 -0
  81. package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +2 -0
  82. package/deps/couchbase-cxx-client/core/operations/document_get_any_replica.hxx +2 -0
  83. package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +2 -0
  84. package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +2 -0
  85. package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +2 -0
  86. package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +2 -0
  87. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_all_replicas.hxx +2 -0
  88. package/deps/couchbase-cxx-client/core/operations/document_lookup_in_any_replica.hxx +2 -0
  89. package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +2 -0
  90. package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +2 -0
  91. package/deps/couchbase-cxx-client/core/operations/document_query.hxx +1 -0
  92. package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +2 -0
  93. package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +2 -0
  94. package/deps/couchbase-cxx-client/core/operations/document_search.hxx +1 -0
  95. package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +2 -0
  96. package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +2 -0
  97. package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +2 -0
  98. package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
  99. package/deps/couchbase-cxx-client/core/operations/http_noop.hxx +2 -0
  100. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_create.hxx +1 -0
  101. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_drop.hxx +1 -0
  102. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataset_get_all.hxx +1 -0
  103. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_create.hxx +1 -0
  104. package/deps/couchbase-cxx-client/core/operations/management/analytics_dataverse_drop.hxx +1 -0
  105. package/deps/couchbase-cxx-client/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
  106. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_create.hxx +1 -0
  107. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_drop.hxx +1 -0
  108. package/deps/couchbase-cxx-client/core/operations/management/analytics_index_get_all.hxx +1 -0
  109. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_connect.hxx +1 -0
  110. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_create.hxx +1 -0
  111. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_disconnect.hxx +1 -0
  112. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_drop.hxx +1 -0
  113. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.cxx +23 -15
  114. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_get_all.hxx +4 -3
  115. package/deps/couchbase-cxx-client/core/operations/management/analytics_link_replace.hxx +1 -0
  116. package/deps/couchbase-cxx-client/core/operations/management/bucket_create.hxx +1 -0
  117. package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.cxx +2 -1
  118. package/deps/couchbase-cxx-client/core/operations/management/bucket_describe.hxx +1 -0
  119. package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.cxx +3 -1
  120. package/deps/couchbase-cxx-client/core/operations/management/bucket_drop.hxx +1 -0
  121. package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.cxx +3 -1
  122. package/deps/couchbase-cxx-client/core/operations/management/bucket_flush.hxx +1 -0
  123. package/deps/couchbase-cxx-client/core/operations/management/bucket_get.cxx +3 -1
  124. package/deps/couchbase-cxx-client/core/operations/management/bucket_get.hxx +1 -0
  125. package/deps/couchbase-cxx-client/core/operations/management/bucket_get_all.hxx +1 -0
  126. package/deps/couchbase-cxx-client/core/operations/management/bucket_update.cxx +3 -1
  127. package/deps/couchbase-cxx-client/core/operations/management/bucket_update.hxx +1 -0
  128. package/deps/couchbase-cxx-client/core/operations/management/change_password.hxx +1 -0
  129. package/deps/couchbase-cxx-client/core/operations/management/cluster_describe.hxx +1 -0
  130. package/deps/couchbase-cxx-client/core/operations/management/cluster_developer_preview_enable.hxx +1 -0
  131. package/deps/couchbase-cxx-client/core/operations/management/collection_create.cxx +3 -2
  132. package/deps/couchbase-cxx-client/core/operations/management/collection_create.hxx +2 -0
  133. package/deps/couchbase-cxx-client/core/operations/management/collection_drop.cxx +5 -2
  134. package/deps/couchbase-cxx-client/core/operations/management/collection_drop.hxx +1 -0
  135. package/deps/couchbase-cxx-client/core/operations/management/collection_update.cxx +4 -2
  136. package/deps/couchbase-cxx-client/core/operations/management/collection_update.hxx +2 -0
  137. package/deps/couchbase-cxx-client/core/operations/management/collections_manifest_get.hxx +2 -0
  138. package/deps/couchbase-cxx-client/core/operations/management/eventing_deploy_function.hxx +3 -2
  139. package/deps/couchbase-cxx-client/core/operations/management/eventing_drop_function.hxx +3 -2
  140. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_all_functions.hxx +3 -2
  141. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_function.hxx +3 -2
  142. package/deps/couchbase-cxx-client/core/operations/management/eventing_get_status.hxx +3 -2
  143. package/deps/couchbase-cxx-client/core/operations/management/eventing_pause_function.hxx +3 -2
  144. package/deps/couchbase-cxx-client/core/operations/management/eventing_resume_function.hxx +3 -2
  145. package/deps/couchbase-cxx-client/core/operations/management/eventing_undeploy_function.hxx +3 -2
  146. package/deps/couchbase-cxx-client/core/operations/management/eventing_upsert_function.hxx +3 -2
  147. package/deps/couchbase-cxx-client/core/operations/management/freeform.hxx +2 -0
  148. package/deps/couchbase-cxx-client/core/operations/management/group_drop.hxx +1 -0
  149. package/deps/couchbase-cxx-client/core/operations/management/group_get.hxx +1 -0
  150. package/deps/couchbase-cxx-client/core/operations/management/group_get_all.hxx +1 -0
  151. package/deps/couchbase-cxx-client/core/operations/management/group_upsert.cxx +3 -3
  152. package/deps/couchbase-cxx-client/core/operations/management/group_upsert.hxx +1 -0
  153. package/deps/couchbase-cxx-client/core/operations/management/query_index_build.hxx +2 -0
  154. package/deps/couchbase-cxx-client/core/operations/management/query_index_build_deferred.hxx +3 -0
  155. package/deps/couchbase-cxx-client/core/operations/management/query_index_create.hxx +1 -0
  156. package/deps/couchbase-cxx-client/core/operations/management/query_index_drop.hxx +1 -0
  157. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all.hxx +2 -0
  158. package/deps/couchbase-cxx-client/core/operations/management/query_index_get_all_deferred.hxx +3 -0
  159. package/deps/couchbase-cxx-client/core/operations/management/role_get_all.hxx +1 -0
  160. package/deps/couchbase-cxx-client/core/operations/management/scope_create.cxx +2 -1
  161. package/deps/couchbase-cxx-client/core/operations/management/scope_create.hxx +1 -0
  162. package/deps/couchbase-cxx-client/core/operations/management/scope_drop.cxx +4 -1
  163. package/deps/couchbase-cxx-client/core/operations/management/scope_drop.hxx +1 -0
  164. package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.cxx +3 -1
  165. package/deps/couchbase-cxx-client/core/operations/management/scope_get_all.hxx +1 -0
  166. package/deps/couchbase-cxx-client/core/operations/management/search_get_stats.hxx +1 -0
  167. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.cxx +3 -2
  168. package/deps/couchbase-cxx-client/core/operations/management/search_index_analyze_document.hxx +1 -0
  169. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.cxx +3 -2
  170. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_ingest.hxx +1 -0
  171. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.cxx +3 -2
  172. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_plan_freeze.hxx +1 -0
  173. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.cxx +3 -2
  174. package/deps/couchbase-cxx-client/core/operations/management/search_index_control_query.hxx +1 -0
  175. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.cxx +5 -2
  176. package/deps/couchbase-cxx-client/core/operations/management/search_index_drop.hxx +1 -0
  177. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.cxx +5 -2
  178. package/deps/couchbase-cxx-client/core/operations/management/search_index_get.hxx +1 -0
  179. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.cxx +4 -2
  180. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_all.hxx +1 -0
  181. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.cxx +3 -2
  182. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_documents_count.hxx +2 -0
  183. package/deps/couchbase-cxx-client/core/operations/management/search_index_get_stats.hxx +1 -0
  184. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.cxx +5 -2
  185. package/deps/couchbase-cxx-client/core/operations/management/search_index_upsert.hxx +1 -0
  186. package/deps/couchbase-cxx-client/core/operations/management/user_drop.hxx +1 -0
  187. package/deps/couchbase-cxx-client/core/operations/management/user_get.hxx +1 -0
  188. package/deps/couchbase-cxx-client/core/operations/management/user_get_all.hxx +1 -0
  189. package/deps/couchbase-cxx-client/core/operations/management/user_upsert.cxx +3 -3
  190. package/deps/couchbase-cxx-client/core/operations/management/user_upsert.hxx +1 -0
  191. package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.cxx +2 -1
  192. package/deps/couchbase-cxx-client/core/operations/management/view_index_drop.hxx +1 -0
  193. package/deps/couchbase-cxx-client/core/operations/management/view_index_get.cxx +2 -1
  194. package/deps/couchbase-cxx-client/core/operations/management/view_index_get.hxx +1 -0
  195. package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.cxx +3 -1
  196. package/deps/couchbase-cxx-client/core/operations/management/view_index_get_all.hxx +2 -0
  197. package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.cxx +2 -1
  198. package/deps/couchbase-cxx-client/core/operations/management/view_index_upsert.hxx +1 -0
  199. package/deps/couchbase-cxx-client/core/origin.cxx +37 -17
  200. package/deps/couchbase-cxx-client/core/platform/base64.cc +1 -1
  201. package/deps/couchbase-cxx-client/core/platform/random.cc +2 -0
  202. package/deps/couchbase-cxx-client/core/platform/uuid.h +6 -6
  203. package/deps/couchbase-cxx-client/core/row_streamer.cxx +1 -1
  204. package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.cc +1 -1
  205. package/deps/couchbase-cxx-client/core/sasl/scram-sha/stringutils.h +4 -4
  206. package/deps/couchbase-cxx-client/core/topology/configuration.hxx +2 -0
  207. package/deps/couchbase-cxx-client/core/topology/configuration_json.hxx +8 -0
  208. package/deps/couchbase-cxx-client/core/tracing/constants.hxx +3 -0
  209. package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.cxx +87 -0
  210. package/deps/couchbase-cxx-client/core/tracing/tracer_wrapper.hxx +57 -0
  211. package/deps/couchbase-cxx-client/core/transactions/async_attempt_context.hxx +9 -21
  212. package/deps/couchbase-cxx-client/core/transactions/attempt_context.hxx +6 -33
  213. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +57 -56
  214. package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +17 -18
  215. package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +2 -2
  216. package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +2 -2
  217. package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +0 -20
  218. package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +2 -2
  219. package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +128 -52
  220. package/deps/couchbase-cxx-client/couchbase/analytics_options.hxx +4 -3
  221. package/deps/couchbase-cxx-client/couchbase/codec/tao_json_serializer.hxx +1 -1
  222. package/deps/couchbase-cxx-client/couchbase/common_options.hxx +16 -1
  223. package/deps/couchbase-cxx-client/couchbase/metrics/otel_meter.hxx +16 -20
  224. package/deps/couchbase-cxx-client/couchbase/mutate_in_specs.hxx +2 -2
  225. package/deps/couchbase-cxx-client/couchbase/query_options.hxx +4 -3
  226. package/deps/couchbase-cxx-client/couchbase/search_options.hxx +1 -1
  227. package/dist/analyticsindexmanager.d.ts +98 -14
  228. package/dist/analyticsindexmanager.js +452 -411
  229. package/dist/binding.d.ts +53 -4
  230. package/dist/bindingutilities.d.ts +26 -1
  231. package/dist/bindingutilities.js +108 -1
  232. package/dist/couchbase.d.ts +3 -1
  233. package/dist/couchbase.js +2 -0
  234. package/dist/rangeScan.d.ts +1 -1
  235. package/dist/rangeScan.js +1 -1
  236. package/dist/transactions.d.ts +34 -3
  237. package/dist/transactions.js +25 -18
  238. package/dist/transcoders.d.ts +68 -0
  239. package/dist/transcoders.js +194 -1
  240. package/dist/usermanager.d.ts +14 -14
  241. package/dist/usermanager.js +178 -228
  242. package/dist/utilities.js +4 -6
  243. package/dist/utilities_internal.js +1 -2
  244. package/package.json +9 -8
  245. package/src/binding.cpp +13 -13
  246. package/src/connection.cpp +22 -0
  247. package/src/connection.hpp +12 -0
  248. package/src/connection_autogen.cpp +100 -0
  249. package/src/jstocbpp_autogen.hpp +315 -8
  250. package/src/jstocbpp_transactions.hpp +1 -2
  251. package/tools/gen-bindings-js.js +38 -3
  252. package/tools/gen-bindings-json.py +575 -328
@@ -587,9 +587,9 @@ attempt_context_impl::create_document_metadata(
587
587
  }
588
588
 
589
589
  void
590
- attempt_context_impl::replace_raw(const transaction_get_result& document,
591
- codec::encoded_value content,
592
- Callback&& cb)
590
+ attempt_context_impl::replace(const transaction_get_result& document,
591
+ codec::encoded_value content,
592
+ Callback&& cb)
593
593
  {
594
594
 
595
595
  if (op_list_.get_mode().is_query()) {
@@ -852,19 +852,19 @@ attempt_context_impl::create_staged_replace(const transaction_get_result& docume
852
852
  }
853
853
 
854
854
  auto
855
- attempt_context_impl::replace_raw(const transaction_get_result& document,
856
- codec::encoded_value content) -> transaction_get_result
855
+ attempt_context_impl::replace(const transaction_get_result& document,
856
+ codec::encoded_value content) -> transaction_get_result
857
857
  {
858
858
  auto barrier = std::make_shared<std::promise<transaction_get_result>>();
859
859
  auto f = barrier->get_future();
860
- replace_raw(document,
861
- std::move(content),
862
- [barrier](const std::exception_ptr& err, std::optional<transaction_get_result> res) {
863
- if (err) {
864
- return barrier->set_exception(err);
865
- }
866
- barrier->set_value(std::move(*res));
867
- });
860
+ replace(document,
861
+ std::move(content),
862
+ [barrier](const std::exception_ptr& err, std::optional<transaction_get_result> res) {
863
+ if (err) {
864
+ return barrier->set_exception(err);
865
+ }
866
+ barrier->set_value(std::move(*res));
867
+ });
868
868
  return f.get();
869
869
  }
870
870
 
@@ -873,12 +873,12 @@ attempt_context_impl::replace_raw(couchbase::transactions::transaction_get_resul
873
873
  codec::encoded_value content,
874
874
  couchbase::transactions::async_result_handler&& handler)
875
875
  {
876
- replace_raw(core::transactions::transaction_get_result(doc),
877
- std::move(content),
878
- [handler = std::move(handler)](const std::exception_ptr& err,
879
- std::optional<transaction_get_result> res) mutable {
880
- wrap_callback_for_async_public_api(err, std::move(res), std::move(handler));
881
- });
876
+ replace(core::transactions::transaction_get_result(doc),
877
+ std::move(content),
878
+ [handler = std::move(handler)](const std::exception_ptr& err,
879
+ std::optional<transaction_get_result> res) mutable {
880
+ wrap_callback_for_async_public_api(err, std::move(res), std::move(handler));
881
+ });
882
882
  }
883
883
 
884
884
  auto
@@ -888,7 +888,7 @@ attempt_context_impl::replace_raw(const couchbase::transactions::transaction_get
888
888
  {
889
889
  return wrap_call_for_public_api(
890
890
  [self = shared_from_this(), doc, content = std::move(content)]() -> transaction_get_result {
891
- return self->replace_raw(transaction_get_result(doc), content);
891
+ return self->replace(transaction_get_result(doc), content);
892
892
  });
893
893
  }
894
894
 
@@ -900,8 +900,8 @@ attempt_context_impl::insert_raw(const collection& coll,
900
900
  {
901
901
  return wrap_call_for_public_api(
902
902
  [self = shared_from_this(), coll, &id, content = std::move(content)]() mutable {
903
- return self->insert_raw({ coll.bucket_name(), coll.scope_name(), coll.name(), id },
904
- std::move(content));
903
+ return self->insert({ coll.bucket_name(), coll.scope_name(), coll.name(), id },
904
+ std::move(content));
905
905
  });
906
906
  }
907
907
 
@@ -911,35 +911,35 @@ attempt_context_impl::insert_raw(const collection& coll,
911
911
  codec::encoded_value content,
912
912
  couchbase::transactions::async_result_handler&& handler)
913
913
  {
914
- insert_raw({ coll.bucket_name(), coll.scope_name(), coll.name(), std::move(id) },
915
- std::move(content),
916
- [handler = std::move(handler)](const std::exception_ptr& err,
917
- std::optional<transaction_get_result> res) mutable {
918
- wrap_callback_for_async_public_api(err, std::move(res), std::move(handler));
919
- });
914
+ insert({ coll.bucket_name(), coll.scope_name(), coll.name(), std::move(id) },
915
+ std::move(content),
916
+ [handler = std::move(handler)](const std::exception_ptr& err,
917
+ std::optional<transaction_get_result> res) mutable {
918
+ wrap_callback_for_async_public_api(err, std::move(res), std::move(handler));
919
+ });
920
920
  }
921
921
 
922
922
  auto
923
- attempt_context_impl::insert_raw(const core::document_id& id,
924
- codec::encoded_value content) -> transaction_get_result
923
+ attempt_context_impl::insert(const core::document_id& id,
924
+ codec::encoded_value content) -> transaction_get_result
925
925
  {
926
926
  auto barrier = std::make_shared<std::promise<transaction_get_result>>();
927
927
  auto f = barrier->get_future();
928
- insert_raw(id,
929
- std::move(content),
930
- [barrier](const std::exception_ptr& err, std::optional<transaction_get_result> res) {
931
- if (err) {
932
- return barrier->set_exception(err);
933
- }
934
- barrier->set_value(std::move(*res));
935
- });
928
+ insert(id,
929
+ std::move(content),
930
+ [barrier](const std::exception_ptr& err, std::optional<transaction_get_result> res) {
931
+ if (err) {
932
+ return barrier->set_exception(err);
933
+ }
934
+ barrier->set_value(std::move(*res));
935
+ });
936
936
  return f.get();
937
937
  }
938
938
 
939
939
  void
940
- attempt_context_impl::insert_raw(const core::document_id& id,
941
- codec::encoded_value content,
942
- Callback&& cb)
940
+ attempt_context_impl::insert(const core::document_id& id,
941
+ codec::encoded_value content,
942
+ Callback&& cb)
943
943
  {
944
944
  if (op_list_.get_mode().is_query()) {
945
945
  return insert_raw_with_query(id, std::move(content), std::move(cb));
@@ -2975,7 +2975,7 @@ attempt_context_impl::do_get(const core::document_id& id,
2975
2975
  allow_replica,
2976
2976
  resolving_missing_atr_entry = std::move(resolving_missing_atr_entry),
2977
2977
  cb = std::move(cb)](std::optional<error_class> ec,
2978
- std::optional<std::string> err_message,
2978
+ const std::optional<std::string>& err_message,
2979
2979
  std::optional<transaction_get_result> doc) mutable {
2980
2980
  if (!ec && !doc) {
2981
2981
  // it just isn't there.
@@ -3101,20 +3101,21 @@ template<typename LookupInRequest, typename Callback>
3101
3101
  void
3102
3102
  execute_lookup(attempt_context_impl* ctx, LookupInRequest& req, Callback&& cb)
3103
3103
  {
3104
- ctx->overall()->cluster_ref().execute(req, [ctx, cb = std::forward<Callback>(cb)](auto resp) {
3105
- auto ec = error_class_from_response(resp);
3106
- if (ec) {
3107
- CB_ATTEMPT_CTX_LOG_TRACE(ctx, "get_doc got error {} : {}", resp.ctx.ec().message(), *ec);
3108
- switch (*ec) {
3109
- case FAIL_PATH_NOT_FOUND:
3110
- return cb(ec, resp.ctx.ec().message(), transaction_get_result::create_from(resp));
3111
- default:
3112
- return cb(ec, resp.ctx.ec().message(), std::nullopt);
3104
+ ctx->overall()->cluster_ref().execute(
3105
+ req, [ctx, cb = std::forward<Callback>(cb)](const auto& resp) {
3106
+ auto ec = error_class_from_response(resp);
3107
+ if (ec) {
3108
+ CB_ATTEMPT_CTX_LOG_TRACE(ctx, "get_doc got error {} : {}", resp.ctx.ec().message(), *ec);
3109
+ switch (*ec) {
3110
+ case FAIL_PATH_NOT_FOUND:
3111
+ return cb(ec, resp.ctx.ec().message(), transaction_get_result::create_from(resp));
3112
+ default:
3113
+ return cb(ec, resp.ctx.ec().message(), std::nullopt);
3114
+ }
3115
+ } else {
3116
+ return cb({}, {}, transaction_get_result::create_from(resp));
3113
3117
  }
3114
- } else {
3115
- return cb({}, {}, transaction_get_result::create_from(resp));
3116
- }
3117
- });
3118
+ });
3118
3119
  }
3119
3120
  } // namespace
3120
3121
 
@@ -3161,7 +3162,7 @@ attempt_context_impl::get_doc(const core::document_id& id,
3161
3162
  template<typename Handler, typename Delay>
3162
3163
  void
3163
3164
  attempt_context_impl::create_staged_insert_error_handler(const core::document_id& id,
3164
- codec::encoded_value content,
3165
+ const codec::encoded_value& content,
3165
3166
  std::uint64_t cas,
3166
3167
  Delay&& delay,
3167
3168
  const std::string& op_id,
@@ -92,37 +92,36 @@ private:
92
92
  // transaction_context needs access to the two functions below
93
93
  friend class transaction_context;
94
94
 
95
+ void insert(const core::document_id& id,
96
+ codec::encoded_value content,
97
+ core::transactions::async_attempt_context::Callback&& cb) override;
98
+
99
+ auto insert(const core::document_id& id,
100
+ codec::encoded_value content) -> core::transactions::transaction_get_result override;
101
+
102
+ void replace(const transaction_get_result& document,
103
+ codec::encoded_value content,
104
+ core::transactions::async_attempt_context::Callback&& cb) override;
105
+
106
+ auto replace(const transaction_get_result& document,
107
+ codec::encoded_value content) -> transaction_get_result override;
108
+
95
109
  auto insert_raw(const collection& coll, const std::string& id, codec::encoded_value content)
96
110
  -> std::pair<couchbase::error, couchbase::transactions::transaction_get_result> override;
97
- auto insert_raw(const core::document_id& id, codec::encoded_value content)
98
- -> core::transactions::transaction_get_result override;
99
111
 
100
112
  void insert_raw(const collection& coll,
101
113
  std::string id,
102
114
  codec::encoded_value content,
103
115
  couchbase::transactions::async_result_handler&& handler) override;
104
116
 
105
- void insert_raw(
106
- const core::document_id& id,
107
- codec::encoded_value content,
108
- std::function<void(std::exception_ptr, std::optional<transaction_get_result>)>&& cb) override;
109
-
110
117
  auto replace_raw(const couchbase::transactions::transaction_get_result& doc,
111
118
  codec::encoded_value content)
112
119
  -> std::pair<couchbase::error, couchbase::transactions::transaction_get_result> override;
113
120
 
114
- auto replace_raw(const transaction_get_result& document,
115
- codec::encoded_value content) -> transaction_get_result override;
116
-
117
121
  void replace_raw(couchbase::transactions::transaction_get_result doc,
118
122
  codec::encoded_value content,
119
123
  couchbase::transactions::async_result_handler&& handler) override;
120
124
 
121
- void replace_raw(
122
- const transaction_get_result& document,
123
- codec::encoded_value content,
124
- std::function<void(std::exception_ptr, std::optional<transaction_get_result>)>&& cb) override;
125
-
126
125
  void remove_staged_insert(const core::document_id& id, VoidCallback&& cb);
127
126
 
128
127
  void get_with_query(
@@ -200,7 +199,7 @@ private:
200
199
  std::exception_ptr&& err)
201
200
  {
202
201
  try {
203
- std::rethrow_exception(std::move(err));
202
+ std::rethrow_exception(err);
204
203
  } catch (const transaction_operation_failed& e) {
205
204
  // if this is a transaction_operation_failed, we need to cache it before
206
205
  // moving on...
@@ -463,8 +462,8 @@ private:
463
462
 
464
463
  template<typename Handler, typename Delay>
465
464
  void create_staged_insert_error_handler(const core::document_id& id,
466
- codec::encoded_value content,
467
- uint64_t cas,
465
+ const codec::encoded_value& content,
466
+ std::uint64_t cas,
468
467
  Delay&& delay,
469
468
  const std::string& op_id,
470
469
  Handler&& cb,
@@ -568,7 +568,7 @@ staged_mutation_queue::commit_doc(const std::shared_ptr<attempt_context_impl>& c
568
568
  res,
569
569
  item,
570
570
  [ambiguity_resolution_mode, cas_zero_mode, handler = std::move(handler)](
571
- auto e) mutable {
571
+ const auto& e) mutable {
572
572
  if (e) {
573
573
  return handler(e, ambiguity_resolution_mode, cas_zero_mode);
574
574
  }
@@ -610,7 +610,7 @@ staged_mutation_queue::commit_doc(const std::shared_ptr<attempt_context_impl>& c
610
610
  res,
611
611
  item,
612
612
  [ambiguity_resolution_mode, cas_zero_mode, handler = std::move(handler)](
613
- auto e) mutable {
613
+ const auto& e) mutable {
614
614
  if (e) {
615
615
  return handler(e, ambiguity_resolution_mode, cas_zero_mode);
616
616
  }
@@ -180,7 +180,7 @@ transaction_context::insert(const core::document_id& id,
180
180
  async_attempt_context::Callback&& cb)
181
181
  {
182
182
  if (current_attempt_context_) {
183
- return current_attempt_context_->insert_raw(id, std::move(content), std::move(cb));
183
+ return current_attempt_context_->insert(id, std::move(content), std::move(cb));
184
184
  }
185
185
  throw transaction_operation_failed(FAIL_OTHER, "no current attempt context");
186
186
  }
@@ -191,7 +191,7 @@ transaction_context::replace(const transaction_get_result& doc,
191
191
  async_attempt_context::Callback&& cb)
192
192
  {
193
193
  if (current_attempt_context_) {
194
- return current_attempt_context_->replace_raw(doc, std::move(content), std::move(cb));
194
+ return current_attempt_context_->replace(doc, std::move(content), std::move(cb));
195
195
  }
196
196
  throw transaction_operation_failed(FAIL_OTHER, "no current attempt context");
197
197
  }
@@ -199,26 +199,6 @@ public:
199
199
  return os;
200
200
  }
201
201
 
202
- /**
203
- * Content of the document.
204
- *
205
- * @return content of the document.
206
- */
207
- template<typename Document,
208
- typename Transcoder = codec::default_json_transcoder,
209
- std::enable_if_t<!codec::is_transcoder_v<Document>, bool> = true,
210
- std::enable_if_t<codec::is_transcoder_v<Transcoder>, bool> = true>
211
- [[nodiscard]] auto content() const -> Document
212
- {
213
- return Transcoder::template decode<Document>(content_);
214
- }
215
-
216
- template<typename Transcoder, std::enable_if_t<codec::is_transcoder_v<Transcoder>, bool> = true>
217
- [[nodiscard]] auto content() const -> typename Transcoder::document_type
218
- {
219
- return Transcoder::decode(content_);
220
- }
221
-
222
202
  /**
223
203
  * Content of the document as raw byte vector
224
204
  *
@@ -99,7 +99,7 @@ transactions::create(core::cluster cluster,
99
99
  {
100
100
  auto barrier =
101
101
  std::make_shared<std::promise<std::pair<std::error_code, std::shared_ptr<transactions>>>>();
102
- create(std::move(cluster), config, [barrier](auto ec, auto txns) mutable {
102
+ create(std::move(cluster), config, [barrier](auto ec, const auto& txns) mutable {
103
103
  barrier->set_value({ ec, txns });
104
104
  });
105
105
  return barrier->get_future();
@@ -171,7 +171,7 @@ wrap_public_api_run(transactions& txns,
171
171
  std::size_t max_attempts,
172
172
  Handler&& fn) -> ::couchbase::transactions::transaction_result
173
173
  {
174
- return wrap_run(txns, config, max_attempts, [fn = std::forward<Handler>(fn)](auto ctx) {
174
+ return wrap_run(txns, config, max_attempts, [fn = std::forward<Handler>(fn)](const auto& ctx) {
175
175
  const couchbase::error err = fn(ctx);
176
176
  if (err && err.ec() != errc::transaction_op::transaction_op_failed) {
177
177
  if (err.ec().category() == core::impl::transaction_op_category()) {
@@ -34,7 +34,7 @@ using namespace tao::pegtl;
34
34
 
35
35
  struct bucket_name : seq<uri::segment_nz> {
36
36
  };
37
- using param_key = star<sor<abnf::ALPHA, abnf::DIGIT, one<'_'>>>;
37
+ using param_key = star<sor<abnf::ALPHA, abnf::DIGIT, one<'_', '.'>>>;
38
38
  using param_value = star<sor<minus<uri::pchar, one<'=', '&', '?'>>, one<'/'>>>;
39
39
  struct param : seq<param_key, one<'='>, param_value> {
40
40
  };
@@ -237,38 +237,69 @@ parse_option(bool& receiver,
237
237
  }
238
238
 
239
239
  void
240
- parse_option(tls_verify_mode& receiver,
240
+ parse_option(io::ip_protocol& receiver,
241
241
  const std::string& name,
242
242
  const std::string& value,
243
243
  std::vector<std::string>& warnings)
244
244
  {
245
- if (value == "none") {
246
- receiver = tls_verify_mode::none;
247
- } else if (value == "peer") {
248
- receiver = tls_verify_mode::peer;
245
+ if (value == "any") {
246
+ receiver = io::ip_protocol::any;
247
+ } else if (value == "force_ipv4") {
248
+ receiver = io::ip_protocol::force_ipv4;
249
+ } else if (value == "force_ipv6") {
250
+ receiver = io::ip_protocol::force_ipv6;
249
251
  } else {
250
252
  warnings.push_back(fmt::format(
251
- R"(unable to parse "{}" parameter in connection string (value "{}" is not a valid TLS verification mode))",
253
+ R"(unable to parse "{}" parameter in connection string (value "{}" is not a valid IP protocol preference))",
252
254
  name,
253
255
  value));
254
256
  }
255
257
  }
256
258
 
259
+ #ifdef COUCHBASE_CXX_CLIENT_COLUMNAR
257
260
  void
258
- parse_option(io::ip_protocol& receiver,
261
+ parse_option(std::chrono::milliseconds& receiver,
259
262
  const std::string& name,
260
263
  const std::string& value,
261
264
  std::vector<std::string>& warnings)
262
265
  {
263
- if (value == "any") {
264
- receiver = io::ip_protocol::any;
265
- } else if (value == "force_ipv4") {
266
- receiver = io::ip_protocol::force_ipv4;
267
- } else if (value == "force_ipv6") {
268
- receiver = io::ip_protocol::force_ipv6;
266
+ try {
267
+ receiver = std::chrono::duration_cast<std::chrono::milliseconds>(
268
+ parse_duration(string_codec::url_decode(value)));
269
+ } catch (const duration_parse_error& dpe) {
270
+ warnings.push_back(
271
+ fmt::format(R"(unable to parse "{}" parameter in connection string (value: "{}"): {})",
272
+ name,
273
+ value,
274
+ dpe.what()));
275
+ } catch (const std::invalid_argument& ex1) {
276
+ warnings.push_back(fmt::format(
277
+ R"(unable to parse "{}" parameter in connection string (value "{}" is not a number): {})",
278
+ name,
279
+ value,
280
+ ex1.what()));
281
+ } catch (const std::out_of_range& ex2) {
282
+ warnings.push_back(fmt::format(
283
+ R"(unable to parse "{}" parameter in connection string (value "{}" is out of range): {})",
284
+ name,
285
+ value,
286
+ ex2.what()));
287
+ }
288
+ }
289
+ #else
290
+ void
291
+ parse_option(tls_verify_mode& receiver,
292
+ const std::string& name,
293
+ const std::string& value,
294
+ std::vector<std::string>& warnings)
295
+ {
296
+ if (value == "none") {
297
+ receiver = tls_verify_mode::none;
298
+ } else if (value == "peer") {
299
+ receiver = tls_verify_mode::peer;
269
300
  } else {
270
301
  warnings.push_back(fmt::format(
271
- R"(unable to parse "{}" parameter in connection string (value "{}" is not a valid IP protocol preference))",
302
+ R"(unable to parse "{}" parameter in connection string (value "{}" is not a valid TLS verification mode))",
272
303
  name,
273
304
  value));
274
305
  }
@@ -323,6 +354,7 @@ parse_option(std::chrono::milliseconds& receiver,
323
354
  }
324
355
  }
325
356
  }
357
+ #endif
326
358
 
327
359
  void
328
360
  extract_options(connection_string& connstr)
@@ -333,6 +365,54 @@ extract_options(connection_string& connstr)
333
365
  connstr.options.enable_dns_srv = false;
334
366
  }
335
367
  for (const auto& [name, value] : connstr.params) {
368
+ #ifdef COUCHBASE_CXX_CLIENT_COLUMNAR
369
+ if (name == "security.trust_only_pem_file") {
370
+ /**
371
+ * Set the trust cert path
372
+ */
373
+ parse_option(connstr.options.trust_certificate, name, value, connstr.warnings);
374
+ } else if (name == "security.disable_server_certificate_verification") {
375
+ /**
376
+ * Disable TLS server cert verification if set to true.
377
+ */
378
+ if (value == "true" || value == "yes" || value == "on" || value == "1") {
379
+ connstr.options.tls_verify = tls_verify_mode::none;
380
+ } else if (value == "false" || value == "no" || value == "off" || value == "0") {
381
+ connstr.options.tls_verify = tls_verify_mode::peer;
382
+ } else {
383
+ connstr.warnings.push_back(fmt::format(
384
+ R"(unable to parse "{}" parameter in connection string (value "{}" cannot be interpreted as a boolean))",
385
+ name,
386
+ value));
387
+ }
388
+
389
+ } else if (name == "timeout.connect_timeout") {
390
+ /**
391
+ * The period of time allocated to complete bootstrap
392
+ */
393
+ parse_option(connstr.options.bootstrap_timeout, name, value, connstr.warnings);
394
+ } else if (name == "timeout.dispatch_timeout") {
395
+ /**
396
+ * Number of seconds to wait before timing out a Query or N1QL request by the client.
397
+ */
398
+ parse_option(connstr.options.dispatch_timeout, name, value, connstr.warnings);
399
+ } else if (name == "timeout.query_timeout") {
400
+ /**
401
+ * Number of seconds to wait before timing out a Query or N1QL request by the client.
402
+ */
403
+ parse_option(connstr.options.query_timeout, name, value, connstr.warnings);
404
+ } else if (name == "timeout.resolve_timeout") {
405
+ /**
406
+ * The period of time to resolve DNS name of the node to IP address
407
+ */
408
+ parse_option(connstr.options.resolve_timeout, name, value, connstr.warnings);
409
+ } else if (name == "timeout.socket_connect_timeout") {
410
+ /**
411
+ * Number of seconds the client should wait while attempting to connect to a node’s KV service
412
+ * via a socket. Initial connection, reconnecting, node added, etc.
413
+ */
414
+ parse_option(connstr.options.connect_timeout, name, value, connstr.warnings);
415
+ #else
336
416
  if (name == "kv_connect_timeout") {
337
417
  /**
338
418
  * Number of seconds the client should wait while attempting to connect to a node’s KV service
@@ -404,6 +484,7 @@ extract_options(connection_string& connstr)
404
484
  if (force_ipv4) {
405
485
  connstr.options.use_ip_protocol = io::ip_protocol::force_ipv4;
406
486
  }
487
+ #endif
407
488
  } else if (name == "ip_protocol") {
408
489
  /**
409
490
  * Controls preference of IP protocol for name resolution
@@ -413,6 +494,37 @@ extract_options(connection_string& connstr)
413
494
  parse_option(connstr.options.config_poll_interval, name, value, connstr.warnings);
414
495
  } else if (name == "config_poll_floor") {
415
496
  parse_option(connstr.options.config_poll_floor, name, value, connstr.warnings);
497
+ } else if (name == "enable_dns_srv") {
498
+ if (connstr.bootstrap_nodes.size() == 1) {
499
+ parse_option(connstr.options.enable_dns_srv, name, value, connstr.warnings);
500
+ } else {
501
+ connstr.warnings.push_back(fmt::format(
502
+ R"(parameter "{}" requires single entry in bootstrap nodes list of the connection string, ignoring (value "{}"))",
503
+ name,
504
+ value));
505
+ }
506
+ } else if (name == "network") {
507
+ connstr.options.network =
508
+ value; /* current known values are "auto", "default" and "external" */
509
+ } else if (name == "user_agent_extra") {
510
+ /**
511
+ * string, that will be appended to identification fields of the server protocols (key in HELO
512
+ * packet for MCBP, "user-agent" header for HTTP)
513
+ */
514
+ parse_option(connstr.options.user_agent_extra, name, value, connstr.warnings);
515
+ } else if (name == "dump_configuration") {
516
+ /**
517
+ * Whether to dump every new configuration on TRACE level
518
+ */
519
+ parse_option(connstr.options.dump_configuration, name, value, connstr.warnings);
520
+ } else if (name == "enable_clustermap_notification") {
521
+ /**
522
+ * Allow the server to push configuration updates asynchronously.
523
+ */
524
+ parse_option(connstr.options.enable_clustermap_notification, name, value, connstr.warnings);
525
+ } else if (name == "disable_mozilla_ca_certificates") {
526
+ parse_option(connstr.options.disable_mozilla_ca_certificates, name, value, connstr.warnings);
527
+ #ifndef COUCHBASE_CXX_CLIENT_COLUMNAR
416
528
  } else if (name == "max_http_connections") {
417
529
  /**
418
530
  * The maximum number of HTTP connections allowed on a per-host and per-port basis. 0
@@ -429,40 +541,16 @@ extract_options(connection_string& connstr)
429
541
  * The period of time allocated to complete bootstrap
430
542
  */
431
543
  parse_option(connstr.options.bootstrap_timeout, name, value, connstr.warnings);
432
- #ifdef COUCHBASE_CXX_CLIENT_COLUMNAR
433
- } else if (name == "dispatch_timeout") {
434
- /**
435
- * The period of time allocated to complete HTTP session bootstrap
436
- */
437
- parse_option(connstr.options.dispatch_timeout, name, value, connstr.warnings);
438
- #endif
439
544
  } else if (name == "resolve_timeout") {
440
545
  /**
441
546
  * The period of time to resolve DNS name of the node to IP address
442
547
  */
443
548
  parse_option(connstr.options.resolve_timeout, name, value, connstr.warnings);
444
- } else if (name == "enable_dns_srv") {
445
- if (connstr.bootstrap_nodes.size() == 1) {
446
- parse_option(connstr.options.enable_dns_srv, name, value, connstr.warnings);
447
- } else {
448
- connstr.warnings.push_back(fmt::format(
449
- R"(parameter "{}" requires single entry in bootstrap nodes list of the connection string, ignoring (value "{}"))",
450
- name,
451
- value));
452
- }
453
- } else if (name == "network") {
454
- connstr.options.network =
455
- value; /* current known values are "auto", "default" and "external" */
456
549
  } else if (name == "show_queries") {
457
550
  /**
458
551
  * Whether to display N1QL, Analytics, Search queries on info level (default false)
459
552
  */
460
553
  parse_option(connstr.options.show_queries, name, value, connstr.warnings);
461
- } else if (name == "enable_clustermap_notification") {
462
- /**
463
- * Allow the server to push configuration updates asynchronously.
464
- */
465
- parse_option(connstr.options.enable_clustermap_notification, name, value, connstr.warnings);
466
554
  } else if (name == "enable_unordered_execution") {
467
555
  /**
468
556
  * Allow the server to reorder commands
@@ -487,25 +575,13 @@ extract_options(connection_string& connstr)
487
575
  parse_option(connstr.options.enable_metrics, name, value, connstr.warnings);
488
576
  } else if (name == "tls_verify") {
489
577
  parse_option(connstr.options.tls_verify, name, value, connstr.warnings);
490
- } else if (name == "disable_mozilla_ca_certificates") {
491
- parse_option(connstr.options.disable_mozilla_ca_certificates, name, value, connstr.warnings);
492
578
  } else if (name == "tls_disable_deprecated_protocols") {
493
579
  parse_option(connstr.options.tls_disable_deprecated_protocols, name, value, connstr.warnings);
494
580
  } else if (name == "tls_disable_v1_2") {
495
581
  parse_option(connstr.options.tls_disable_v1_2, name, value, connstr.warnings);
496
- } else if (name == "user_agent_extra") {
497
- /**
498
- * string, that will be appended to identification fields of the server protocols (key in HELO
499
- * packet for MCBP, "user-agent" header for HTTP)
500
- */
501
- parse_option(connstr.options.user_agent_extra, name, value, connstr.warnings);
502
- } else if (name == "dump_configuration") {
503
- /**
504
- * Whether to dump every new configuration on TRACE level
505
- */
506
- parse_option(connstr.options.dump_configuration, name, value, connstr.warnings);
507
582
  } else if (name == "server_group") {
508
583
  parse_option(connstr.options.server_group, name, value, connstr.warnings);
584
+ #endif
509
585
  } else {
510
586
  connstr.warnings.push_back(
511
587
  fmt::format(R"(unknown parameter "{}" in connection string (value "{}"))", name, value));
@@ -241,7 +241,7 @@ struct analytics_options : public common_options<analytics_options> {
241
241
  std::enable_if_t<codec::is_serializer_v<Serializer>, bool> = true>
242
242
  auto raw(std::string name, const Value& value) -> analytics_options&
243
243
  {
244
- raw_[std::move(name)] = std::move(Serializer::template serialize(value));
244
+ raw_[std::move(name)] = std::move(Serializer::template serialize<const Value&>(value));
245
245
  return self();
246
246
  }
247
247
 
@@ -359,7 +359,8 @@ private:
359
359
  std::enable_if_t<codec::is_serializer_v<Serializer>, bool> = true>
360
360
  void encode_positional_parameters(const Parameter& parameter, Rest... args)
361
361
  {
362
- positional_parameters_.emplace_back(std::move(Serializer::template serialize(parameter)));
362
+ positional_parameters_.emplace_back(
363
+ std::move(Serializer::template serialize<Parameter>(parameter)));
363
364
  if constexpr (sizeof...(args) > 0) {
364
365
  encode_positional_parameters<Serializer>(args...);
365
366
  }
@@ -373,7 +374,7 @@ private:
373
374
  void encode_named_parameters(const std::pair<Name, Parameter>& parameter, Rest... args)
374
375
  {
375
376
  named_parameters_[parameter.first] =
376
- std::move(Serializer::template serialize(parameter.second));
377
+ std::move(Serializer::template serialize<Parameter>(parameter.second));
377
378
  if constexpr (sizeof...(args) > 0) {
378
379
  encode_named_parameters<Serializer>(args...);
379
380
  }
@@ -47,7 +47,7 @@ public:
47
47
  static auto serialize([[maybe_unused]] Document document) -> binary
48
48
  {
49
49
  try {
50
- if constexpr (std::is_null_pointer_v<Document>) {
50
+ if constexpr (std::is_null_pointer_v<std::remove_reference_t<Document>>) {
51
51
  return core::utils::json::generate_binary(tao::json::null);
52
52
  } else {
53
53
  return core::utils::json::generate_binary(tao::json::value(document));