suppression de l'objet db dans l'objet QueryBuilder
This commit is contained in:
@@ -4,7 +4,6 @@ namespace Kletellier\PdoWrapper;
|
|||||||
|
|
||||||
class QueryBuilder
|
class QueryBuilder
|
||||||
{
|
{
|
||||||
protected ?Connection $db;
|
|
||||||
protected array $columns;
|
protected array $columns;
|
||||||
protected array $wheres;
|
protected array $wheres;
|
||||||
protected array $orders;
|
protected array $orders;
|
||||||
@@ -22,7 +21,6 @@ class QueryBuilder
|
|||||||
$this->table = $table;
|
$this->table = $table;
|
||||||
$this->pk = $pk;
|
$this->pk = $pk;
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
$this->db = null;
|
|
||||||
$this->reset();
|
$this->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,8 +195,7 @@ class QueryBuilder
|
|||||||
|
|
||||||
private function getData(): mixed
|
private function getData(): mixed
|
||||||
{
|
{
|
||||||
$this->db = Connection::getInstance($this->connection);
|
return Connection::getInstance($this->connection)->getSelectQuery($this->getQuery());
|
||||||
return $this->db->getSelectQuery($this->getQuery());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getConstructedQuery(): Query
|
private function getConstructedQuery(): Query
|
||||||
|
|||||||
Reference in New Issue
Block a user