Return the field names (channel names) from dbf file fn. With
    usecols, return only names corresponding to the integers in
    usecols.
194406
def channel_names(fn, usecols=None):
    """"""

    with open(fn, 'rb') as fo:
        names = dbfreader(fo).next()

    return usecols and [names[i] for i in usecols] or names
1099809
def get_field_mappings(self, field):
        """"""
        retdict = {}
        retdict['indexed'] = False
        retdict['analyzed'] = False
        for (key, val) in iteritems(field):
            if key in self.mappings:
                if (key == 'type' and
                    (val == "long" or
                     val == "integer" or
                     val == "double" or
                     val == "float")):
                    val = "number"
                # self.pr_dbg("\t\t\tkey: %s" % key)
                # self.pr_dbg("\t\t\t\tval: %s" % val)
                retdict[key] = val
            if key == 'index' and val != "no":
                retdict['indexed'] = True
                # self.pr_dbg("\t\t\tkey: %s" % key)
                # self.pr_dbg("\t\t\t\tval: %s" % val)
                if val == "analyzed":
                    retdict['analyzed'] = True
        return retdict
257949
def get_column_names(context, query):
        """"""
        table_info = context.sql_client.send(query)
        if 'fields' in table_info:
            return table_info['fields']

        return None
1137711
def get_fields(self, db_name, table_name):
    
    self.send_get_fields(db_name, table_name)
    return self.recv_get_fields()
416144
def getFields(cls) :
		""""""
		s = set(cls.columns.keys())
		s.remove('json')
		s.remove('raba_id')
		return s
1316923
def get_columns(context, query):
        """"""
        table_info = context.sql_client.send(query)
        if 'fields' in table_info:
            return Column.from_sql_api_fields(table_info['fields'])

        return None
779477
def filenames(self):
        
        fns = set()
        for fn2var in self._type2filename2variable.values():
            fns.update(fn2var.keys())
        return sorted(fns)
1167039
def index_name(model, *field_names, **kwargs):
    
    if not len(field_names):
        raise ValueError("At least one field name required")
    using = kwargs.pop('using', DEFAULT_DB_ALIAS)
    if len(kwargs):
        raise ValueError("The only supported keyword argument is 'using'")

    existing_fields = {field.name: field for field in model._meta.fields}
    fields = [existing_fields[name] for name in field_names
              if name in existing_fields]

    if len(fields) != len(field_names):
        unfound_names = set(field_names) - {field.name for field in fields}
        raise ValueError("Fields do not exist: " + ",".join(unfound_names))
    column_names = tuple(field.column for field in fields)
    list_sql = get_list_sql(column_names)

    with connections[using].cursor() as cursor:
        cursor.execute(
            """SELECT `INDEX_NAME`, `SEQ_IN_INDEX`, `COLUMN_NAME`
               FROM INFORMATION_SCHEMA.STATISTICS
               WHERE TABLE_SCHEMA = DATABASE() AND
                     TABLE_NAME = %s AND
                     COLUMN_NAME IN {list_sql}
               ORDER BY `INDEX_NAME`, `SEQ_IN_INDEX` ASC
            """.format(list_sql=list_sql),
            (model._meta.db_table,) + column_names,
        )
        indexes = defaultdict(list)
        for index_name, _, column_name in cursor.fetchall():
            indexes[index_name].append(column_name)

    indexes_by_columns = {tuple(v): k for k, v in indexes.items()}
    try:
        return indexes_by_columns[column_names]
    except KeyError:
        raise KeyError("There is no index on (" + ",".join(field_names) + ")")
1231417
def getFieldNames( dbid = nil, lowerOrUppercase = "", exclude_built_in_fields = false )
      fieldNames = []
      dbid ||= @dbid
      getSchema(dbid)
      if @fields
         @fields.each_element_with_attribute( "id" ){ |f|
            next if exclude_built_in_fields and isBuiltInField?(f.attributes["id"])
            if f.name == "field"
               if lowerOrUppercase == "lowercase"
                  fieldNames << f.elements[ "label" ].text.downcase
               elsif lowerOrUppercase == "uppercase"
                  fieldNames << f.elements[ "label" ].text.upcase
               else
                  fieldNames << f.elements[ "label" ].text.dup
               end
            end
         }
      end
      fieldNames
    end
270747
def get_table_columns(dbconn, tablename):
    
    cur = dbconn.cursor()
    cur.execute("PRAGMA table_info('%s');" % tablename)
    info = cur.fetchall()
    cols = [(i[1], i[2]) for i in info]
    return cols
980754
def _get_csv_fieldnames(csv_reader):
    """"""
    fieldnames = []
    for row in csv_reader:
        for col in row:
            field = (
                col.strip()
                .replace('"', "")
                .replace(" ", "")
                .replace("(", "")
                .replace(")", "")
                .lower()
            )
            fieldnames.append(field)
        if "id" in fieldnames:
            break
        else:
            # this is not a row with fieldnames
            del fieldnames[:]
    if not fieldnames:
        return None
    # remove trailing unannotated fields
    while True:
        field = fieldnames.pop()
        if field:
            fieldnames.append(field)
            break
    # name unannotated fields
    suffix = 1
    for index, field in enumerate(fieldnames):
        if not field:
            fieldnames[index] = "field{}".format(suffix)
            suffix += 1

    return fieldnames
721981
def get_field_list(fields, schema):
  
  # If the fields weren't supplied get them from the schema.
  if isinstance(fields, list):
    return fields
  if isinstance(fields, basestring) and fields != '*':
    return fields.split(',')
  if not schema:
    return []
  return [f['name'] for f in schema._bq_schema if f['type'] != 'RECORD']
912516
def fields_from_names(fields, names=None):
    

    if names is None:
        return fields
    if isinstance(names, string_types):
        names = [names]
    aliases_to_names = aliases_from_fields(fields)
    names_to_aliases = dict(zip(aliases_to_names.values(),
        aliases_to_names.keys()))
    outfields = {}
    for name in names:
        try:
            outfields[name] = fields[name]
        except KeyError:
            if name in aliases_to_names:
                key = (name, aliases_to_names[name])
            elif name in names_to_aliases:
                key = (names_to_aliases[name], name)
            else:
                raise KeyError('default fields has no field %s' % name)
            outfields[key] = fields[key]
    return outfields
645881
def get_field_names(ctx):
    """"""
    # this does not include labels and literals, only rule names and token names
    # TODO: check ANTLR parser template for full exclusion list
    fields = [
        field
        for field in type(ctx).__dict__
        if not field.startswith("__")
        and field not in ["accept", "enterRule", "exitRule", "getRuleIndex", "copyFrom"]
    ]
    return fields
738879
def _fieldnames_to_colnames(model_cls, fieldnames):
        """"""
        get_field = model_cls._meta.get_field
        fields = map(get_field, fieldnames)
        return {f.column for f in fields}
836858
def get_fields(self):
        
        columns = self.columns
        model = self.model
        fields = []
        for col in columns:
            if isinstance(col, (str, unicode)):
                v = col.split('.')
                if len(v) > 1:
                    field = get_model(v[0], engine_name=self.model.get_engine_name(),
                                      signal=False).properties(v[1])
                else:
                    field = model.properties[col]
            elif isinstance(col, Column):
                field = get_model(col.table.name, engine_name=self.model.get_engine_name(),
                                  signal=False).properties[col.name]
            else:
                field = col
            
            fields.append(field)
        
        return fields
119210
def getDbNames(self):
		""""""

		request = []
		request.append(uu({'-dbnames': '' }))

		result = self._doRequest(request)
		result = FMResultset.FMResultset(result)

		dbNames = []
		for dbName in result.resultset:
			dbNames.append(string.lower(dbName['DATABASE_NAME']))

		return dbNames