2
0
mirror of https://github.com/boostorg/mysql.git synced 2026-02-14 12:52:17 +00:00
Files
mysql/test/integration/utils/include/er_statement.hpp
Ruben Perez 50cd20bb7d Field view
2022-08-08 17:04:50 +02:00

46 lines
1.2 KiB
C++

//
// Copyright (c) 2019-2022 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_MYSQL_TEST_INTEGRATION_UTILS_INCLUDE_ER_STATEMENT_HPP
#define BOOST_MYSQL_TEST_INTEGRATION_UTILS_INCLUDE_ER_STATEMENT_HPP
#include <memory>
#include "network_result.hpp"
#include "er_resultset.hpp"
#include <forward_list>
#include <vector>
#include <boost/mysql/field_view.hpp>
#include <boost/mysql/execute_params.hpp>
namespace boost {
namespace mysql {
namespace test {
using value_list_it = std::forward_list<field_view>::const_iterator;
class er_statement
{
public:
virtual ~er_statement() {}
virtual bool valid() const = 0;
virtual unsigned id() const = 0;
virtual unsigned num_params() const = 0;
virtual network_result<er_resultset_ptr> execute_container(const std::vector<field_view>&) = 0;
virtual network_result<er_resultset_ptr> execute_params(const execute_params<value_list_it>& params) = 0;
virtual network_result<no_result> close() = 0;
};
using er_statement_ptr = std::unique_ptr<er_statement>;
} // test
} // mysql
} // boost
#endif