algo_params.hpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. //
  2. // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_MYSQL_DETAIL_ALGO_PARAMS_HPP
  8. #define BOOST_MYSQL_DETAIL_ALGO_PARAMS_HPP
  9. #include <boost/mysql/character_set.hpp>
  10. #include <boost/mysql/handshake_params.hpp>
  11. #include <boost/mysql/string_view.hpp>
  12. #include <boost/mysql/detail/any_execution_request.hpp>
  13. #include <boost/mysql/detail/execution_processor/execution_processor.hpp>
  14. #include <boost/core/span.hpp>
  15. #include <cstddef>
  16. #include <cstdint>
  17. #include <vector>
  18. namespace boost {
  19. namespace mysql {
  20. class rows_view;
  21. class diagnostics;
  22. class statement;
  23. class stage_response;
  24. namespace detail {
  25. class execution_processor;
  26. class execution_state_impl;
  27. struct pipeline_request_stage;
  28. struct connect_algo_params
  29. {
  30. diagnostics* diag;
  31. handshake_params hparams;
  32. bool secure_channel; // Are we using UNIX sockets or any other secure channel?
  33. using result_type = void;
  34. };
  35. struct handshake_algo_params
  36. {
  37. diagnostics* diag;
  38. handshake_params hparams;
  39. bool secure_channel; // Are we using UNIX sockets or any other secure channel?
  40. using result_type = void;
  41. };
  42. struct execute_algo_params
  43. {
  44. diagnostics* diag;
  45. any_execution_request req;
  46. execution_processor* proc;
  47. using result_type = void;
  48. };
  49. struct start_execution_algo_params
  50. {
  51. diagnostics* diag;
  52. any_execution_request req;
  53. execution_processor* proc;
  54. using result_type = void;
  55. };
  56. struct read_resultset_head_algo_params
  57. {
  58. diagnostics* diag;
  59. execution_processor* proc;
  60. using result_type = void;
  61. };
  62. struct read_some_rows_algo_params
  63. {
  64. diagnostics* diag;
  65. execution_processor* proc;
  66. output_ref output;
  67. using result_type = std::size_t;
  68. };
  69. struct read_some_rows_dynamic_algo_params
  70. {
  71. diagnostics* diag;
  72. execution_state_impl* exec_st;
  73. using result_type = rows_view;
  74. };
  75. struct prepare_statement_algo_params
  76. {
  77. diagnostics* diag;
  78. string_view stmt_sql;
  79. using result_type = statement;
  80. };
  81. struct close_statement_algo_params
  82. {
  83. diagnostics* diag;
  84. std::uint32_t stmt_id;
  85. using result_type = void;
  86. };
  87. struct ping_algo_params
  88. {
  89. diagnostics* diag;
  90. using result_type = void;
  91. };
  92. struct reset_connection_algo_params
  93. {
  94. diagnostics* diag;
  95. using result_type = void;
  96. };
  97. struct set_character_set_algo_params
  98. {
  99. diagnostics* diag;
  100. character_set charset;
  101. using result_type = void;
  102. };
  103. struct quit_connection_algo_params
  104. {
  105. diagnostics* diag;
  106. using result_type = void;
  107. };
  108. struct close_connection_algo_params
  109. {
  110. diagnostics* diag;
  111. using result_type = void;
  112. };
  113. struct run_pipeline_algo_params
  114. {
  115. diagnostics* diag;
  116. span<const std::uint8_t> request_buffer;
  117. span<const pipeline_request_stage> request_stages;
  118. std::vector<stage_response>* response;
  119. using result_type = void;
  120. };
  121. } // namespace detail
  122. } // namespace mysql
  123. } // namespace boost
  124. #endif