mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-04 22:19:10 +08:00
refactor(router): add parent caller function for DB (#3838)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use diesel_models::routing_algorithm as routing_storage;
|
||||
use error_stack::IntoReport;
|
||||
use router_env::{instrument, tracing};
|
||||
use storage_impl::mock_db::MockDb;
|
||||
|
||||
use crate::{
|
||||
@ -60,6 +61,7 @@ pub trait RoutingAlgorithmInterface {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl RoutingAlgorithmInterface for Store {
|
||||
#[instrument(skip_all)]
|
||||
async fn insert_routing_algorithm(
|
||||
&self,
|
||||
routing_algorithm: routing_storage::RoutingAlgorithm,
|
||||
@ -72,6 +74,7 @@ impl RoutingAlgorithmInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn find_routing_algorithm_by_profile_id_algorithm_id(
|
||||
&self,
|
||||
profile_id: &str,
|
||||
@ -88,6 +91,7 @@ impl RoutingAlgorithmInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn find_routing_algorithm_by_algorithm_id_merchant_id(
|
||||
&self,
|
||||
algorithm_id: &str,
|
||||
@ -104,6 +108,7 @@ impl RoutingAlgorithmInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn find_routing_algorithm_metadata_by_algorithm_id_profile_id(
|
||||
&self,
|
||||
algorithm_id: &str,
|
||||
@ -120,6 +125,7 @@ impl RoutingAlgorithmInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn list_routing_algorithm_metadata_by_profile_id(
|
||||
&self,
|
||||
profile_id: &str,
|
||||
@ -135,6 +141,7 @@ impl RoutingAlgorithmInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn list_routing_algorithm_metadata_by_merchant_id(
|
||||
&self,
|
||||
merchant_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user