当前位置: 首页>>代码示例>>PHP>>正文


PHP Grammar::compileSavepoint方法代码示例

本文整理汇总了PHP中Illuminate\Database\Query\Grammars\Grammar::compileSavepoint方法的典型用法代码示例。如果您正苦于以下问题:PHP Grammar::compileSavepoint方法的具体用法?PHP Grammar::compileSavepoint怎么用?PHP Grammar::compileSavepoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Database\Query\Grammars\Grammar的用法示例。


在下文中一共展示了Grammar::compileSavepoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beginTransaction

 /**
  * Start a new database transaction.
  *
  * @return void
  */
 public function beginTransaction()
 {
     ++$this->transactions;
     if ($this->transactions == 1) {
         $this->getPdo()->beginTransaction();
     } elseif ($this->transactions > 1 && $this->queryGrammar->supportsSavepoints()) {
         $this->getPdo()->exec($this->queryGrammar->compileSavepoint('trans' . $this->transactions));
     }
     $this->fireConnectionEvent('beganTransaction');
 }
开发者ID:Oblood,项目名称:framework,代码行数:15,代码来源:Connection.php

示例2: beginTransaction

 /**
  * Start a new database transaction.
  *
  * @return void
  * @throws Exception
  */
 public function beginTransaction()
 {
     ++$this->transactions;
     if ($this->transactions == 1) {
         try {
             $this->pdo->beginTransaction();
         } catch (Exception $e) {
             --$this->transactions;
             throw $e;
         }
     } elseif ($this->transactions > 1 && $this->queryGrammar->supportsSavepoints()) {
         $this->pdo->exec($this->queryGrammar->compileSavepoint('trans' . $this->transactions));
     }
     $this->fireConnectionEvent('beganTransaction');
 }
开发者ID:drickferreira,项目名称:rastreador,代码行数:21,代码来源:Connection.php

示例3: beginTransaction

 /**
  * Start a new database transaction.
  *
  * @return void
  * @throws Exception
  */
 public function beginTransaction()
 {
     if ($this->transactions == 0) {
         try {
             $this->getPdo()->beginTransaction();
         } catch (Exception $e) {
             if ($this->causedByLostConnection($e)) {
                 $this->reconnect();
                 $this->pdo->beginTransaction();
             } else {
                 throw $e;
             }
         }
     } elseif ($this->transactions >= 1 && $this->queryGrammar->supportsSavepoints()) {
         $this->getPdo()->exec($this->queryGrammar->compileSavepoint('trans' . ($this->transactions + 1)));
     }
     ++$this->transactions;
     $this->fireConnectionEvent('beganTransaction');
 }
开发者ID:nsandlin,项目名称:linepig,代码行数:25,代码来源:Connection.php


注:本文中的Illuminate\Database\Query\Grammars\Grammar::compileSavepoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。