db: Added Reverse lookup table (#147)

This commit is contained in:
Kartikeya Hegde
2022-12-19 18:50:05 +05:30
committed by GitHub
parent d6a3e508e2
commit 87fed68519
51 changed files with 937 additions and 201 deletions

View File

@ -0,0 +1,10 @@
#[cfg(feature = "kv_store")]
/// Generates hscan field pattern. Suppose the field is pa_1234_ref_1211 it will generate
/// pa_1234_ref_*
pub fn generate_hscan_pattern_for_refund(sk: &str) -> String {
sk.split('_')
.take(3)
.chain(["*"])
.collect::<Vec<&str>>()
.join("_")
}