Namespace and ClassPath rewrites
This commit is contained in:
29
Core/Driver/SQL/Query/Query.class.php
Normal file
29
Core/Driver/SQL/Query/Query.class.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Driver\SQL\Query;
|
||||
|
||||
use Core\Driver\SQL\Expression\Expression;
|
||||
use Core\Driver\SQL\SQL;
|
||||
|
||||
abstract class Query extends Expression {
|
||||
|
||||
protected SQL $sql;
|
||||
public bool $dump;
|
||||
|
||||
public function __construct(SQL $sql) {
|
||||
$this->sql = $sql;
|
||||
$this->dump = false;
|
||||
}
|
||||
|
||||
public function dump(): Query {
|
||||
$this->dump = true;
|
||||
return $this;
|
||||
}
|
||||
|
||||
// can actually return bool|array (depending on success and query type)
|
||||
public function execute() {
|
||||
return $this->sql->executeQuery($this);
|
||||
}
|
||||
|
||||
public abstract function build(array &$params): ?string;
|
||||
}
|
||||
Reference in New Issue
Block a user