mysql icon indicating copy to clipboard operation
mysql copied to clipboard

resultset::async_read_some, resultset::async_read_all signature

Open anarthal opened this issue 3 years ago • 1 comments

The current interface for resultset::async_read_some and resultset::async_read_all doesn't allow to reuse memory or custom allocators. This has been flagged during the review as a possible performance issue. Proposed solutions:

a) Change the function signature to async_read_all(vector<row, Allocator>&, CompletionToken&&), with the completion handler signature being void(error_code). b) Remove the functionality altogether. c) Change the function signature to async_read_all(RowOutputIterator, CompletionToken&&), with the completion handler signature being void(error_code).

If c) is chosen, then provide an example or a wrapper function allowing to read all the rows in a resultset into a std::vector.

anarthal avatar May 11 '22 09:05 anarthal

Oh I like the sound of RowOutputIterator

vinniefalco avatar May 15 '22 14:05 vinniefalco