connection_pool_fwd.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_CONNECTION_POOL_FWD_HPP
  8. #define BOOST_MYSQL_DETAIL_CONNECTION_POOL_FWD_HPP
  9. #include <boost/mysql/detail/config.hpp>
  10. #include <memory>
  11. namespace boost {
  12. namespace mysql {
  13. class pooled_connection;
  14. class any_connection;
  15. namespace detail {
  16. struct io_traits;
  17. template <class IoTraits>
  18. class basic_connection_node;
  19. template <class IoTraits, class ConnectionWrapper>
  20. class basic_pool_impl;
  21. using connection_node = basic_connection_node<io_traits>;
  22. using pool_impl = basic_pool_impl<io_traits, pooled_connection>;
  23. BOOST_MYSQL_DECL void return_connection(
  24. std::shared_ptr<pool_impl> pool,
  25. connection_node& node,
  26. bool should_reset
  27. ) noexcept;
  28. BOOST_MYSQL_DECL any_connection& get_connection(connection_node& node) noexcept;
  29. } // namespace detail
  30. } // namespace mysql
  31. } // namespace boost
  32. #endif