protected function buildUnion(
        /*# string */ $prefix,
        array $settings
    )/*# : string */ {
        $clause = &$this->getClause('UNION');
        $flat = $this->flatSettings($settings);

        $res = '';
        foreach ($clause as $idx => $field) {
            $parts = [];
            $prefix = $idx ? $field[1] : '';
            $parts[] = $this->quoteItem($field[0], $flat);
            $res .= $this->joinClause($prefix, '', $parts, $settings);
        }
        return ltrim($res);
    }