/** * @internal */ public static function getTypeCache() { if (self::$types === NULL) { self::$types = new DibiHashMap(array(__CLASS__, 'detectType')); } return self::$types; }
/** * Autodetect column types. * @return void */ private function detectTypes() { $cache = DibiColumnInfo::getTypeCache(); try { foreach ($this->getResultDriver()->getResultColumns() as $col) { $this->types[$col['name']] = $cache->{$col['nativetype']}; } } catch (DibiNotSupportedException $e) { } }
private function getMeta() { if ($this->meta === NULL) { $this->meta = $this->getDriver()->getColumnsMeta(); foreach ($this->meta as &$row) { $row['type'] = DibiColumnInfo::detectType($row['nativetype']); } } return $this->meta; }
public function getType() { if (self::$types === NULL) { self::$types = new DibiLazyStorage(array(__CLASS__, 'detectType')); } return self::$types->{$this->info['nativetype']}; }
isset($this->info['table'])?$this->info['table']:NULL;}function getType(){if(self::$types===NULL){self::$types=new DibiHashMap(array(__CLASS__,'detectType'));}return self::$types->{$this->info['nativetype']};}function
protected function generateEntityProperty(\DibiColumnInfo $column, $pks) { $params = array('name' => $name = $column->getName(), 'type' => $type = $column->getType(), 'size' => $column->getSize(), 'nullable' => $column->isNullable() ? true : false, 'default' => is_null($default = $column->getDefault()) ? NULL : $default); if (in_array($name, $pks)) { $params['primary'] = true; if ($column->isAutoincrement()) { $params['autoincrement'] = true; } } return ' * @Column(' . Metadata\Annotations::serializeArray($params) . ')' . "\n"; }