IsTempIndexKey checks whether the input key is for a temp index.
(indexKey []byte)
| 1302 | |
| 1303 | // IsTempIndexKey checks whether the input key is for a temp index. |
| 1304 | func IsTempIndexKey(indexKey []byte) (isTemp bool) { |
| 1305 | indexIDKey := indexKey[prefixLen : prefixLen+8] |
| 1306 | indexID := codec.DecodeCmpUintToInt(binary.BigEndian.Uint64(indexIDKey)) |
| 1307 | tempIndexID := int64(TempIndexPrefix) | indexID |
| 1308 | return tempIndexID == indexID |
| 1309 | } |
| 1310 | |
| 1311 | // TempIndexValueFlag is the flag of temporary index value. |
| 1312 | type TempIndexValueFlag byte |
no test coverage detected