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

Fixed: BaseBuilder increment/decrement do not reset state after a query #6146

Merged
merged 2 commits into from
Jun 19, 2022

Conversation

iRedds
Copy link
Collaborator

@iRedds iRedds commented Jun 17, 2022

Description
Fixes #6145

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer labels Jun 17, 2022
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

I'm not familiar with resetWrite() but the tests look good and the PR is quality. Hopefully someone from the database-savvy crew takes a look.

@iRedds
Copy link
Collaborator Author

iRedds commented Jun 18, 2022

@MGatner After each query, the state of the object is reset so that the next query does not include data from the previous one. There was no such state reset for increment/decrement methods.
The resetWrite() and resetSelect() methods are responsible for resetting the state for queries that change data and selects, respectively.

@MGatner
Copy link
Member

MGatner commented Jun 18, 2022

Thanks for the explanation!

@kenjis kenjis merged commit 44cbd89 into codeigniter4:develop Jun 19, 2022
@iRedds iRedds deleted the fix/qb-increment-decrement branch June 19, 2022 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: BaseBuilder increment/decrement do not reset state after a query.
3 participants