Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resultset::async_read_some, resultset::async_read_all signature #58

Closed
anarthal opened this issue May 11, 2022 · 1 comment
Closed

resultset::async_read_some, resultset::async_read_all signature #58

anarthal opened this issue May 11, 2022 · 1 comment

Comments

@anarthal
Copy link
Collaborator

anarthal commented May 11, 2022

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.

@vinniefalco
Copy link
Member

Oh I like the sound of RowOutputIterator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants