-
-
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
Extend QueryBuilder for possibility to use "into" and "from" with sta… #6114
Conversation
…tements "insert" and "delete"
Thank you for the PR. I understand that |
@@ -585,7 +586,7 @@ public function getMaxResults() | |||
/** | |||
* Either appends to or replaces a single, generic query part. | |||
* | |||
* The available parts are: 'select', 'from', 'set', 'where', |
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's the reason for this change? What happens to existing apps that call $qb->add('set', …)
?
@@ -777,18 +776,13 @@ public function delete($delete = null, $alias = null) | |||
* | |||
* @return $this This QueryBuilder instance. | |||
*/ | |||
public function update($update = null, $alias = null) |
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.
Apps that currently calls $qb->update()
without parameters will break after your change.
return $this->add('from', [ | ||
'table' => $from, | ||
'alias' => $alias, | ||
], true); |
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's the reason for not calling add()
anymore?
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
Let's close. We've never heard back from the contributor. |
…tements "insert" and "delete"
Summary
It can be confusing, for example when
$qb->delete()->from('users')->where("id = 5")->executeStatement();
has no effect in the database and the user entry will not be removed.This change should bring more consistency to the Querybuilder.