table($table); } public function table(string $table): Database\Query\Create { return $this->setTable($table); } public function columns(array|string $columns): Database\Query\Create { return $this->setColumns($columns); } protected array|string $columns; public function getColumns(): array { return $this->columns; } public function addColumn(string $column): Database\Query\Create { $this->columns []= $column; return $this; } public function setColumns(array|string $columns): Database\Query\Create { if (is_string($columns)) { $this->columns = $columns; return $this; } foreach ($columns as $column) { $this->addColumn($column); } return $this; } protected function getColumnsString(): string { if (is_string($this->columns)) { return $this->columns; } return implode(', ', $this->getColumns()); } public function build(): string { return "CREATE {$this->getTable()} ({$this->getColumnsString()})"; } }