Skip to content

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

Merged
taylorotwell merged 3 commits into
laravel:5.4from
ddzobov:postgres-delete-having-grammar
Jul 14, 2017
Merged

[5.4] Postgres: Grammar for pivot-related DELETE #20062
taylorotwell merged 3 commits into
laravel:5.4from
ddzobov:postgres-delete-having-grammar

Conversation

@ddzobov

@ddzobov ddzobov commented Jul 14, 2017

Copy link
Copy Markdown
Contributor

Added grammar for DELETE with USES clause

@ddzobov

ddzobov commented Jul 14, 2017

Copy link
Copy Markdown
Contributor Author

#19989

* @return string
*/
protected function compileDeleteWithJoins($query, $table)
{

Copy link
Copy Markdown
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
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown
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