DecodeColumnValue decodes data to a Datum according to the column info.
(data []byte, ft *types.FieldType, loc *time.Location)
| 436 | |
| 437 | // DecodeColumnValue decodes data to a Datum according to the column info. |
| 438 | func DecodeColumnValue(data []byte, ft *types.FieldType, loc *time.Location) (types.Datum, error) { |
| 439 | _, d, err := codec.DecodeOne(data) |
| 440 | if err != nil { |
| 441 | return types.Datum{}, errors.Trace(err) |
| 442 | } |
| 443 | colDatum, err := Unflatten(d, ft, loc) |
| 444 | if err != nil { |
| 445 | return types.Datum{}, errors.Trace(err) |
| 446 | } |
| 447 | return colDatum, nil |
| 448 | } |
| 449 | |
| 450 | // DecodeColumnValueWithDatum decodes data to an existing Datum according to the column info. |
| 451 | func DecodeColumnValueWithDatum(data []byte, ft *types.FieldType, loc *time.Location, result *types.Datum) error { |
searching dependent graphs…