-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Introduce query value object to wrap sql queries #919
Conversation
5c795fe
to
5ee2b89
Compare
* @param mixed[] $types | ||
*/ | ||
public function __construct(string $statement, array $parameters = [], array $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.
What should happen if the number of parameters and the number of types is not the same?
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.
Good point. Will check what is doing doctrine DBAL, and do something similar
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.
done
7f7b3c7
to
c024f00
Compare
Summary
I think that the
Query
value object was a great idea proposed by @pulzarraider in #906. Independently if #906 is going to be merged, I see value in theQuery
part, so here is a full refactoring of the code base to use it everywhere instead of the current 3 different arrays holding the same data.