original_string: public function run()
      {
          $config = $this->config;
          try {
              $this->getFluent()->getPdo()->beginTransaction();
              $this->tree->getFluent()->getPdo()->exec("LOCK TABLES $config[table] WRITE;");
              $return = $this->doRun();
              $this->getFluent()->getPdo()->commit();
              $this->tree->getFluent()->getPdo()->query("UNLOCK TABLES;");
              return $return;
          } catch (Exception $ex) {
              $this->getFluent()->getPdo()->rollBack();
              $this->tree->getFluent()->getPdo()->query("UNLOCK TABLES;");
              throw $ex;
          }
      }
code: public function run()
      {
          $config = $this->config;
          try {
              $this->getFluent()->getPdo()->beginTransaction();
              $this->tree->getFluent()->getPdo()->exec("LOCK TABLES $config[table] WRITE;");
              $return = $this->doRun();
              $this->getFluent()->getPdo()->commit();
              $this->tree->getFluent()->getPdo()->query("UNLOCK TABLES;");
              return $return;
          } catch (Exception $ex) {
              $this->getFluent()->getPdo()->rollBack();
              $this->tree->getFluent()->getPdo()->query("UNLOCK TABLES;");
              throw $ex;
          }
      }
code_tokens: public function run ( ) { $ config = $ this -> config ; try { $ this -> getFluent ( ) -> getPdo ( ) -> beginTransaction ( ) ; $ this -> tree -> getFluent ( ) -> getPdo ( ) -> exec ( "LOCK TABLES $config[table] WRITE;" ) ; $ return = $ this -> doRun ( ) ; $ this -> getFluent ( ) -> getPdo ( ) -> commit ( ) ; $ this -> tree -> getFluent ( ) -> getPdo ( ) -> query ( "UNLOCK TABLES;" ) ; return $ return ; } catch ( Exception $ ex ) { $ this -> getFluent ( ) -> getPdo ( ) -> rollBack ( ) ; $ this -> tree -> getFluent ( ) -> getPdo ( ) -> query ( "UNLOCK TABLES;" ) ; throw $ ex ; } }
docstring: Run the operation in transaction.
docstring_tokens: Run the operation in transaction .