Maps the given ResultSet column label to its ResultSet column index.
963149
@Override
    public int findColumn(String columnLabel) throws SQLException {
        checkClosed();
        try {
            return table.getColumnIndex(columnLabel) + 1;
        } catch (IllegalArgumentException iax) {
            throw SQLError.get(iax, SQLError.COLUMN_NOT_FOUND, columnLabel);
        } catch (Exception x) {
            throw SQLError.get(x);
        }
    }
473142
public String columnLabelOrName(ResultSetMetaData rsmd, int col) throws SQLException{
		String columnName = rsmd.getColumnLabel(col);
		if (null == columnName || 0 == columnName.length()) {
			columnName = rsmd.getColumnName(col);
		}
		return columnName;
	}
189735
public void addToIndexedColumnList(IndexInfo indexInfo)
    {
        ColumnInfo columnInfo = new ColumnInfo();
        columnInfo.setColumnName(indexInfo.getColumnName());
        if (getEmbeddedColumnMetadatas().isEmpty()
                || !getEmbeddedColumnMetadatas().get(0).getColumns().contains(columnInfo))
        {
            if (!columnToBeIndexed.contains(indexInfo))
            {
                columnToBeIndexed.add(indexInfo);
            }
        }
    }
1360853
public DJLineChartBuilder addSerie(AbstractColumn column, String label) {
		getDataset().addSerie(column, label);
		return this;
	}
1245999
void switchTwoColumns(int columnIndex, int columnToIndex) {
        checkForInit();
        int cellData = mColumnWidths[columnToIndex];
        mColumnWidths[columnToIndex] = mColumnWidths[columnIndex];
        mColumnWidths[columnIndex] = cellData;
    }
289142
private void ensureIndex(DS session, EntityTypeMetadata<NodeMetadata<L>> entityTypeMetadata,
            IndexedPropertyMethodMetadata<IndexedPropertyMetadata> indexedProperty) {
        if (indexedProperty != null) {
            IndexedPropertyMetadata datastoreMetadata = indexedProperty.getDatastoreMetadata();
            if (datastoreMetadata.isCreate()) {
                L label = entityTypeMetadata.getDatastoreMetadata().getDiscriminator();
                PrimitivePropertyMethodMetadata<PropertyMetadata> propertyMethodMetadata = indexedProperty.getPropertyMethodMetadata();
                if (label != null && propertyMethodMetadata != null) {
                    ensureIndex(session, label, propertyMethodMetadata, datastoreMetadata.isUnique());
                }
            }
        }
    }
439433
private int viewIndexForColumn(TableColumn aColumn) {
        TableColumnModel cm = table.getColumnModel();

        for (int column = 0; column < cm.getColumnCount(); column++) {
            if (cm.getColumn(column) == aColumn) {
                return column;
            }
        }

        return -1;
    }
466414
public final Element mapRow(final ResultSet rs, final String columnName) throws SQLException {
        final Element element = new Element();
        List<String> l;
        try {
            l = ParseUtils.postgresROW2StringList(rs.getString(columnName));
        } catch (RowParserException e) {
            throw new SQLException(e);
        }

        element.setRowList(l);
        return element;
    }
777157
public static Object getValue(final ResultSet resultSet, final int columnIndex) throws SQLException {
        Object result = getValueByColumnType(resultSet, columnIndex);
        return resultSet.wasNull() ? null : result;
    }
786413
public DJXYBarChartBuilder addSerie(AbstractColumn column, String label) {
		getDataset().addSerie(column, label);
		return this;
	}
281515
private void assign(HashMap<String, DBIDs> labelMap, String label, DBIDRef id) {
    if(labelMap.containsKey(label)) {
      DBIDs exist = labelMap.get(label);
      if(exist instanceof DBID) {
        ModifiableDBIDs n = DBIDUtil.newHashSet();
        n.add((DBID) exist);
        n.add(id);
        labelMap.put(label, n);
      }
      else {
        assert (exist instanceof HashSetModifiableDBIDs);
        assert (exist.size() > 1);
        ((ModifiableDBIDs) exist).add(id);
      }
    }
    else {
      labelMap.put(label, DBIDUtil.deref(id));
    }
  }
1249766
static void fixColumns(List<ParsedColInfo> src, Map<Integer, Pair<String, Integer>> m) {
       // change to display column index-keyed map
       src.forEach(ci -> {
          if (m.containsKey(ci.m_index)) {
             Pair<String, Integer> viewInfo = m.get(ci.m_index);
              ci.updateColName(viewInfo.getFirst(), ci.m_alias);
          }
       });
    }
1242861
public void updateColumnMappings() {
        columnMapping = new HashMap<>();
        int realIdx = 0;
        int renderCol = 0;
        for (final SheetColumn column : getColumns()) {
            if (column.isRendered()) {
                columnMapping.put(renderCol, realIdx);
                renderCol++;
            }
            realIdx++;
        }
    }
352222
def sql_index(self,index_name,column_names,unique=True):
        """"""
        if type(column_names) == str:
            column_names = [column_names]
        try:
            if len(column_names) == 0:
                raise TypeError
        except TypeError:
            raise ValueError("Provide a list of column names for an index.")
        if unique:
            UNIQUE = "UNIQUE"
        else:
            UNIQUE = ""
        table_name = self.name
        columns = ",".join(column_names)
        SQL = """CREATE %(UNIQUE)s INDEX %(index_name)s ON %(table_name)s """\
            """(%(columns)s)""" % locals()
        self.sql(SQL)
223437
public DJScatterChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) {
		getDataset().addSerie(column, labelExpression);
		return this;
	}
134390
private static Set<String> getIndexedColumnSetForTable(Table table) {
        HashSet<String> columns = new HashSet<>();

        for (Index index : table.getIndexes()) {
            for (ColumnRef colRef : index.getColumns()) {
                columns.add(colRef.getColumn().getTypeName());
            }
        }

        return columns;
    }
1325884
def _index_resized(self, col, old_width, new_width):
        """"""
        self.table_index.setColumnWidth(col, new_width)
        self._update_layout()