2020-04-02 00:02:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Driver\SQL\Query;
|
|
|
|
|
2020-04-03 17:39:58 +02:00
|
|
|
use Driver\SQL\SQL;
|
|
|
|
|
2020-04-02 00:02:51 +02:00
|
|
|
abstract class Query {
|
|
|
|
|
2020-04-03 17:39:58 +02:00
|
|
|
protected SQL $sql;
|
2020-04-04 01:15:59 +02:00
|
|
|
public bool $dump;
|
2020-04-02 00:02:51 +02:00
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function __construct(SQL $sql) {
|
2020-04-02 00:02:51 +02:00
|
|
|
$this->sql = $sql;
|
2020-04-04 01:15:59 +02:00
|
|
|
$this->dump = false;
|
|
|
|
}
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public function dump(): Query {
|
2020-04-04 01:15:59 +02:00
|
|
|
$this->dump = true;
|
|
|
|
return $this;
|
2020-04-02 00:02:51 +02:00
|
|
|
}
|
|
|
|
|
2021-04-02 21:58:06 +02:00
|
|
|
public abstract function execute(): bool;
|
2020-04-02 00:02:51 +02:00
|
|
|
|
2020-04-03 17:39:58 +02:00
|
|
|
}
|