![]() |
Home | Libraries | People | FAQ | More |
Adds a stage that executes a prepared statement.
template< class... WritableField>pipeline_request& add_execute(statementstmt, const WritableField&... 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(stmt, 42, "John") has effects equivalent to conn.execute(stmt.bind(42, "John")).
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).
Any objects pointed to by params
are copied into the request and need not be kept alive after this function
returns.
Any type satisfying WritableField
can be used as a parameter. This includes all types that can be used
with statement::bind, including scalar types,
strings, blobs and optionals.