statement)) { throw new RuntimeException('No statement inside WITH'); } $str = $this->name; if ($this->columns) { $str .= ArrayObjs::buildAll($this->columns); } $str .= ' AS ('; foreach ($this->statement->statements as $statement) { $str .= $statement->build(); } $str .= ')'; return $str; } public function __toString(): string { return $this->build(); } }