web-base/core/Driver/SQL/Query/Query.class.php

25 lines
415 B
PHP
Raw Normal View History

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 22:41:24 +02:00
// can actually return bool|array (depending on success and query type)
public abstract function execute();
2020-04-02 00:02:51 +02:00
2020-04-03 17:39:58 +02:00
}