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

[5.4] Postgres: Grammar for pivot-related DELETE #20062

Merged
merged 3 commits into from
Jul 14, 2017
Merged

[5.4] Postgres: Grammar for pivot-related DELETE #20062

merged 3 commits into from
Jul 14, 2017

Conversation

ddzobov
Copy link
Contributor

@ddzobov ddzobov commented Jul 14, 2017

Added grammar for DELETE with USES clause

@ddzobov
Copy link
Contributor Author

ddzobov commented Jul 14, 2017

#19989

*/
protected function compileDeleteWithJoins($query, $table)
{
$using = ' USING '.collect($query->joins)->map(function ($join) use ($query, &$using_tables) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use $using_tables

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, removed old part of code

@@ -266,7 +266,7 @@ protected function compileDeleteWithoutJoins($query, $table)
*/
protected function compileDeleteWithJoins($query, $table)
{
$using = ' USING '.collect($query->joins)->map(function ($join) use ($query, &$using_tables) {
$using = ' USING '.collect($query->joins)->map(function ($join) use ($query) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to have use($query) as well here.

@taylorotwell taylorotwell merged commit d0fcfe0 into laravel:5.4 Jul 14, 2017
@ddzobov ddzobov deleted the postgres-delete-having-grammar branch July 14, 2017 13:54
@tillkruss
Copy link
Contributor

Nice, thanks!

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.

4 participants