Skip to main content

key_order_key

Function key_order_key 

Source
pub fn key_order_key(
    collection: u64,
    field: u64,
    key: &[u8],
    id: u64,
) -> Vec<u8> ⓘ
Expand description

One live-row entry. NUL is escaped as 00 ff, then 00 00 terminates the UTF-8 key before the row hash tie-breaker. This is order preserving (a key sorts before every longer key it prefixes), supports embedded NUL, and makes duplicate logical keys distinct physical rows rather than an overwritten value. The key bytes remain covering and need no payload read.