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;
        }
    }
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;
        }
    }
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 ; } }
Run the operation in transaction.
Run the operation in transaction .