| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 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/lmbDbColumnInfo.class.php'); 10 lmb_require(dirname(__FILE__) . '/lmbSqliteTypeInfo.class.php'); 11 12 /** 13 * class lmbSqliteColumnInfo. 14 * 15 * @package dbal 16 * @version $Id$ 17 */ 18 class lmbSqliteColumnInfo extends lmbDbColumnInfo 19 { 20 protected $nativeType; 21 protected $isAutoIncrement; 22 protected $isExisting = false; 23 24 function __construct( 25 $table, 26 $name, 27 $nativeType = null, 28 $size = null, 29 $scale = null, 30 $isNullable = null, 31 $default = null, 32 $isAutoIncrement = null, 33 $isExisting = false) 34 { 35 $this->nativeType = $this->canonicalizeNativeType($nativeType); 36 $this->isAutoIncrement = $this->canonicalizeIsAutoincrement($isAutoIncrement); 37 38 $typeinfo = new lmbSqliteTypeInfo(); 39 $typemap = $typeinfo->getNativeToColumnTypeMapping(); 40 $type = $typemap[$this->nativeType]; 41 42 $this->isExisting = $isExisting; 43 44 parent::__construct($table, $name, $type, $size, $scale, $isNullable, $default); 45 } 46 47 function getNativeType() 48 { 49 return $this->nativeType; 50 } 51 52 function canonicalizeNativeType($nativeType) 53 { 54 return strtolower($nativeType); 55 } 56 57 function isAutoIncrement() 58 { 59 return $this->isAutoIncrement === true; 60 } 61 62 63 function canonicalizeIsAutoIncrement($isAutoIncrement) 64 { 65 return is_null($isAutoIncrement) ? null : (bool) $isAutoIncrement; 66 } 67 } 68 69 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Nov 22 03:48:54 2008 | Cross-referenced by PHPXref 0.7 |