Find the available definition URLs for the columns in a table.
508469
def find_definition_urls(self, set_of_links):
        """"""
        definition_dict = {}
        re_link_name = re.compile('.*p_table_name=(\w+)&p_topic.*')
        for link in set_of_links:
            if link.startswith('http://'):
                table_dict = {}
                html = urlopen(link).read()
                doc = lh.fromstring(html)
                unordered_list = doc.cssselect('#main ul')[-1]
                for li in unordered_list.iterchildren():
                    a = li.find('a')
                    table_dict.update({a.text: a.attrib['href']})
                link_name = re_link_name.sub(r'\1', link).upper()
                definition_dict.update({link_name: table_dict})
        return definition_dict
712567
def columns(self):
        
        return Index(np.array(self._gather_column_names(), dtype=np.bytes_), np.dtype(np.bytes_))
880338
private Object[] findIdsByColumn(String tableName, String columnName, Object columnValue)
    {
        Object connection = null;

        try
        {
            connection = getConnection();
            String valueAsStr = PropertyAccessorHelper.getString(columnValue);

            Set<String> results = null;

            if (resource != null && resource.isActive())
            {
                Response response = ((Transaction) connection).zrangeByScore(getHashKey(tableName, columnName),
                        getDouble(valueAsStr), getDouble(valueAsStr));
                // ((Transaction) connection).exec();
                ((RedisTransaction) resource).onExecute(((Transaction) connection));

                results = (Set<String>) response.get();
            }
            else
            {
                results = ((Jedis) connection).zrangeByScore(getHashKey(tableName, columnName), getDouble(valueAsStr),
                        getDouble(valueAsStr));

            }
            if (results != null)
            {
                return results.toArray(new Object[0]);
            }

        }
        finally
        {
            onCleanup(connection);
        }

        return null;
    }
525777
def fetch_column_names(cls,
                           db: DATABASE_SUPPORTER_FWD_REF,
                           table: str) -> List[str]:
        """"""
        raise RuntimeError(_MSG_NO_FLAVOUR)
724607
def columns(self):
        """"""

        try:
            # For resources that are metapack packages.
            r = self.expanded_url.resource.columns()
            return list(r)
        except AttributeError as e:

            pass

        return self.schema_columns
720915
private function getColumnTypes(): void
  {
    $rows = DataLayer::getAllTableColumns();
    foreach ($rows as $row)
    {
      $key = '@'.$row['table_name'].'.'.$row['column_name'].'%type@';
      $key = strtoupper($key);

      $value = $row['column_type'];
      if (isset($row['character_set_name'])) $value .= ' character set '.$row['character_set_name'];

      $this->replacePairs[$key] = $value;
    }

    $this->io->text(sprintf('Selected %d column types for substitution', sizeof($rows)));
  }
1321108
function getIdColumns(idColumnNames, columns) {
  if (!defined(idColumnNames)) {
    return [];
  }
  return idColumnNames.map(name => getColumnWithNameIdOrIndex(name, columns));
}
695392
def visibleColumns(self):
        
        return [self.columnOf(c) for c in range(self.columnCount()) \
                if not self.isColumnHidden(c)]
43463
def column_names(self, table):
      """"""

      table_info = self.execute(
        u'PRAGMA table_info(%s)' % quote(table))
      return (column['name'] for column in table_info)
1061637
def optional(cls):
        
        columns = []
        for column in cls.__table__.columns:  # pylint: disable=no-member
            if column.nullable:
                columns.append(column.name)
        return columns
820634
private void readDefinitions()
   {
      for (MapRow row : m_tables.get("TTL"))
      {
         Integer id = row.getInteger("DEFINITION_ID");
         List<MapRow> list = m_definitions.get(id);
         if (list == null)
         {
            list = new ArrayList<MapRow>();
            m_definitions.put(id, list);
         }
         list.add(row);
      }

      List<MapRow> rows = m_definitions.get(WBS_FORMAT_ID);
      if (rows != null)
      {
         m_wbsFormat = new SureTrakWbsFormat(rows.get(0));
      }
   }
863029
def _get_select_columns(self, columns=None):
        
        if columns == ["*"] or columns is None:
            columns = ["%s.*" % self._related.get_table()]

        return columns + ["%s.%s" % (self._parent.get_table(), self._first_key)]
65674
def get_column_definition_all(self, table):
        """"""
        # Get complete table definition
        col_defs = self.get_table_definition(table).split('\n')

        # Return only column definitions
        return [i[0:-1].strip().replace(',', ', ') for i in col_defs if i.strip().startswith('`')]
1197071
function findColumns (pgColumns, schemaName, tableName) {
  return pgColumns
    .filter(o => o.table_schema === schemaName && o.table_name === tableName)
    .reduce((columns, col) => {
      const columnInfo = {
        columnDefault: col.column_default,
        isNullable: col.is_nullable,
        dataType: col.data_type,
        characterMaximumLength: col.character_maximum_length,
        numericScale: col.numeric_scale,
        comment: col.column_comment
      }
      if (columnInfo.dataType === 'ARRAY') {
        columnInfo.array = true
        columnInfo.dataType = col.array_element_type.slice(1)
      } else {
        columnInfo.array = false
      }
      columns[col.column_name] = columnInfo
      return columns
    },
    {}
    )
}
846163
def get_cols(self, lines):
        
        re_name_def = re.compile(
            r'^\s*#\s+'  # whitespace and comment marker
            r'(?P<colnumber>[0-9]+)\s+-\s+'  # number of column
            r'(?P<colname>(.*))'
        )
        self.names = []
        include_cuts = False
        for line in lines:
            if not line:  # ignore empty lines in header (windows)
                continue
            if not line.startswith('# '):  # end of header lines
                break
            if line.startswith('# -/+'):
                include_cuts = True
            else:
                match = re_name_def.search(line)
                if match:
                    self.names.append(match.group('colname').rstrip())

        if not self.names:
            raise core.InconsistentTableError(
                'No column names found in cWB header')

        if include_cuts:
            self.cols = [  # pylint: disable=attribute-defined-outside-init
                core.Column(name='selection cut 1'),
                core.Column(name='selection cut 2'),
            ]
        else:
            self.cols = []  # pylint: disable=attribute-defined-outside-init
        for name in self.names:
            col = core.Column(name=name)
            self.cols.append(col)
248393
def get_column_listing(self, table):
        
        sql = self._grammar.compile_column_exists()
        database = self._connection.get_database_name()
        table = self._connection.get_table_prefix() + table

        results = self._connection.select(sql, [database, table])

        return self._connection.get_post_processor().process_column_listing(results)
1306086
def make_column_suffixes(self):
        
        if self.column_suffixes:
            return self.column_suffixes

        if len(self.columns) == 0:
            return ()

        elif len(self.columns) == 1:
            if self.formatters:
                return '_raw',
            else:
                return '',

        elif len(self.columns) == 2:
            if self.formatters:
                return '_id', '_raw',
            else:
                return '_id', '',
        else:
            raise BadIngredient(
                'column_suffixes must be supplied if there is '
                'more than one column'
            )