| Home | Libraries | People | FAQ | More

###### any_connection::async_read_some_rows (1 of 4 overloads)

Reads a batch of rows.

###### Synopsis

    template<
        class CompletionToken = with_diagnostics_t<asio::deferred_t>>
    auto
    async_read_some_rows(
        execution_state& st,
        CompletionToken&& token = {});

###### Description

The number of rows that will be read is unspecified. If the operation represented by `st` has still rows to read, at least one will be read. If there are no more rows, or `st.should_read_rows() == false`, returns an empty `rows_view`.

The number of rows that will be read depends on the connection's buffer size. The bigger the buffer, the greater the batch size (up to a maximum). You can set the initial buffer size in the constructor. The buffer may be grown bigger by other read operations, if required.

The returned view points into memory owned by `*this`. It will be valid until `*this` performs the next network operation or is destroyed.

###### Handler signature

The handler signature for this operation is `void(boost::mysql::error_code, boost::mysql::rows_view)`.

###### Executor

Intermediate completion handlers, as well as the final handler, are executed using `token`'s associated executor, or `this->get_executor()` if the token doesn't have an associated executor.

If the final handler has an associated immediate executor, and the operation completes immediately, the final handler is dispatched to it. Otherwise, the final handler is called as if it was submitted using `asio::post`, and is never be called inline from within this function.