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

Batch::execute consumes the batch while Connection::execute_batch while does not #163

Open
rukai opened this issue Mar 17, 2023 · 2 comments · May be fixed by #168
Open

Batch::execute consumes the batch while Connection::execute_batch while does not #163

rukai opened this issue Mar 17, 2023 · 2 comments · May be fixed by #168

Comments

@rukai
Copy link
Contributor

rukai commented Mar 17, 2023

Is this a bug in one or the other?
Also worth noting that there is the similar method execute_batch_with_payloads and they both use the old style CassFuture instead of an async method like Batch::execute does.

@kw217
Copy link
Collaborator

kw217 commented Mar 17, 2023

Ah, you're right - looks like we missed a few. The batch or statement should always be consumed, and we should be using the new-style futures everywhere.

I think we should just remove Session::execute_batch, Session::execute_batch_with_payloads, and Session::execute_with_payloads.

We should add Batch::execute_with_payloads and Statement::execute_with_payloads.

Then we'll need another major version bump, oops.

Would you be able to take a look at that?

@kw217
Copy link
Collaborator

kw217 commented Apr 13, 2023

@rukai any chance you could look at this? Thanks for spotting the issue!

@rukai rukai linked a pull request Apr 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants