// scanValues returns the types for scanning values from sql.Rows.
scanValues returns the types for scanning values from sql.Rows.
// scanValues returns the types for scanning values from sql . Rows .
func (*FactType) scanValues(columns []string) ([]interface{}, error) {
	values := make([]interface{}, len(columns))
	for i := range columns {
		switch columns[i] {
		case facttype.FieldBuiltIn:
			values[i] = &sql.NullBool{}
		case facttype.FieldID, facttype.FieldSlug, facttype.FieldValidation:
			values[i] = &sql.NullString{}
		case facttype.FieldCreatedAt, facttype.FieldUpdatedAt, facttype.FieldDeletedAt:
			values[i] = &sql.NullTime{}
		default:
			return nil, fmt.Errorf("unexpected column %q for type FactType", columns[i])
		}
	}
	return values, nil
}
func ( * FactType ) scanValues ( columns [ ] string ) ( [ ] interface { } , error ) { values := make ( [ ] interface { } , len ( columns ) ) for i := range columns { switch columns [ i ] { case facttype . FieldBuiltIn : values [ i ] = & sql . NullBool { } case facttype . FieldID , facttype . FieldSlug , facttype . FieldValidation : values [ i ] = & sql . NullString { } case facttype . FieldCreatedAt , facttype . FieldUpdatedAt , facttype . FieldDeletedAt : values [ i ] = & sql . NullTime { } default : return nil , fmt . Errorf ( " " , columns [ i ] ) } } return values , nil }
scanValues returns the types for scanning values from sql.Rows.
scanValues returns the types for scanning values from sql . Rows .