Gets :class:`Column` objects from an SQLAlchemy ORM class.
    Does not provide their attribute names.
335563
def get_orm_columns(cls: Type) -> List[Column]:
    
    mapper = inspect(cls)  # type: Mapper
    # ... returns InstanceState if called with an ORM object
    #     http://docs.sqlalchemy.org/en/latest/orm/session_state_management.html#session-object-states  # noqa
    # ... returns Mapper if called with an ORM class
    #     http://docs.sqlalchemy.org/en/latest/orm/mapping_api.html#sqlalchemy.orm.mapper.Mapper  # noqa
    colmap = mapper.columns  # type: OrderedProperties
    return colmap.values()
470884
def get_columns(model=None, fields=None, meta=None):
    
    if model:
        M = get_model(model)
    else:
        M = None
    if fields is not None:
        f = fields

    if M:
        if meta and hasattr(M, meta):
            m = getattr(model, meta)
            if hasattr(m, 'fields'):
                f = m.fields
            else:
                f = M._fields_list
        else:
            f = M._fields_list

    columns = []
    for x in f:
        if isinstance(x, str):  # so x is field_name
            field_name = x
        elif isinstance(x, dict):
            field_name = x['name']
        else:
            raise UliwebError("Field definition is not right, it should be just like str or {'name':xxx}")

        if '.' in field_name:
            model_name, field_name = field_name.split('.')
            M = get_model(model_name)

        if not M:
            raise UliwebError("Model can't be empty, because field name not has `model.` prefix")

        if field_name in M.c:
            columns.append(M.c[field_name])

    return columns
1357573
def get_models(self, columns=None):
        
        results = self.apply_scopes().get_query().get(columns).all()

        connection = self._model.get_connection_name()

        models = self._model.hydrate(results, connection)

        return models
870602
def get_column(self, column_name):
        
        frame = self._call_func()
        return DataFrameWrapper(self.name, frame,
                                copy_col=self.copy_col).get_column(column_name)
304842
def query_columns(conn, query, name=None):
    

    with conn.cursor(name) as cursor:
        cursor.itersize = 1
        cursor.execute(query)
        cursor.fetchmany(0)
        column_names = [column.name for column in cursor.description]

    return column_names
5838
def _get_columns(self):
        
        return [self] + [c for c in self.children
                         if isinstance(c, TreeViewColumn)]
424489
def get_models(self, columns=None):
        
        results = self._query.get(columns)

        connection = self._model.get_connection_name()

        return self._model.hydrate(results, connection).all()
1092848
def get_primary_key_columns(self):
        
        if not self.has_primary_key():
            raise DBALException('Table "%s" has no primary key.' % self.get_name())

        return self.get_primary_key().get_columns()
1217251
def column(self, col):
        
        if type(col) is str:
            for c in self._cols:
                if c.name == col:
                    return c
        else:
            return self._cols[col]
187900
def get_column(self, column):
		
		if column.lower() == 'q':
			return self.get_q
		else:
			return self.getColumnByName(column).asarray()
132209
def _get_select_columns(self, columns=None):
        
        if columns == ['*'] or columns is None:
            columns = ['%s.*' % self._related.get_table()]

        return columns + self._get_aliased_pivot_columns()
521578
def get(self, columns=None):
        
        models = self.get_models(columns)

        # If we actually found models we will also eager load any relationships that
        # have been specified as needing to be eager loaded, which will solve the
        # n+1 query issue for the developers to avoid running a lot of queries.
        if len(models) > 0:
            models = self.eager_load_relations(models)

        collection = self._model.new_collection(models)

        return collection
692009
def getSchema(cls):
        
        schema = []
        for name, atr in cls.__attributes__:
            atr = atr.__get__(None, cls)
            if isinstance(atr, SQLAttribute):
                schema.append((name, atr))
        cls.getSchema = staticmethod(lambda schema=schema: schema)
        return schema
1348534
public String getColumnClassName(int column) throws SQLException {
    Field field = getField(column);
    String result = connection.getTypeInfo().getJavaClass(field.getOID());

    if (result != null) {
      return result;
    }

    int sqlType = getSQLType(column);
    switch (sqlType) {
      case Types.ARRAY:
        return ("java.sql.Array");
      default:
        String type = getPGType(column);
        if ("unknown".equals(type)) {
          return ("java.lang.String");
        }
        return ("java.lang.Object");
    }
  }
458170
def get_query_columns(engine, query):
    
    con = engine.connect()
    result = con.execute(query).fetchone()
    values = list(result)
    cols_names = result.keys()
    cols = OrderedDict()
    for i in range(len(cols_names)):
        cols[cols_names[i]] = type(values[i]).__name__
    return cols
575745
def sqlalchemy(self, is_top=True):
        """"""
        table_def = self.table_backref_remover.sub('', self.table.__repr__())

        # inject UNIQUE constraints into table definition
        constraint_defs = []
        for constraint in self.table.constraints:
            if isinstance(constraint, sa.sql.schema.UniqueConstraint):
                col_list = ', '.join("'%s'" % c.name
                                     for c in constraint.columns)
                constraint_defs.append('UniqueConstraint(%s)' % col_list)
        if constraint_defs:
            constraint_defs = ',\n  '.join(constraint_defs) + ','
            table_def = table_def.replace('schema=None', '\n  ' + constraint_defs + 'schema=None')

        table_def = table_def.replace("MetaData(bind=None)", "metadata")
        table_def = table_def.replace("Column(", "\n  Column(")
        table_def = table_def.replace("schema=", "\n  schema=")
        result = [table_def, ]
        result.extend(c.sqlalchemy(is_top=False) for c in self.children.values())
        result = "\n%s = %s" % (self.table_name, "\n".join(result))
        if is_top:
            sqla_imports = set(self.capitalized_words.findall(table_def))
            sqla_imports &= set(dir(sa))
            sqla_imports = sorted(sqla_imports)
            result = self.sqlalchemy_setup_template % (
                ", ".join(sqla_imports), result, self.table.name)
            result = textwrap.dedent(result)
        return result
819851
def columns_classes(self):
        ''''''
        md = 12 / self.objects_per_row
        sm = None
        if self.objects_per_row > 2:
            sm = 12 / (self.objects_per_row / 2)
        return md, (sm or md), 12