public function prepare($statement)
{
$this->connect();
try {
$stmt = new PDOStatement($statement, $this);
} catch (\Exception $ex) {
throw $this->resolveException(Doctrine\DBAL\DBALException::driverExceptionDuringQuery($this->getDriver(), $ex, $statement), $statement);
}
$stmt->setFetchMode(PDO::FETCH_ASSOC);
return $stmt;
}