| Home | Libraries | People | FAQ | More

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

Binds parameters to a statement (iterator range overload).

###### Synopsis

    template<
        class FieldViewFwdIterator,
        typename EnableIf = typename std::enable_if< detail::is_field_view_forward_iterator<FieldViewFwdIterator>::value>::type>
    bound_statement_iterator_range< FieldViewFwdIterator >
    bind(
        FieldViewFwdIterator params_first,
        FieldViewFwdIterator params_last) const;

###### Description

Creates an object that packages `*this` and the statement actual parameters, represented as the iterator range `[params_first, params_last)`. This object can be passed to `connection::execute`, `connection::start_execution` or their async counterparts.

This function doesn't involve communication with the server.

###### Preconditions

`this->valid() == true`

###### Exception safety

Strong guarantee. Only throws if copy-constructing iterators throws.