DecodeValuesBytesToStrings decode the raw bytes to strings for each columns. FIXME: Without the schema information, we can only decode the raw kind of the column. For instance, MysqlTime is internally saved as uint64.
(b []byte)
| 201 | // FIXME: Without the schema information, we can only decode the raw kind of |
| 202 | // the column. For instance, MysqlTime is internally saved as uint64. |
| 203 | func DecodeValuesBytesToStrings(b []byte) ([]string, error) { |
| 204 | var datumValues []string |
| 205 | for len(b) > 0 { |
| 206 | remain, d, e := codec.DecodeOne(b) |
| 207 | if e != nil { |
| 208 | return nil, e |
| 209 | } |
| 210 | str, e1 := d.ToString() |
| 211 | if e1 != nil { |
| 212 | return nil, e |
| 213 | } |
| 214 | datumValues = append(datumValues, str) |
| 215 | b = remain |
| 216 | } |
| 217 | return datumValues, nil |
| 218 | } |
| 219 | |
| 220 | // EncodeMetaKey encodes the key and field into meta key. |
| 221 | func EncodeMetaKey(key []byte, field []byte) kv.Key { |