// HasColumn to check if has column
558634
func (scope *Scope) HasColumn(column string) bool {
	for _, field := range scope.GetStructFields() {
		if field.IsNormal && (field.Name == column || field.DBName == column) {
			return true
		}
	}
	return false
}
883861
public boolean hasColumn(String columnName) {
        Integer idx = columnNamesIndex.get(columnName);
        return idx != null;
    }
1035657
func (m *Table) HasField(name string) bool {
	if _, ok := m.FieldMap[name]; ok {
		return true
	}
	return false
}
40811
func (b *SqliteBuilder) DropColumn(table, col string) *Query {
	q := b.NewQuery("")
	q.LastError = errors.New("SQLite does not support dropping columns")
	return q
}
699334
func (b *InsertBuilder) NamedColumn(column, name string) *InsertBuilder {
	b.columns = append(b.columns, initializer{
		column: column,
		value:  param(name),
	})
	return b
}
282591
func isStringColumn(c string) bool {
	return strings.HasPrefix(c, "VARCHAR") || strings.HasPrefix(c, "TEXT")
}
207769
func HasReason(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyReason).(string)
	return ok
}
527664
func (d *Datastore) Has(key ds.Key) (exists bool, err error) {
	return d.child.Has(d.ConvertKey(key))
}
687437
func (b *BaseBuilder) AddColumn(table, col, typ string) *Query {
	sql := fmt.Sprintf("ALTER TABLE %v ADD %v %v", b.db.QuoteTableName(table), b.db.QuoteColumnName(col), typ)
	return b.NewQuery(sql)
}
734100
func (d *Dataset) DeleteColumn(header string) error {
	colIndex := indexOfColumn(header, d)
	if colIndex == -1 {
		return ErrInvalidColumnIndex
	}
	d.cols--
	d.headers = append(d.headers[:colIndex], d.headers[colIndex+1:]...)
	// remove the column
	for i := range d.data {
		d.data[i] = append(d.data[i][:colIndex], d.data[i][colIndex+1:]...)
	}
	return nil
}
714908
func (idx *Index) AddColumn(name string, cardinality uint64) {
	idx.Columns = append(idx.Columns, sqlparser.NewColIdent(name))
	if cardinality == 0 {
		cardinality = uint64(len(idx.Cardinality) + 1)
	}
	idx.Cardinality = append(idx.Cardinality, cardinality)
}
483423
func (t *Table) AddColumn(name string, width int, aling columns.Align) *Table {
	_, err := t.Columns.NewColumn(name, name, width, aling)
	if err != nil {
		//fix it
		panic(err)
	}
	return t
}
186147
func (em *EventManager) HasEvent(m string) bool {
	var ok bool
	em.ro.RLock()
	_, ok = em.events[m]
	em.ro.RUnlock()
	return ok
}
1354724
func ColumnClauseFromColumn(c ColumnElem) ColumnClause {
	return ColumnClause{table: c.table, name: c.name}
}
655409
func (ts *TableSpec) AddColumn(cd *ColumnDefinition) {
	ts.Columns = append(ts.Columns, cd)
}
1248301
func (c *Column) IsPKHandleColumn(tbInfo *model.TableInfo) bool {
	return mysql.HasPriKeyFlag(c.Flag) && tbInfo.PKIsHandle
}
1210602
func (a *ArgType) hasfield(fields []*Field, name string) bool {
	for _, f := range fields {
		if f.Name == name {
			return true
		}
	}

	return false
}