Skip to content

Commit

Permalink
Merge pull request #42 from moufmouf/union_query
Browse files Browse the repository at this point in the history
Subqueries can be union queries
  • Loading branch information
moufmouf authored Nov 22, 2017
2 parents cb2efea + f15c048 commit 221dbc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/SQLParser/Node/SubQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use SQLParser\Query\Select;
use Mouf\MoufInstanceDescriptor;
use Mouf\MoufManager;
use SQLParser\Query\Union;

/**
* This class represents a subquery (and optionally a JOIN .. ON expression in an SQL expression.
Expand All @@ -51,7 +52,7 @@ class SubQuery implements NodeInterface
/**
* Returns the list of subQuery statements.
*
* @return Select
* @return Select|Union
*/
public function getSubQuery()
{
Expand All @@ -61,9 +62,9 @@ public function getSubQuery()
/**
* Sets the list of subQuery statements.
*
* @param Select $subQuery
* @param Select|Union $subQuery
*/
public function setSubQuery(Select $subQuery)
public function setSubQuery($subQuery)
{
$this->subQuery = $subQuery;
}
Expand Down

0 comments on commit 221dbc9

Please sign in to comment.