EncodeKey appends the encoded values to byte slice b, returns the appended slice. It guarantees the encoded value is in ascending order for comparison. For decimal type, datum must set datum's length and frac.
(loc *time.Location, b []byte, v ...types.Datum)
| 301 | // slice. It guarantees the encoded value is in ascending order for comparison. |
| 302 | // For decimal type, datum must set datum's length and frac. |
| 303 | func EncodeKey(loc *time.Location, b []byte, v ...types.Datum) ([]byte, error) { |
| 304 | return encode(loc, b, v, true) |
| 305 | } |
| 306 | |
| 307 | // EncodeValue appends the encoded values to byte slice b, returning the appended |
| 308 | // slice. It does not guarantee the order for comparison. |