Skip to content

Auto reset after statement execution #120

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

Merged
merged 4 commits into from
May 14, 2017

Conversation

zauguin
Copy link
Collaborator

@zauguin zauguin commented May 14, 2017

Deprecate reset() and reset the statement after every execution to avoid bugs.
The patch changes the behaviour of operator++ to no longer set used(false).
This fixes the loop example in the README.

@zauguin zauguin requested a review from Killili May 14, 2017 17:38
@Killili
Copy link
Collaborator

Killili commented May 14, 2017

Hi,
im not sure why i split that in two. The only thing i can image is that i wanted to prevent resetting in case its not needed, for performance sake. I remember talking to @aminroosta about that split, too.

But anyway if i understand the change correct, then now it will reset the statement even if its not used as prepared statment? So there is always create->execute->clear->reset->finalize even if clear and reset are not need like in 99% of all use cases i guess?

@aminroosta
Copy link
Collaborator

@zauguin I think just remove the reset function, I'm thinking the next version should be v4.
I'm also thinking about removing the boost stuff.

README.md Outdated
// after a successfull execution the statment needs to be reset to be execute again. This will reset the bound values too!
ps.reset();

// after a successfull execution the statment an be executed again, but the bound values are resetted.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zauguin little type ... the statement Can be executed ...

@Killili
Copy link
Collaborator

Killili commented May 14, 2017

Nice, now i like it. Thx for fixing my inconsistencys ;)

@zauguin
Copy link
Collaborator Author

zauguin commented May 14, 2017

@aminroosta I removed reset now. Is there any place for documenting breaking changes in the master branch or do we just have to remember it for the next release?

@aminroosta
Copy link
Collaborator

@zauguin Yes, we just need to document it in the next release :-)

@aminroosta aminroosta merged commit 219614b into SqliteModernCpp:master May 14, 2017
@zauguin zauguin deleted the autoreset branch May 16, 2017 06:07
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 this pull request may close these issues.

3 participants