...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
(Deprecated - will be removed in Boost 1.86) Executes a prepared statement.
template<
class WritableFieldTuple
,
class CompletionToken,
class EnableIf = typename std::enable_if<detail::is_writable_field_tuple<WritableFieldTuple>::value>::type>
auto
async_execute_statement(
const statement& stmt,
WritableFieldTuple&& params,
results& result,
CompletionToken&& token);
Executes a statement with the given parameters and reads the response
into result
.
After this operation completes successfully, result.has_value() == true
.
The statement actual parameters (params
)
are passed as a std::tuple
of elements. See the WritableFieldTuple
concept defition
for more info. You should pass exactly as many parameters as this->num_params()
,
or the operation will fail with an error. String parameters should be
encoded using the connection's character set.
Metadata in result
will
be populated according to conn.meta_mode()
, where conn
is the connection that prepared this statement.
This function is deprecated and will be removed in Boost 1.86. Please
use execute
or async_execute
instead.
stmt.valid() == true
If CompletionToken
is
deferred (like use_awaitable
),
and params
contains any
reference type (like string_view
),
the caller must keep the values pointed by these references alive until
the operation is initiated. Value types will be copied/moved as required,
so don't need to be kept alive. It's not required to keep stmt
alive, either.
The handler signature for this operation is void(boost::mysql::error_code)
.