// // Copyright (c) 2019-2024 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_IMPL_STATEMENT_HPP #define BOOST_MYSQL_IMPL_STATEMENT_HPP #pragma once #include #include #include template class boost::mysql::bound_statement_tuple { friend class statement; friend struct detail::access; struct impl { statement stmt; WritableFieldTuple params; } impl_; template bound_statement_tuple(const statement& stmt, TupleType&& t) : impl_{stmt, std::forward(t)} { } }; template class boost::mysql::bound_statement_iterator_range { friend class statement; friend struct detail::access; struct impl { statement stmt; FieldViewFwdIterator first; FieldViewFwdIterator last; } impl_; bound_statement_iterator_range( const statement& stmt, FieldViewFwdIterator first, FieldViewFwdIterator last ) : impl_{stmt, first, last} { } }; template boost::mysql::bound_statement_tuple::type> boost::mysql::statement:: bind(WritableFieldTuple&& args) const { BOOST_ASSERT(valid()); return bound_statement_tuple::type>( *this, std::forward(args) ); } template boost::mysql::bound_statement_iterator_range boost::mysql::statement::bind( FieldViewFwdIterator first, FieldViewFwdIterator last ) const { BOOST_ASSERT(valid()); return bound_statement_iterator_range(*this, first, last); } #endif