begin() public method

Begins a transaction (if supported).
public begin ( $savepoint = NULL ) : void
return void
コード例 #1
0
ファイル: DefaultMigration.php プロジェクト: joseki/migration
 public final function run()
 {
     $this->dibiConnection->begin();
     try {
         parent::run();
     } catch (\Exception $e) {
         $this->dibiConnection->rollback();
         throw $e;
     }
     $this->dibiConnection->commit();
 }
コード例 #2
0
ファイル: Repository.php プロジェクト: joseki/migration
 public function migrate(AbstractMigration $migration)
 {
     $this->connection->begin();
     try {
         if (!$this->hasSchemaTable()) {
             $this->getAdapter()->createSchemaTable();
             $this->hasSchemaTable = true;
         }
         $migration->run();
         $this->getAdapter()->log($migration, time());
     } catch (\Exception $e) {
         $this->connection->rollback();
         throw $e;
     }
     $this->connection->commit();
 }
コード例 #3
0
ファイル: BaseMapper.php プロジェクト: svatekr/rsrs
 public function begin()
 {
     $this->db->begin();
 }