// DecodeHandleFromRowKey decodes the string form a row key and returns an int64. func DecodeHandleFromRowKey(rk string) (int64, error) { vals, err := kv.DecodeValue([]byte(rk)) if err != nil { return 0, errors.Trace(err) } return vals[1].(int64), nil }
// DecodeValue implements table.Table DecodeValue interface. func (t *Table) DecodeValue(data []byte, col *column.Col) (interface{}, error) { values, err := kv.DecodeValue(data) if err != nil { return nil, errors.Trace(err) } return t.unflatten(values[0], col) }