/**
  * Execute a Closure within a transaction.
  *
  * @param  \Closure  $callback
  * @return mixed
  *
  * @throws \Exception
  */
 public function transaction(Closure $callback)
 {
     if ($this->getDriverName() == 'sqlsrv') {
         return parent::transaction($callback);
     }
     $this->pdo->exec('BEGIN TRAN');
     try {
         $result = $callback($this);
         $this->pdo->exec('COMMIT TRAN');
     } catch (\Exception $e) {
         $this->pdo->exec('ROLLBACK TRAN');
         throw $e;
     }
     return $result;
 }