2021-01-07 14:59:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Driver\SQL\Query;
|
|
|
|
|
|
|
|
use Driver\SQL\SQL;
|
|
|
|
|
|
|
|
class Drop extends Query {
|
|
|
|
|
|
|
|
private string $table;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Drop constructor.
|
|
|
|
* @param SQL $sql
|
|
|
|
* @param string $table
|
|
|
|
*/
|
2021-04-02 21:58:06 +02:00
|
|
|
public function __construct(SQL $sql, string $table) {
|
2021-01-07 14:59:36 +01:00
|
|
|
parent::__construct($sql);
|
|
|
|
$this->table = $table;
|
|
|
|
}
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function execute(): bool {
|
|
|
|
return $this->sql->executeDrop($this);
|
2021-01-07 14:59:36 +01:00
|
|
|
}
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function getTable(): string {
|
2021-01-07 14:59:36 +01:00
|
|
|
return $this->table;
|
|
|
|
}
|
|
|
|
}
|