From 243b6db3d221b5bfaec1f93e6c8d81b9eb36994a Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Sat, 2 May 2015 17:00:33 +0200 Subject: [PATCH] consistently use getConnection --- src/Jackalope/Transport/DoctrineDBAL/Client.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Jackalope/Transport/DoctrineDBAL/Client.php b/src/Jackalope/Transport/DoctrineDBAL/Client.php index 20d15c2c..6c4a263d 100644 --- a/src/Jackalope/Transport/DoctrineDBAL/Client.php +++ b/src/Jackalope/Transport/DoctrineDBAL/Client.php @@ -392,7 +392,7 @@ public function logout() { if ($this->loggedIn) { $this->loggedIn = false; - $this->getConnection()->close(); + $this->conn->close(); $this->conn = null; } } @@ -557,12 +557,12 @@ protected function getNamespacesObject() private function executeChunkedUpdate($query, array $params) { $types = array(Connection::PARAM_INT_ARRAY); - if ($this->conn->getDatabasePlatform() instanceof SqlitePlatform) { + if ($this->getConnection()->getDatabasePlatform() instanceof SqlitePlatform) { foreach (array_chunk($params, self::SQLITE_MAXIMUM_IN_PARAM_COUNT) as $chunk) { - $this->conn->executeUpdate($query, array($chunk), $types); + $this->getConnection()->executeUpdate($query, array($chunk), $types); } } else { - $this->conn->executeUpdate($query, array($params), $types); + $this->getConnection()->executeUpdate($query, array($params), $types); } } @@ -883,7 +883,7 @@ private function syncReferences($referencesToUpdate) } foreach ($updates as $update) { - $this->conn->insert($this->referenceTables[$update['type']], $update['data']); + $this->getConnection()->insert($this->referenceTables[$update['type']], $update['data']); } } @@ -2233,7 +2233,7 @@ public function query(Query $query) $qom = $query; } - $qomWalker = new QOMWalker($this->nodeTypeManager, $this->conn, $this->getNamespaces()); + $qomWalker = new QOMWalker($this->nodeTypeManager, $this->getConnection(), $this->getNamespaces()); list($selectors, $selectorAliases, $sql) = $qomWalker->walkQOMQuery($qom); $primarySource = reset($selectors);