[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/dbal/src/drivers/oci/ -> lmbOciUpdateStatement.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  lmb_require('limb/dbal/src/drivers/lmbDbInsertStatement.interface.php');
  10  lmb_require(dirname(__FILE__) . '/lmbOciManipulationStatement.class.php');
  11  
  12  /**

  13   * class lmbOciUpdateStatement.

  14   *

  15   * @package dbal

  16   * @version $Id: lmbOciUpdateStatement.class.php 5945 2007-06-06 08:31:43Z pachanga $

  17   */
  18  class lmbOciUpdateStatement extends lmbOciManipulationStatement
  19  {
  20    protected function _mapHolderToField($name, $sql)
  21    {
  22      // a very basic implementation
  23      if(!preg_match("~\"?(\w+)\"?\s*=\s*:p_$name~i", $sql, $m))
  24        throw new lmbDbException("Could not map placeholder :p_$name to field in '$sql'");
  25  
  26      return strtolower(trim($m[1], '"'));
  27    }
  28  
  29    protected function _saveLobs()
  30    {
  31      $result = true;
  32      foreach($this->lobDescriptors as $name => $descriptor)
  33      {
  34        if(!$descriptor->truncate() || !$descriptor->save($this->lobs[$name]->read()))
  35        {
  36          $result = false;
  37          break;
  38        }
  39      }
  40      return $result;
  41    }
  42  }
  43  
  44  ?>


Generated: Sat Sep 6 04:46:52 2008 Cross-referenced by PHPXref 0.7