original_string: public function union(Query $query, $flag = null) {
          if ($flag === Dialect::ALL || $flag === Dialect::DISTINCT) {
              $query->attribute('flag', $flag);
          }
  
          return $this->_addCompound(Dialect::UNION, $query);
      }
code: public function union(Query $query, $flag = null) {
          if ($flag === Dialect::ALL || $flag === Dialect::DISTINCT) {
              $query->attribute('flag', $flag);
          }
  
          return $this->_addCompound(Dialect::UNION, $query);
      }
code_tokens: public function union ( Query $ query , $ flag = null ) { if ( $ flag === Dialect :: ALL || $ flag === Dialect :: DISTINCT ) { $ query -> attribute ( 'flag' , $ flag ) ; } return $ this -> _addCompound ( Dialect :: UNION , $ query ) ; }
docstring: Add a select query as a union.
  
  @param \Titon\Db\Query $query
  @param string $flag
  @return $this
docstring_tokens: Add a select query as a union .