添加 SELECT-union 内容
@param string $union
@return $this
498920
public function addUnion($union)
    {
        if (null === $union)
            return $this;
        if (!isset($this->query['union'])) {
            $this->query['union'] = [];
        }
        $this->query['union'][] = $union;
        return $this;
    }
848606
public function union(Set $set): Set
    {
        $union = new self();

        foreach ($this as $value) {
            $union->add($value);
        }

        foreach ($set as $value) {
            $union->add($value);
        }

        return $union;
    }
14883
private function setSelectFrom()
    {
        foreach ($this->selectColumns as $key => $value) {
            $this->qb->addSelect($key);
        }

        $this->qb->from($this->entity, $this->tableName);

        return $this;
    }
794939
public function addSelect($fields)
    {
        if (func_num_args() > 1) {
            $fields = func_get_args();
        } elseif (!is_array($fields)) {
            $fields = array($fields);
        }
        foreach ($fields as $idx => $field) {
            $this->selectField($field, is_numeric($idx) ? null : $idx);
        }

        return $this;
    }
15622
public function union($collection)
    {
        $union = clone $this;

        /** @var ModelInterface $otherModel */
        foreach ($collection->diff($this) as $otherModel) {
            $union->push($otherModel);
        }

        return $union;
    }
503000
public function unionAllRaw(string $sql, string ...$params)
    {
        $this->addUnion('ALL', $sql, $params);

        return $this;
    }
110972
public function union($sql, $all = false)
    {
        if (is_array($sql)) {
            foreach ($sql as $s) {
                $this->union .= $all ? ' UNION ALL ' : ' UNION ';
                $this->union .= $this->filterUnionSql($s);
            }
        } else {
            $this->union .= $all ? ' UNION ALL ' : ' UNION ';
            $this->union .= $this->filterUnionSql($sql) . ' ';
        }
        return $this;
    }
761371
public function openBracket(string $join = null){
		$join = strtoupper(trim($join));

		if(in_array($join, $this->joinArgs, true)){
			$this->where[] = $join;
		}

		$this->where[] = '(';

		return $this;
	}
971979
function _union() {
    var onlyUnions = this.onlyUnions();
    var unions = this.grouped.union;
    if (!unions) {
      return '';
    }
    var sql = '';
    for (var i = 0, l = unions.length; i < l; i++) {
      var union = unions[i];
      if (i > 0) {
        sql += ' ';
      }
      if (i > 0 || !onlyUnions) {
        sql += union.clause + ' ';
      }
      var statement = this.formatter.rawOrFn(union.value);
      if (statement) {
        if (union.wrap) {
          sql += '(';
        }
        sql += statement;
        if (union.wrap) {
          sql += ')';
        }
      }
    }
    return sql;
  }
1190604
public function union(SelectQuery $query)
    {
        $instance = $this->selectQueryInstance();

        $instance->selectQuery()->union($query);

        return $instance;
    }
805520
public function genUnionSQL ($args, $union = 'UNION')
	{
		
		// Set SQL string

		$sql	= '';

		// Foreach argument

		foreach ($args as $key => $arg)
		{

			// If not the first argument add UNION

			if ($key > 0)
			{
				$sql	.= ' ' . $union . ' ';
			}

			// Generate SQL and append to query

			$sql	.= $this->genSQL ($arg);

		}
		
		return $sql;
		
	}
1043079
public function setUnion($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule_Union::class);
        $this->writeOneof(4, $var);

        return $this;
    }
495926
public static function union(Set $a, Set $b) : Set
    {
        return new self(array_merge($a->toArray(), $b->toArray()));
    }
1237804
protected function buildUnion(
        /*# string */ $prefix,
        array $settings
    )/*# : string */ {
        switch ($this->is_union) {
            case UnionInterface::UNION_YES:
                return $settings['seperator'] . 'UNION';
            case UnionInterface::UNION_ALL:
                return $settings['seperator'] . 'UNION ALL';
            default:
                return $prefix;
        }
    }
711921
public function select($select = null)
    {

        $this->string['select'] = $this->useBuilder('select')
            ->select($select, $this->cleanThis());

        return $this;
    }
712334
public function union($sql)
    {
        if (isset($this->query['union']) && is_string($this->query['union'])) {
            $this->query['union'][] = $this->query['union'];
        }

        $this->query['union'][] = $sql;

        return $this;
    }
1209049
public function addInnerJoinOn($table, $where)
    {
        //argument test
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be a string
            ->test(2, 'string');
        
        $where = func_get_args();
        $table = array_shift($where);
        
        $this->join[] = array(self::INNER, $table, $where, false);
        
        return $this;
    }