-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add sql type parameter to connection project function #3703
Conversation
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.
Thank you for your PR. What use case do you try to handle with this PR? It would be nice if you can add this to your description of the PR.
I use the types parameter to specify the types of the sql-parameters. That's needed because only then mysql can choose the right index for me. Here is a small example, using the
This is working fine. Now I want to hydrate the rows to structs after the execution. Therefore, I could use the |
|
||
$conn->expects($this->once()) | ||
->method('executeQuery') | ||
->with($statement, $params, $types) |
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.
Rather than mocking 4 classes just in order to make sure that the argument is passed down the line, I'd like to test the real value that passing this parameter introduces for DBAL.
Could you instead come up with a realistic functional test that would show the need for this change?
Looking at this method, I have really no idea why we need it in DBAL in the first place. It contains more limitations and caveats than real use:
Why don't we just get rid of it instead of fixing? |
Summary
I've added the missing sql-type parameter to the project wrapper function.