// NewColumn creates a new Column.
180521
func NewColumn(hd string) Column {
	return &column{
		dataType: STRING,
		header:   hd,
		size:     0,
		data:     []Value{},
	}
}
310230
func (a *SetBreakpointByURLArgs) SetColumnNumber(columnNumber int) *SetBreakpointByURLArgs {
	a.ColumnNumber = &columnNumber
	return a
}
1337471
func (handle *Context) NewRNN(hiddenSize int, numLayers int, dropout *Dropout, inputMode RNNInputMode, direction DirectionMode, mode RNNMode, algo RNNAlgo, dataType DataType) (retVal *RNN, err error) {
	var internal C.cudnnRNNDescriptor_t
	if err := result(C.cudnnCreateRNNDescriptor(&internal)); err != nil {
		return nil, err
	}

	if err := result(C.cudnnSetRNNDescriptor(handle.internal, internal, C.int(hiddenSize), C.int(numLayers), dropout.internal, inputMode.C(), direction.C(), mode.C(), algo.C(), dataType.C())); err != nil {
		return nil, err
	}

	retVal = &RNN{
		internal: internal,

		hiddenSize:        hiddenSize,
		layers:            numLayers,
		dropoutDescriptor: dropout,
		inputMode:         inputMode,
		directionMode:     direction,
		mode:              mode,
		algo:              algo,
		dataType:          dataType,
		matrixMathType:    DefaultMath,
	}
	runtime.SetFinalizer(retVal, destroyRNN)
	return retVal, nil
}
667902
func NewBindableColumn(b *BaseColumn, ctype api.SQLSMALLINT, bufSize int) *BindableColumn {
	b.CType = ctype
	c := &BindableColumn{BaseColumn: b, Size: bufSize}
	l := 8 // always use small starting buffer
	if c.Size > l {
		l = c.Size
	}
	c.Buffer = make([]byte, l)
	return c
}
949236
func (a *ArgType) hascolumn(fields []*Field, name string) bool {
	for _, f := range fields {
		if f.Col.ColumnName == name {
			return true
		}
	}

	return false
}
1155790
func New(headers []string, data interface{}) (*SimpleTable, error) {
	table := SimpleTable{
		headers:      headers,
		rows:         [][]string{},
		columnWidths: nil,
	}

	dv := reflect.ValueOf(data)
	for n := 0; n < dv.Len(); n++ {
		item := dv.Index(n)
		row := []string{}
		t := item.Type()
		if t.Kind() == reflect.Slice {
			row = convertSlice(item)
		} else if t.Kind() == reflect.Struct {
			row = convertStruct(item)
		} else {
			return nil, errTypeNotConvertible
		}

		if table.columnWidths == nil {
			table.columnWidths = make([]int, len(row))
			for i, column := range headers {
				if len(column) > table.columnWidths[i] {
					table.columnWidths[i] = len(column)
				}
			}
		}
		for i, column := range row {
			if len(column) > table.columnWidths[i] {
				table.columnWidths[i] = len(column)
			}
		}
		table.rows = append(table.rows, row)
	}

	return &table, nil
}
1009390
func (s *StorageDescriptor) SetColumns(v []*Column) *StorageDescriptor {
	s.Columns = v
	return s
}
610416
func newResultColumn(expr *sqlparser.AliasedExpr, origin builder) *resultColumn {
	rc := &resultColumn{
		alias: expr.As,
	}
	if col, ok := expr.Expr.(*sqlparser.ColName); ok {
		// If no alias was specified, then the base name
		// of the column becomes the alias.
		if rc.alias.IsEmpty() {
			rc.alias = col.Name
		}
		// If it's a col it should already have metadata.
		rc.column = col.Metadata.(*column)
	} else {
		// We don't generate an alias if the expression is non-trivial.
		// Just to be safe, generate an anonymous column for the expression.
		rc.column = &column{
			origin: origin,
		}
	}
	return rc
}
707752
func NewColumnsWithAlias(tableName string, tableAlias string) Columns {
	return Columns{
		lock:       &sync.RWMutex{},
		Cols:       map[string]*Column{},
		TableName:  tableName,
		TableAlias: tableAlias,
	}
}
66903
func (ints *Ints) ScanColumn(colIdx int, colName string, rd types.Reader, n int) error {
	num, err := types.ScanInt64(rd, n)
	if err != nil {
		return err
	}

	*ints = append(*ints, num)
	return nil
}
554828
func (me *DefaultAdapter) InsertColumnsSql(buf *SqlBuilder, cols ColumnList) error {
	buf.WriteRune(space_rune)
	buf.WriteRune(left_paren_rune)
	if err := me.Literal(buf, cols); err != nil {
		return err
	}
	buf.WriteRune(right_paren_rune)
	return nil
}
838860
func (node Columns) FindColumn(col ColIdent) int {
	for i, colName := range node {
		if colName.Equal(col) {
			return i
		}
	}
	return -1
}
353034
func NewRow(columns ...uint64) *Row {
	r := &Row{}
	for _, i := range columns {
		r.SetBit(i)
	}
	return r
}
1361391
func (f fields) HasColumn(column string) bool {
	for _, field := range f {
		// TODO what about table name
		if field.column == column {
			return true
		}
	}
	return false
}
518682
func (c *Columns) Add(col *Column) error {
	for i := range c.columns {
		if c.columns[i] == col {
			return ErrorAlreadyExists
		}
	}
	if c.FindByName(col.Name) != nil {
		return ErrorAlreadyExists
	}

	c.columns = append(c.columns, col)
	return nil
}
989792
func NewError(line, column int, err string) *Error {
	return &Error{
		Line:   line,
		Column: column,
		Err:    err,
	}
}
974826
func Int64Column(w int, v int64) string {
	s := strconv.FormatInt(v, 10)
	return Column(w, s)
}