setTable($table); } /** * Get the database on which to execute the query. * @return Database */ public function getDatabase(): Database { return $this->database; } /** * Set the table to use in the query. * @param string $table The table to use in the query. * @return $this */ public function setTable(string $table): static { $this->table = $table; return $this; } /** * Get the table to use in the query. * @return string */ public function getTable(): string { return $this->table; } /** * Create a new SELECT query. * @return SelectQuery A select query. */ public function newSelect(): SelectQuery { return new SelectQuery($this->getDatabase(), $this->getTable()); } /** * Create a new INSERT query. * @return InsertQuery An INSERT query. */ public function newInsert(): InsertQuery { return new InsertQuery($this->getDatabase(), $this->getTable()); } /** * Create a new UPDATE query. * @return UpdateQuery An UPDATE query. */ public function newUpdate(): UpdateQuery { return new UpdateQuery($this->getDatabase(), $this->getTable()); } /** * Create a new DELETE query. * @return DeleteQuery A DELETE query. */ public function newDelete(): DeleteQuery { return new DeleteQuery($this->getDatabase(), $this->getTable()); } }