-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Refactor BaseBuilder *Batch() Methods #6536
Merged
kenjis
merged 40 commits into
codeigniter4:4.3
from
sclubricants:RefactorBaseBuilderBatchNew
Sep 27, 2022
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
7962dc0
Added BaseBuilder::batchExecute() method
sclubricants 4642ea0
Added BaseBuilder::setData() and ::setAlias()
sclubricants db30072
Added BaseBuilder::onConstraint()
sclubricants e5b44f2
Refactored updateBatch() to use new methods
sclubricants 902749b
remove old updateBatch() method
sclubricants 585a494
Refactor setUpdateBatch() method
sclubricants 45a5ef1
Change method signature of _updateBatch() to match batchExecute()
sclubricants 7fae12c
Update Tests
sclubricants 961b111
Changed RawSql test
sclubricants 8827114
Refactor BaseBuilder::insertBatch()
sclubricants 719220c
Fix _insertBatch()
sclubricants 10bdd49
Fix tests
sclubricants 5c160f3
Refactored setInsertBatch() to use new methods
sclubricants ceee0dc
Fix SQLite and OCI8
sclubricants 46c79c1
Add throw Exception in *Batch operations
sclubricants a93bfdc
Add RawSql as parameter type to constraints.
sclubricants a2ccd9c
Change setAlias() default parameter value.
sclubricants dd16d92
Move Exception for no data to batchExecute
sclubricants 72d1634
Rename getValues() to formatValues()
sclubricants 41938cd
Add logic to updateFields() to add additional fields for update
sclubricants 26da2cf
Fix code mistake
sclubricants 110add6
Update User Guide
sclubricants 37c938b
Fix comment block
sclubricants 6197efe
Add example to updateBatch() documentation
sclubricants cb1f87e
Fix example - arranging in order
sclubricants b7c5aeb
Update user_guide_src/source/database/query_builder.rst
sclubricants be83c2a
Update query_builder.rst
sclubricants bbd10d7
Update tests/system/Database/Live/UpdateTest.php
sclubricants 5f82be0
Use str_replace instead of sprintf
sclubricants cea31cc
Add setAlias() to documentation
sclubricants b06a9af
Update change log
sclubricants b3c62e6
Update Documentation
sclubricants 3ed6122
More updates to documentation
sclubricants 5520c12
Revert removal of method documentation
sclubricants 1e5033c
Update user_guide_src/source/changelogs/v4.3.0.rst
sclubricants 7ba9b66
fix user guide
sclubricants a46b4f9
Update query_builder.rst
sclubricants c0aa82d
Update query_builder.rst
sclubricants 5e4d7ef
Update query_builder.rst
sclubricants f6a7aeb
Added upgrade note
sclubricants File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the existing test case instead of adding a test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not where I removed any tests. I looked back through the commits and didn't see any. Sometimes I'll rename them if I add to them. In general though I try to build on existing tests where appropriate to try and not create redundant tests. I try and get the maximum code coverage for each test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched
// same length but different
in UpdateTest.php, but not found.You had a test case
Iraq
for same length but different, but it was removedbecause
Uruguay
is not the same length.Is it okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this test around a few times.. I was having trouble useing RawSql with the % character. Ultimately I fixed the issue and changed the test to do what I was originally wanting to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to Uruguay and used LIKE 'U%'. It was a better test because this forced me to solve the escaping of % in RawSql.