Parse table column properties.
773529
def parse_table_column_properties(doc, cell, prop):
    ""

    if not cell:
        return

    grid = prop.find(_name('{{{w}}}gridSpan'))

    if grid is not None:
        cell.grid_span = int(grid.attrib[_name('{{{w}}}val')])

    vmerge = prop.find(_name('{{{w}}}vMerge'))

    if vmerge is not None:
        if _name('{{{w}}}val') in vmerge.attrib:
            cell.vmerge = vmerge.attrib[_name('{{{w}}}val')]
        else:
            cell.vmerge = ""
74898
def _extract_columns(self, table_name):
        
        '''  '''
        
        import re
        from sqlalchemy import MetaData, VARCHAR, INTEGER, BLOB, BOOLEAN, FLOAT
        from sqlalchemy.dialects.postgresql import DOUBLE_PRECISION, BIT, BYTEA
    
    # retrieve list of tables
        metadata_object = MetaData()
        table_list = self.engine.table_names()
    
    # determine columns
        prior_columns = {}
        if table_name in table_list:
            metadata_object.reflect(self.engine)
            existing_table = metadata_object.tables[table_name]
            for column in existing_table.columns:
                column_type = None
                column_length = None
                if column.type.__class__ == FLOAT().__class__:
                    column_type = 'float'
                elif column.type.__class__ == DOUBLE_PRECISION().__class__: # Postgres
                    column_type = 'float'
                elif column.type.__class__ == INTEGER().__class__:
                    column_type = 'integer'
                elif column.type.__class__ == VARCHAR().__class__:
                    column_length = getattr(column.type, 'length', None)
                    if column_length == 1:
                        if column.primary_key:
                            column_length = None
                    column_type = 'string'
                elif column.type.__class__ == BLOB().__class__:
                    column_type = 'list'
                elif column.type.__class__ in (BIT().__class__, BYTEA().__class__):
                    column_type = 'list'
                elif column.type.__class__ == BOOLEAN().__class__:
                    column_type = 'boolean'
                prior_columns[column.key] = (column.key, column_type, '', column_length)
        
        return prior_columns
673049
private Properties getColumnFamilyProperties(TableInfo tableInfo)
    {
        if (tables != null)
        {
            for (Table table : tables)
            {
                if (table != null && table.getName() != null
                        && table.getName().equalsIgnoreCase(tableInfo.getTableName()))
                {
                    return table.getProperties();
                }
            }
        }
        return null;
    }
675953
def _parse_properties(self):
        
        props_dict = self.data.get('properties', {})
        for prop_name in self.KNOWN_PROPERTIES:
            if prop_name in props_dict:
                setattr(self, prop_name, props_dict.get(prop_name))
            else:
                setattr(self, prop_name, None)
1242582
def _get_dbt_columns_from_bq_table(self, table):
        ""

        columns = []
        for col in table.schema:
            # BigQuery returns type labels that are not valid type specifiers
            dtype = self.Column.translate_type(col.field_type)
            column = self.Column(
                col.name, dtype, col.fields, col.mode)
            columns.append(column)

        return columns
671084
def _parse_property_list(prop, value):
        """"""
        attributes = []
        for v in value:
            try:
                attributes.append(
                    prop.prop.instance_class.from_api(**v),
                )
            except AttributeError:
                attributes.append(v)
        return attributes
1131047
def _parse_columns(self):
    
        '''  '''
        
    # construct column list
        column_map = {}
        for key, value in self.model.keyMap.items():
            record_key = key[1:]
            if record_key:
                if self.item_key.findall(record_key):
                    pass
                else:
                    if value['value_datatype'] == 'map':
                        continue
                    datatype = value['value_datatype']
                    if value['value_datatype'] == 'number':
                        datatype = 'float'
                        if 'integer_data' in value.keys():
                            if value['integer_data']:
                                datatype = 'integer'
                    replace_key = ''
                    if 'field_metadata' in value.keys():
                        if 'replace_key' in value['field_metadata'].keys():
                            if isinstance(value['field_metadata']['replace_key'], str):
                                replace_key = value['field_metadata']['replace_key']
                    max_length = None
                    if 'max_length' in value.keys():
                        max_length = value['max_length']
                    column_map[record_key] = (record_key, datatype, replace_key, max_length)
        
        return column_map
738401
def _parse_text_DB(self, s):
        """"""
        dic = self.decode_json_str(s)
        new_dic = {}
        for table_name, (header, rows) in dic.items():
            newl = [{c: ligne[i]
                     for i, c in enumerate(header)} for ligne in rows]
            new_dic[table_name] = newl
        return new_dic
393850
def properties(self):
        """"""
        value = self._schema.get("properties", {})
        if not isinstance(value, dict):
            raise SchemaError(
                "properties value {0!r} is not an object".format(value))
        return value
938333
def parse(self):
        """"""

        self.parse_fields()
        records = []
        for line in self.t['data'].split('\n'):
            if EMPTY_ROW.match(line):
                continue
            row = [self.autoconvert(line[start_field:end_field+1])
                   for start_field, end_field in self.fields]
            records.append(tuple(row))
        self.records = records
1283620
def get_columns_of_table(self, table=None):
        """"""
        # Check the table exists #
        if table is None: table = self.main_table
        if not table in self.tables: return []
        # A PRAGMA statement will implicitly issue a commit, don't use #
        self.own_cursor.execute('SELECT * from "%s" LIMIT 1;' % table)
        columns = [x[0] for x in self.own_cursor.description]
        self.cursor.fetchall()
        return columns
571598
def parse_table(fq_table: str) -> Tuple[str, str]:
    
    parts = fq_table.split('.')
    if len(parts) == 1:
        return 'doc', parts[0]
    elif len(parts) == 2:
        return parts[0], parts[1]
    else:
        raise ValueError
744659
private void resolveTableColumns(Table table) {
        HsqlList set = new HsqlArrayList();
        collectAllColumnExpressions(set);
        for (int i = 0; i < set.size(); i++) {
            ExpressionColumn array_element = (ExpressionColumn)set.get(i);
            ColumnSchema column = table.getColumn(table.getColumnIndex(array_element.getAlias()));
            array_element.setAttributesAsColumn(column, false);

        }
    }
1320416
def fetch_column_names(self, table: str) -> List[str]:
        """"""
        return self.flavour.fetch_column_names(self, table)
199991
def values(self):
        
        return [getattr(self, c.name, None) for c in self.__table__._columns]
1293312
def schema_columns(self):
        """"""
        t = self.schema_term

        columns = []


        if t:
            for i, c in enumerate(t.children):

                if c.term_is("Table.Column"):
                    p = c.all_props
                    p['pos'] = i
                    p['name'] = c.value
                    p['header'] = self._name_for_col_term(c, i)
                    

                    columns.append(p)

        return columns
343157
protected function parseColumns(string $columns): void
    {
        // Split the columns string into individual columns
        $columns = explode(',', $columns);

        foreach ($columns as &$column) {
            if (strpos($column, '.') === false) {
                $column = "{$this->model->getSource()}.{$column}";
            } else {
                $as = str_replace('.', '_', $column);
                $column = "{$column} {$as}";
            }
        }

        $this->columns = implode(', ', $columns);
    }