Prado\Data\Common\Sqlite\TSqliteMetaData::processColumn PHP Метод

processColumn() защищенный Метод

protected processColumn ( $col, $foreign ) : TSqliteTableColumn
Результат TSqliteTableColumn column details.
    protected function processColumn($col, $foreign)
    {
        $columnId = $col['name'];
        //use column name as column Id
        $info['ColumnName'] = '"' . $columnId . '"';
        //quote the column names!
        $info['ColumnId'] = $columnId;
        $info['ColumnIndex'] = $col['index'];
        if ($col['notnull'] !== '99') {
            $info['AllowNull'] = true;
        }
        if ($col['pk'] === '1') {
            $info['IsPrimaryKey'] = true;
        }
        if ($this->isForeignKeyColumn($columnId, $foreign)) {
            $info['IsForeignKey'] = true;
        }
        if ($col['dflt_value'] !== null) {
            $info['DefaultValue'] = $col['dflt_value'];
        }
        $type = strtolower($col['type']);
        $info['AutoIncrement'] = $type === 'integer' && $col['pk'] === '1';
        $info['DbType'] = $type;
        $match = array();
        if (is_int($pos = strpos($type, '(')) && preg_match('/\\((.*)\\)/', $type, $match)) {
            $ps = explode(',', $match[1]);
            if (count($ps) === 2) {
                $info['NumericPrecision'] = intval($ps[0]);
                $info['NumericScale'] = intval($ps[1]);
            } else {
                $info['ColumnSize'] = intval($match[1]);
            }
            $info['DbType'] = substr($type, 0, $pos);
        }
        return new TSqliteTableColumn($info);
    }