mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	refactor(storage_impl): split payment attempt models to domain + diesel (#2010)
Signed-off-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Co-authored-by: Mani Chandra <84711804+ThisIsMani@users.noreply.github.com> Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com> Co-authored-by: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com> Co-authored-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com> Co-authored-by: Prasunna Soppa <prasunna.soppa@juspay.in> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: DEEPANSHU BANSAL <41580413+deepanshu-iiitu@users.noreply.github.com> Co-authored-by: Arvind Patel <52006565+arvindpatel24@users.noreply.github.com> Co-authored-by: Jagan Elavarasan <jaganelavarasan@gmail.com> Co-authored-by: arvindpatel24 <arvind.patel@juspay.in> Co-authored-by: anji-reddy-j <125157119+anji-reddy-j@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com> Co-authored-by: Apoorv Dixit <64925866+apoorvdixit88@users.noreply.github.com> Co-authored-by: Pa1NarK <69745008+pixincreate@users.noreply.github.com>
This commit is contained in:
		| @ -1,6 +1,5 @@ | ||||
| use crate::{core::errors, routes::metrics}; | ||||
|  | ||||
| #[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 { | ||||
| @ -11,17 +10,6 @@ pub fn generate_hscan_pattern_for_refund(sk: &str) -> String { | ||||
|         .join("_") | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "kv_store")] | ||||
| /// Generates hscan field pattern. Suppose the field is pa_1234 it will generate | ||||
| /// pa_* | ||||
| pub fn generate_hscan_pattern_for_attempt(sk: &str) -> String { | ||||
|     sk.split('_') | ||||
|         .take(1) | ||||
|         .chain(["*"]) | ||||
|         .collect::<Vec<&str>>() | ||||
|         .join("_") | ||||
| } | ||||
|  | ||||
| // The first argument should be a future while the second argument should be a closure that returns a future for a database call | ||||
| pub async fn try_redis_get_else_try_database_get<F, RFut, DFut, T>( | ||||
|     redis_fut: RFut, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sampras Lopes
					Sampras Lopes