| Home | Libraries | People | FAQ | More

###### statement::bind (2 of 3 overloads)

Binds parameters to a statement.

###### Synopsis

    template<
        class WritableFieldTuple,
        typename EnableIf = typename std::enable_if<detail::is_writable_field_tuple<WritableFieldTuple>::value>::type>
    bound_statement_tuple< typename std::decay< WritableFieldTuple >::type >
    bind(
        WritableFieldTuple&& params) const;

###### Description

Creates an object that packages `*this` and the statement actual parameters `params`. This object can be passed to `connection::execute`, `connection::start_execution` or their async counterparts.

The `params` tuple is decay-copied into the returned object.

This function doesn't involve communication with the server.

###### Preconditions

`this->valid() == true`

###### Exception safety

Strong guarantee. Only throws if the decay-copy of the tuple throws.