Namespace and ClassPath rewrites
This commit is contained in:
21
Core/Driver/SQL/Query/Truncate.class.php
Normal file
21
Core/Driver/SQL/Query/Truncate.class.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Driver\SQL\Query;
|
||||
|
||||
use Core\Driver\SQL\SQL;
|
||||
|
||||
class Truncate extends Query {
|
||||
|
||||
private string $tableName;
|
||||
|
||||
public function __construct(SQL $sql, string $name) {
|
||||
parent::__construct($sql);
|
||||
$this->tableName = $name;
|
||||
}
|
||||
|
||||
public function getTable(): string { return $this->tableName; }
|
||||
|
||||
public function build(array &$params): ?string {
|
||||
return "TRUNCATE " . $this->sql->tableName($this->getTable());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user