Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 08:33:51

0001 //
0002 // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #ifndef BOOST_MYSQL_IMPL_INTERNAL_SANSIO_CLOSE_STATEMENT_HPP
0009 #define BOOST_MYSQL_IMPL_INTERNAL_SANSIO_CLOSE_STATEMENT_HPP
0010 
0011 #include <boost/mysql/detail/algo_params.hpp>
0012 
0013 #include <boost/mysql/impl/internal/protocol/serialization.hpp>
0014 #include <boost/mysql/impl/internal/sansio/connection_state_data.hpp>
0015 
0016 namespace boost {
0017 namespace mysql {
0018 namespace detail {
0019 
0020 inline run_pipeline_algo_params setup_close_statement_pipeline(
0021     connection_state_data& st,
0022     close_statement_algo_params params
0023 )
0024 {
0025     st.write_buffer.clear();
0026     auto seqnum1 = serialize_top_level(close_stmt_command{params.stmt_id}, st.write_buffer);
0027     auto seqnum2 = serialize_top_level(ping_command{}, st.write_buffer);
0028     st.shared_pipeline_stages = {
0029         {{pipeline_stage_kind::close_statement, seqnum1, {}}, {pipeline_stage_kind::ping, seqnum2, {}}}
0030     };
0031     return {params.diag, st.write_buffer, st.shared_pipeline_stages, nullptr};
0032 }
0033 
0034 }  // namespace detail
0035 }  // namespace mysql
0036 }  // namespace boost
0037 
0038 #endif