refactor(merchant_id): create domain type for merchant_id (#5408)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-07-24 19:18:25 +05:30
committed by GitHub
parent e18ea7a7ba
commit 7068fbfbe2
406 changed files with 3168 additions and 2633 deletions

View File

@ -354,6 +354,12 @@ pub trait ToSql<T: AnalyticsDataSource> {
fn to_sql(&self, table_engine: &TableEngine) -> error_stack::Result<String, ParsingError>;
}
impl<T: AnalyticsDataSource> ToSql<T> for &common_utils::id_type::MerchantId {
fn to_sql(&self, _table_engine: &TableEngine) -> error_stack::Result<String, ParsingError> {
Ok(self.get_string_repr().to_owned())
}
}
/// Implement `ToSql` on arrays of types that impl `ToString`.
macro_rules! impl_to_sql_for_to_string {
($($type:ty),+) => {