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