123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- #ifndef BOOST_MYSQL_EXECUTION_STATE_HPP
- #define BOOST_MYSQL_EXECUTION_STATE_HPP
- #include <boost/mysql/metadata_collection_view.hpp>
- #include <boost/mysql/string_view.hpp>
- #include <boost/mysql/detail/access.hpp>
- #include <boost/mysql/detail/execution_processor/execution_state_impl.hpp>
- #include <cstddef>
- #include <cstdint>
- namespace boost {
- namespace mysql {
- class execution_state
- {
- public:
-
- execution_state() = default;
-
- execution_state(const execution_state& other) = default;
-
- execution_state(execution_state&& other) = default;
-
- execution_state& operator=(const execution_state& other) = default;
-
- execution_state& operator=(execution_state&& other) = default;
-
- bool should_start_op() const noexcept { return impl_.is_reading_first(); }
-
- bool should_read_head() const noexcept { return impl_.is_reading_first_subseq(); }
-
- bool should_read_rows() const noexcept { return impl_.is_reading_rows(); }
-
- bool complete() const noexcept { return impl_.is_complete(); }
-
- metadata_collection_view meta() const noexcept { return impl_.meta(); }
-
- std::uint64_t affected_rows() const noexcept { return impl_.get_affected_rows(); }
-
- std::uint64_t last_insert_id() const noexcept { return impl_.get_last_insert_id(); }
-
- unsigned warning_count() const noexcept { return impl_.get_warning_count(); }
-
- string_view info() const noexcept { return impl_.get_info(); }
-
- bool is_out_params() const noexcept { return impl_.get_is_out_params(); }
- private:
- detail::execution_state_impl impl_;
- #ifndef BOOST_MYSQL_DOXYGEN
- friend struct detail::access;
- #endif
- };
- }
- }
- #endif
|