mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
db: Added Reverse lookup table (#147)
This commit is contained in:
10
crates/router/src/utils/db_utils.rs
Normal file
10
crates/router/src/utils/db_utils.rs
Normal 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("_")
|
||||
}
|
||||
Reference in New Issue
Block a user