suppression de l'objet db dans l'objet QueryBuilder
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
namespace Kletellier\PdoWrapper;
|
||||
|
||||
class QueryBuilder
|
||||
{
|
||||
protected ?Connection $db;
|
||||
{
|
||||
protected array $columns;
|
||||
protected array $wheres;
|
||||
protected array $orders;
|
||||
@@ -21,8 +20,7 @@ class QueryBuilder
|
||||
{
|
||||
$this->table = $table;
|
||||
$this->pk = $pk;
|
||||
$this->connection = $connection;
|
||||
$this->db = null;
|
||||
$this->connection = $connection;
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
@@ -196,9 +194,8 @@ 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