Source for file sqlite.daobuilder.php

Documentation is available at sqlite.daobuilder.php

  1. <?php
  2. /**
  3. @package    jelix
  4. @subpackage db_driver
  5. @author     Laurent Jouanneau
  6. @contributor Loic Mathaud <loic@mathaud.net>
  7. @copyright  2007 Laurent Jouanneau 2008 Loic Mathaud
  8. @link      http://www.jelix.org
  9. @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
  10. */
  11.  
  12. /**
  13.  * driver for jDaoCompiler
  14.  * @package    jelix
  15.  * @subpackage db_driver
  16.  */
  17. class sqliteDaoBuilder extends jDaoGenerator {
  18.  
  19.     protected $propertiesListForInsert = 'PrimaryFieldsExcludeAutoIncrement';
  20.  
  21.     function __construct($factoryClassName$recordClassName$daoDefinition){
  22.         parent::__construct($factoryClassName$recordClassName$daoDefinition);
  23.  
  24.     }
  25.  
  26.     protected function genSelectPattern ($pattern$table$fieldname$propname ){
  27.         if ($pattern =='%s'){
  28.             $field $table.$this->_encloseName($fieldname).' as '.$this->_encloseName($propname);
  29.         }else{
  30.             $field str_replace(array("'""%s")array("\\'",$table.$this->_encloseName($fieldname)),$pattern).' as '.$this->_encloseName($propname);
  31.         }
  32.         return $field;
  33.     }
  34.  
  35. }

Documentation generated on Thu, 22 Mar 2012 22:18:08 +0100 by phpDocumentor 1.4.3