original_string: private function rollback()
      {
          // We only need to rollback if we are in a transaction. Otherwise the resulting
          // error would hide the real problem why rollback was called. We might not be
          // in a transaction when not using the transactional locking behavior or when
          // two callbacks (e.g. destroy and write) are invoked that both fail.
          if ($this->inTransaction) {
              if ('sqlite' === $this->driver) {
                  $this->pdo->exec('ROLLBACK');
              } else {
                  $this->pdo->rollBack();
              }
              $this->inTransaction = false;
          }
      }
code: private function rollback()
      {
          // We only need to rollback if we are in a transaction. Otherwise the resulting
          // error would hide the real problem why rollback was called. We might not be
          // in a transaction when not using the transactional locking behavior or when
          // two callbacks (e.g. destroy and write) are invoked that both fail.
          if ($this->inTransaction) {
              if ('sqlite' === $this->driver) {
                  $this->pdo->exec('ROLLBACK');
              } else {
                  $this->pdo->rollBack();
              }
              $this->inTransaction = false;
          }
      }
code_tokens: private function rollback ( ) { // We only need to rollback if we are in a transaction. Otherwise the resulting // error would hide the real problem why rollback was called. We might not be // in a transaction when not using the transactional locking behavior or when // two callbacks (e.g. destroy and write) are invoked that both fail. if ( $ this -> inTransaction ) { if ( 'sqlite' === $ this -> driver ) { $ this -> pdo -> exec ( 'ROLLBACK' ) ; } else { $ this -> pdo -> rollBack ( ) ; } $ this -> inTransaction = false ; } }
docstring: Helper method to rollback a transaction.
docstring_tokens: Helper method to rollback a transaction .