public function exec($statement)
{
$this->connect();
$logger = $this->_config->getSQLLogger();
if ($logger) {
$logger->startQuery($statement);
}
try {
$result = $this->_conn->exec($statement);
} catch (Exception $ex) {
throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement);
}
if ($logger) {
$logger->stopQuery();
}
return $result;
}
/** * {@inheritdoc} */ public function purge() { foreach ($this->tables as $table) { $sql = 'DELETE FROM ' . $table; $this->connection->exec($sql); } }