Refactor SQL Server code for calling stored procedures#6796
Merged
morozov merged 1 commit intodoctrine:4.3.xfrom Feb 17, 2025
Merged
Refactor SQL Server code for calling stored procedures#6796morozov merged 1 commit intodoctrine:4.3.xfrom
morozov merged 1 commit intodoctrine:4.3.xfrom
Conversation
Member
Sorry, what does this have to do with comments? Or did you mean to write "common"? |
Member
Author
|
No, most of the affected methods (e.g. |
c17f856 to
5906136
Compare
greg0ire
approved these changes
Feb 17, 2025
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I want to unify the SQL Server platform code for calling stored procedures. This is a backport of the backward-compatible part of the changes that I'm planning for 5.0.x:
SQLServerPlatform#getExecSQL().Nto national string literals, useSQLServerPlatform#quoteNationalStringLiteral().Eventually, it will allow to get rid of the methods with the signatures like this:
dbal/src/Platforms/SQLServerPlatform.php
Lines 675 to 693 in c17f856
They are just boilerplate that mimics the signatures of the corresponding stored procedures. They don't enforce the contract that the arguments need to be passed in pairs and can generate syntactically invalid SQL. For instance, here, if
$level2Typeis notnullbut$level2Nameis:dbal/src/Platforms/SQLServerPlatform.php
Lines 699 to 702 in a030c1e