// guessColTypes examines the set of strings and tries to work out what the
// column types could be.
guessColTypes examines the set of strings and tries to work out what the
column types could be.
// guessColTypes examines the set of strings and tries to work out what the // column types could be .
func guessColTypes(ci []ColInfo, rows [][]string) []ColType {
	if len(ci) == 0 {
		return nil
	}
	canBeTypes := make([]uint64, len(ci))
	initTypeSlice(canBeTypes)
	tryParse(canBeTypes, rows)
	types := make([]ColType, len(ci))
	for i, v := range canBeTypes {
		if ci[i].colType != ColTypeUnknown {
			types[i] = ci[i].colType
			continue
		}
		if canBeBool(v) {
			types[i] = ColTypeBool
		} else if canBeInt(v) {
			types[i] = ColTypeInt
		} else if canBeFloat(v) {
			types[i] = ColTypeFloat
		} else {
			types[i] = ColTypeString
		}
	}
	return types
}
func guessColTypes ( ci [ ] ColInfo , rows [ ] [ ] string ) [ ] ColType { if len ( ci ) == 0 { return nil } canBeTypes := make ( [ ] uint64 , len ( ci ) ) initTypeSlice ( canBeTypes ) tryParse ( canBeTypes , rows ) types := make ( [ ] ColType , len ( ci ) ) for i , v := range canBeTypes { if ci [ i ] . colType != ColTypeUnknown { types [ i ] = ci [ i ] . colType continue } if canBeBool ( v ) { types [ i ] = ColTypeBool } else if canBeInt ( v ) { types [ i ] = ColTypeInt } else if canBeFloat ( v ) { types [ i ] = ColTypeFloat } else { types [ i ] = ColTypeString } } return types }
guessColTypes examines the set of strings and tries to work out what the
column types could be.
guessColTypes examines the set of strings and tries to work out what the column types could be .