3 * TPgsqlTableColumn class file.
5 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
6 * @link https://github.com/pradosoft/prado
7 * @copyright Copyright © 2005-2016 The PRADO Group
8 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9 * @package System.Data.Common.Pgsql
13 * Load common TDbTableCommon class.
15 Prado::using('System.Data.Common.TDbTableColumn');
18 * Describes the column metadata of the schema for a PostgreSQL database table.
20 * @author Wei Zhuo <weizho[at]gmail[dot]com>
21 * @package System.Data.Common.Pgsql
24 class TPgsqlTableColumn extends TDbTableColumn
26 private static $types=array(
27 'integer' => array('bit', 'bit varying', 'real', 'serial', 'int', 'integer'),
28 'boolean' => array('boolean'),
29 'float' => array('bigint', 'bigserial', 'double precision', 'money', 'numeric')
33 * Overrides parent implementation, returns PHP type from the db type.
34 * @return boolean derived PHP primitive type from the column db type.
36 public function getPHPType()
38 $dbtype = strtolower($this->getDbType());
39 foreach(self::$types as $type => $dbtypes)
41 if(in_array($dbtype, $dbtypes))