Does the column exist?
357366
def column_exists(self, tablename: str, column: str) -> bool:
        """"""
        sql = """
            SELECT COUNT(*)
            FROM information_schema.columns
            WHERE table_name=?
            AND column_name=?
            AND table_schema={}
        """.format(self.get_current_schema_expr())
        row = self.fetchone(sql, tablename, column)
        return True if row[0] >= 1 else False
623466
def indexcol(self, col: str):
        
        try:
            self.df[col] = self.df.index.values
        except Exception as e:
            self.err(e)
            return
        self.ok("Column", col, "added from the index")
691414
private function hasColumnConfiguration($column)
    {
        $columns = $this->options[self::GRID_PARAM_COLUMNS];

        foreach ($columns as $configuration) {
            // By default a column is considered as visible
            if (!isset($configuration[self::GRID_PARAM_HIDDEN])) {
                $configuration[self::GRID_PARAM_HIDDEN] = false;
            }

            // Find linearly (must exists and must not be hidden)
            if ($column == $configuration[self::GRID_PARAM_COLUMN] && $configuration[self::GRID_PARAM_HIDDEN] != true) {
                return true;
            }
        }

        // Not found by default
        return false;
    }
560230
function(oColumn) {
			var oTable = oColumn.getParent();
			if (!oTable || !oTable.getEnableColumnReordering()) {
				// Column reordering is not active at all
				return false;
			}

			var iCurrentIndex = oTable.indexOfColumn(oColumn);

			if (iCurrentIndex < oTable.getComputedFixedColumnCount() || iCurrentIndex < oTable._iFirstReorderableIndex) {
				// No movement of fixed columns or e.g. the first column in the TreeTable
				return false;
			}

			if (TableColumnUtils.hasHeaderSpan(oColumn)
				|| TableColumnUtils.getParentSpannedColumns(oTable, oColumn.getId()).length != 0) {
				// No movement if the column is spanned by an other column or itself defines a span
				return false;
			}
			return true;
		}
1126416
def columns(self):
        """"""
        res = [col['name'] for col in self.column_definitions]
        res.extend([col['name'] for col in self.foreign_key_definitions])
        return res
454989
def resolve_column(self, ref):
    ""
    if isinstance(ref, sqparse2.AttrX):
      if ref.parent.name not in self:
        raise ScopeUnkError('unk table or table alias', ref.parent.name)
      return ref.parent.name, ref.attr.name
    elif isinstance(ref, sqparse2.NameX):
      matches = set()
      for name, target in self.names.items():
        if isinstance(target, SyntheticTable):
          if ref.name in target.columns(self):
            matches.add(name)
        elif isinstance(target, table.Table):
          try: target.get_column(ref.name)
          except KeyError: pass
          else: matches.add(name)
        else:
          raise TypeError('expected SyntheticTable', type(target), target)
      if not matches: raise ScopeUnkError(ref)
      elif len(matches) > 1: raise ScopeCollisionError(matches, ref)
      else: return list(matches)[0], ref.name
    else:
      raise TypeError('unexpected', type(ref), ref)
479108
def _add_column(self, column):
        
        self._columns.append(column)
        if self._blist:
            self._data.append(blist([None] * len(self._index)))
        else:
            self._data.append([None] * len(self._index))
1340263
def add_column(self, name, type_name, options=None):
        
        column = Column(name, type_name, options)

        self._add_column(column)

        return column
459456
def addColumn(self, col, index=None):
        ''
        if col:
            if index is None:
                index = len(self.columns)
            col.sheet = self
            self.columns.insert(index, col)
            return col
579284
def ncontains(self, column, value):
        
        df = self.df[self.df[column].str.contains(value) == False]
        if df is None:
            self.err("Can not select contained data")
            return
        self.df = df
640547
function(column){
			var index = -1;
			var j = 0;
			for(var i=0;i < this.gridCompColumnArr.length;i++){
				if(this.gridCompColumnArr[i] == column){
					if(!($('#' + this.options.id + '_header').find('th').eq(i).css('display') == 'none')){
						index = j;
					}
					break;
				}
				if(!($('#' + this.options.id + '_header').find('th').eq(i).css('display') == 'none')){
					j++;
				}
			}
			return index;
		}
322635
private void checkColumn(int column) throws SQLException {

        if (column < 1 || column > columnCount) {
            throw Util.sqlException(ErrorCode.JDBC_COLUMN_NOT_FOUND,
                                    String.valueOf(column));
        }
    }
1064240
protected function checkColumns()
	{
		$success = false;

		if ( ! empty($this->form_input['columns']) )
		{
			$success = true;
		}
		else
		{
			$this->appendError("No_columns","No column name setted: you need to fill atleast one \"column_\" field");
		}

		return $success;
	}
233063
def resort(self, columnName):
        
        csc = self.currentSortColumn
        newSortColumn = self.columns[columnName]
        if newSortColumn is None:
            raise Unsortable('column %r has no sort attribute' % (columnName,))
        if csc is newSortColumn:
            self.isAscending = not self.isAscending
        else:
            self.currentSortColumn = newSortColumn
            self.isAscending = True
        return self.isAscending
1256146
def column_exists(cr, table, column):
    
    cr.execute(
        'SELECT count(attname) FROM pg_attribute '
        'WHERE attrelid = '
        '( SELECT oid FROM pg_class WHERE relname = %s ) '
        'AND attname = %s',
        (table, column))
    return cr.fetchone()[0] == 1
650691
def addColumn(self, column):
        
        column.setSchema(self)
        self.__columns[column.name()] = column
43811
function isSortableColumn(index$$1) {
      var sortable = this.columns[index$$1].sortable;
      var isSortable = typeof sortable === 'boolean' ? sortable : this.sortable;
      return isSortable;
    }