Skip to content

Commit de5f662

Browse files
Merge pull request #67 from singlestore-labs/ISSUE-64
Modified generation of the union queries
2 parents bee2c30 + 949ffec commit de5f662

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Query/Grammar.php

+12
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,18 @@ protected function compileUnions(Builder $query)
176176
return ltrim($sql);
177177
}
178178

179+
/**
180+
* Compile a single union statement.
181+
*
182+
* @return string
183+
*/
184+
protected function compileUnion(array $union)
185+
{
186+
$conjunction = $union['all'] ? ' union all ' : ' union ';
187+
188+
return $conjunction.'('.$union['query']->toSql().')';
189+
}
190+
179191
/**
180192
* Compile a select query into SQL.
181193
*

0 commit comments

Comments
 (0)