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

Fix DMLQueryBuilder::insertWithReturningPks() #287

Merged
merged 6 commits into from
Dec 21, 2023

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Dec 17, 2023

Related PR

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues yiisoft/db#792

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (5276702) 98.48% compared to head (9f32838) 98.01%.

Files Patch % Lines
src/Command.php 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #287      +/-   ##
============================================
- Coverage     98.48%   98.01%   -0.48%     
- Complexity      205      208       +3     
============================================
  Files            15       15              
  Lines           596      604       +8     
============================================
+ Hits            587      592       +5     
- Misses            9       12       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

what-the-diff bot commented Dec 17, 2023

PR Summary

  • Added New Method for Data Insertion
    A new method, insertWithReturningPks, has been included in the Command.php file to enable storing of information with automatic assignment of a unique identifier.

  • Refactored Data Management Code
    The DMLQueryBuilder.php file has been updated to improve code efficiency. This refactoring has simplified the use of the new method, insertWithReturningPks, and added a safety measure for scenarios where no unique identifier is assigned during data insertion.

  • Removed Redundant Test Method
    Cleaning of the CommandTest.php file has led to the removal of the now unnecessary testInsertWithReturningPks method.

  • Improved Query Builder for Tests
    Code in the QueryBuilderProvider.php file was modified to generate test SQL queries more efficiently while testing the insertWithReturningPks method.

  • Added Negative Default Value Test
    A new test, testNegativeDefaultValues, has been set up in the SchemaTest.php file to verify the handling of negative default values.

  • Updated Testing Database
    Changes to the mssql.sql file ensured that default values for some columns are negative numbers, to facilitate better testing of database mechanisms.

@vjik vjik merged commit 666a8e8 into master Dec 21, 2023
32 of 36 checks passed
@vjik vjik deleted the test-insertWithReturningPks-empty-values branch December 21, 2023 07:43
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