...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Adds a stage that executes a prepared statement.
pipeline_request& add_execute_range( statement stmt, span< const field_view > params);
Creates a stage that runs stmt
bound to any parameters passed in params
,
like any_connection::execute
and statement::bind
. For example, add_execute_range(stmt, params)
has effects equivalent to conn.execute(stmt.bind(params.begin(), params.end()))
.
This function can be used instead of add_execute
when the number of
actual parameters of a statement is not known at compile time.
Strong guarantee. Throws if the supplied number of parameters doesn't match the number of parameters expected by the statement. Additionally, memory allocations may throw.
Type |
Thrown On |
---|---|
|
If |
The passed statement should be valid (stmt.valid() == true
).
The params
range is copied
into the request and needs not be kept alive after this function returns.