Skip to main content

children_prefixes

Function children_prefixes 

Source
async fn children_prefixes<D: PrimaryKeyProber>(
    db: &mut D,
    parent: &Prefix,
    budget: &mut u64,
) -> Result<Option<Vec<Prefix>>, MySqlError>
Expand description

Splits parent into prefixes one character longer. i.e. prefix “a”, upper bound “b” in table with pks: [“a”, “ab”, “abc”, “abd”, “af”, “bb”] will return: [“ab”, “af”].

Note: This will drop the key “a” on the floor, along with any keys sorting below their own prefix (below-space characters at this depth).

budget is decremented once per prefix probed. Returns None when it runs out, discarding the partial walk.