/** * {@inheritdoc } */ public function query($query) { $result = null; try { $this->logger->startQuery($query); $result = $this->connection->query($query); } catch (\Exception $e) { //todo фиксировать и ошибки throw $e; } finally { //$meta = $this->connection->query('SHOW META'); //todo писать и мету запрос (наверно как один не стоит) $this->logger->stopQuery(); } return $result; }
/** * @param string $query * @param string $index * @param string $comment * @return array|bool */ public function query($query, $index = '*', $comment = '') { $this->logger->startQuery($query . ' (INDEX - ' . $index . ')'); $result = $this->client->Query($query, $index, $comment); $this->logger->stopQuery(); if ($result === false) { //$lastError = $this->client->getLastError(); //todo errors collecting } return $result; }