Skip to content

Commit

Permalink
Merge pull request #270 from jackalope/get_connection
Browse files Browse the repository at this point in the history
consistently use getConnection
  • Loading branch information
lsmith77 committed May 2, 2015
2 parents b2336b2 + 243b6db commit a4a2242
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Jackalope/Transport/DoctrineDBAL/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public function logout()
{
if ($this->loggedIn) {
$this->loggedIn = false;
$this->getConnection()->close();
$this->conn->close();
$this->conn = null;
}
}
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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']);
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a4a2242

Please sign in to comment.