id
stringlengths
20
153
type
stringclasses
1 value
granularity
stringclasses
14 values
content
stringlengths
16
84.3k
metadata
dict
hyperswitch_method_diesel_models_PaymentMethod_find_by_global_customer_id_merchant_id_status
clm
method
// hyperswitch/crates/diesel_models/src/query/payment_method.rs // impl for PaymentMethod pub async fn find_by_global_customer_id_merchant_id_status( conn: &PgPooledConn, customer_id: &common_utils::id_type::GlobalCustomerId, merchant_id: &common_utils::id_type::MerchantId, status: storage_enums::PaymentMethodStatus, limit: Option<i64>, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::customer_id .eq(customer_id.to_owned()) .and(dsl::merchant_id.eq(merchant_id.to_owned())) .and(dsl::status.eq(status)), limit, None, Some(dsl::last_used_at.desc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PaymentMethod", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_global_customer_id_merchant_id_status", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_PaymentMethod_find_by_global_customer_id
clm
method
// hyperswitch/crates/diesel_models/src/query/payment_method.rs // impl for PaymentMethod pub async fn find_by_global_customer_id( conn: &PgPooledConn, customer_id: &common_utils::id_type::GlobalCustomerId, limit: Option<i64>, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::customer_id.eq(customer_id.to_owned()), limit, None, Some(dsl::last_used_at.desc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PaymentMethod", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_global_customer_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_PaymentMethod_update_with_id
clm
method
// hyperswitch/crates/diesel_models/src/query/payment_method.rs // impl for PaymentMethod pub async fn update_with_id( self, conn: &PgPooledConn, payment_method: payment_method::PaymentMethodUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Table, _, _, _, >(conn, pm_id.eq(self.id.to_owned()), payment_method) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PaymentMethod", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_with_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_PaymentMethod_find_by_fingerprint_id
clm
method
// hyperswitch/crates/diesel_models/src/query/payment_method.rs // impl for PaymentMethod pub async fn find_by_fingerprint_id( conn: &PgPooledConn, fingerprint_id: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::locker_fingerprint_id.eq(fingerprint_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PaymentMethod", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_fingerprint_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccountNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccountNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<MerchantConnectorAccount> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccountNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_update
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn update( self, conn: &PgPooledConn, merchant_connector_account: MerchantConnectorAccountUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.id.to_owned(), merchant_connector_account, ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_delete_by_merchant_id_merchant_connector_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn delete_by_merchant_id_merchant_connector_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, merchant_connector_id: &common_utils::id_type::MerchantConnectorAccountId, ) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::merchant_connector_id.eq(merchant_connector_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_merchant_id_merchant_connector_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_merchant_id_connector
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_merchant_id_connector( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, connector_label: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::connector_label.eq(connector_label.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_connector", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_profile_id_connector_name
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_profile_id_connector_name( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, connector_name: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::profile_id .eq(profile_id.to_owned()) .and(dsl::connector_name.eq(connector_name.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_profile_id_connector_name", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_merchant_id_connector_name
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_merchant_id_connector_name( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, connector_name: &str, ) -> StorageResult<Vec<Self>> { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::connector_name.eq(connector_name.to_owned())), None, None, None, ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_connector_name", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_merchant_id_merchant_connector_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_merchant_id_merchant_connector_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, merchant_connector_id: &common_utils::id_type::MerchantConnectorAccountId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::merchant_connector_id.eq(merchant_connector_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_merchant_connector_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_merchant_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, get_disabled: bool, ) -> StorageResult<Vec<Self>> { if get_disabled { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::merchant_id.eq(merchant_id.to_owned()), None, None, Some(dsl::created_at.asc()), ) .await } else { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::disabled.eq(false)), None, None, None, ) .await } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_list_enabled_by_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn list_enabled_by_profile_id( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, connector_type: common_enums::ConnectorType, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::profile_id .eq(profile_id.to_owned()) .and(dsl::disabled.eq(false)) .and(dsl::connector_type.eq(connector_type)), None, None, Some(dsl::created_at.asc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_enabled_by_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_update
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn update( self, conn: &PgPooledConn, merchant_connector_account: MerchantConnectorAccountUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.id.to_owned(), merchant_connector_account, ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_merchant_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, get_disabled: bool, ) -> StorageResult<Vec<Self>> { if get_disabled { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::merchant_id.eq(merchant_id.to_owned()), None, None, Some(dsl::created_at.asc()), ) .await } else { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::disabled.eq(false)), None, None, None, ) .await } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_list_enabled_by_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn list_enabled_by_profile_id( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, connector_type: common_enums::ConnectorType, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::profile_id .eq(profile_id.to_owned()) .and(dsl::disabled.eq(false)) .and(dsl::connector_type.eq(connector_type)), None, None, Some(dsl::created_at.asc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_enabled_by_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_delete_by_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn delete_by_id( conn: &PgPooledConn, id: &common_utils::id_type::MerchantConnectorAccountId, ) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>(conn, dsl::id.eq(id.to_owned())) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_find_by_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn find_by_id( conn: &PgPooledConn, id: &common_utils::id_type::MerchantConnectorAccountId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::id.eq(id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_MerchantConnectorAccount_list_by_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/merchant_connector_account.rs // impl for MerchantConnectorAccount pub async fn list_by_profile_id( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::profile_id.eq(profile_id.to_owned()), None, None, Some(dsl::created_at.asc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "MerchantConnectorAccount", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_by_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ConfigNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/configs.rs // impl for ConfigNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Config> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ConfigNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Config_find_by_key
clm
method
// hyperswitch/crates/diesel_models/src/query/configs.rs // impl for Config pub async fn find_by_key(conn: &PgPooledConn, key: &str) -> StorageResult<Self> { generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>(conn, key.to_owned()).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Config", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_key", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Config_update_by_key
clm
method
// hyperswitch/crates/diesel_models/src/query/configs.rs // impl for Config pub async fn update_by_key( conn: &PgPooledConn, key: &str, config_update: ConfigUpdate, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, key.to_owned(), ConfigUpdateInternal::from(config_update), ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => { generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>( conn, key.to_owned(), ) .await } _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Config", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_key", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Config_delete_by_key
clm
method
// hyperswitch/crates/diesel_models/src/query/configs.rs // impl for Config pub async fn delete_by_key(conn: &PgPooledConn, key: &str) -> StorageResult<Self> { generics::generic_delete_one_with_result::<<Self as HasTable>::Table, _, _>( conn, dsl::key.eq(key.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Config", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_key", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_BlocklistFingerprintNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist_fingerprint.rs // impl for BlocklistFingerprintNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<BlocklistFingerprint> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "BlocklistFingerprintNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_BlocklistFingerprint_find_by_merchant_id_fingerprint_id
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist_fingerprint.rs // impl for BlocklistFingerprint pub async fn find_by_merchant_id_fingerprint_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, fingerprint_id: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::fingerprint_id.eq(fingerprint_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "BlocklistFingerprint", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_fingerprint_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Self> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_find_by_algorithm_id_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn find_by_algorithm_id_merchant_id( conn: &PgPooledConn, algorithm_id: &common_utils::id_type::RoutingId, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::algorithm_id .eq(algorithm_id.to_owned()) .and(dsl::merchant_id.eq(merchant_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_algorithm_id_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_find_by_algorithm_id_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn find_by_algorithm_id_profile_id( conn: &PgPooledConn, algorithm_id: &common_utils::id_type::RoutingId, profile_id: &common_utils::id_type::ProfileId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::algorithm_id .eq(algorithm_id.to_owned()) .and(dsl::profile_id.eq(profile_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_algorithm_id_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_find_metadata_by_algorithm_id_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn find_metadata_by_algorithm_id_profile_id( conn: &PgPooledConn, algorithm_id: &common_utils::id_type::RoutingId, profile_id: &common_utils::id_type::ProfileId, ) -> StorageResult<RoutingProfileMetadata> { Self::table() .select(( dsl::profile_id, dsl::algorithm_id, dsl::name, dsl::description, dsl::kind, dsl::created_at, dsl::modified_at, dsl::algorithm_for, )) .filter( dsl::algorithm_id .eq(algorithm_id.to_owned()) .and(dsl::profile_id.eq(profile_id.to_owned())), ) .limit(1) .load_async::<( common_utils::id_type::ProfileId, common_utils::id_type::RoutingId, String, Option<String>, enums::RoutingAlgorithmKind, PrimitiveDateTime, PrimitiveDateTime, enums::TransactionType, )>(conn) .await .change_context(DatabaseError::Others)? .into_iter() .next() .ok_or(report!(DatabaseError::NotFound)) .map( |( profile_id, algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, )| { RoutingProfileMetadata { profile_id, algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, } }, ) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_metadata_by_algorithm_id_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_list_metadata_by_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn list_metadata_by_profile_id( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, limit: i64, offset: i64, ) -> StorageResult<Vec<RoutingProfileMetadata>> { Ok(Self::table() .select(( dsl::algorithm_id, dsl::profile_id, dsl::name, dsl::description, dsl::kind, dsl::created_at, dsl::modified_at, dsl::algorithm_for, )) .filter(dsl::profile_id.eq(profile_id.to_owned())) .limit(limit) .offset(offset) .load_async::<( common_utils::id_type::RoutingId, common_utils::id_type::ProfileId, String, Option<String>, enums::RoutingAlgorithmKind, PrimitiveDateTime, PrimitiveDateTime, enums::TransactionType, )>(conn) .await .change_context(DatabaseError::Others)? .into_iter() .map( |( algorithm_id, profile_id, name, description, kind, created_at, modified_at, algorithm_for, )| { RoutingProfileMetadata { algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, profile_id, } }, ) .collect()) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_metadata_by_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_list_metadata_by_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn list_metadata_by_merchant_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, limit: i64, offset: i64, ) -> StorageResult<Vec<RoutingProfileMetadata>> { Ok(Self::table() .select(( dsl::profile_id, dsl::algorithm_id, dsl::name, dsl::description, dsl::kind, dsl::created_at, dsl::modified_at, dsl::algorithm_for, )) .filter(dsl::merchant_id.eq(merchant_id.to_owned())) .limit(limit) .offset(offset) .order(dsl::modified_at.desc()) .load_async::<( common_utils::id_type::ProfileId, common_utils::id_type::RoutingId, String, Option<String>, enums::RoutingAlgorithmKind, PrimitiveDateTime, PrimitiveDateTime, enums::TransactionType, )>(conn) .await .change_context(DatabaseError::Others)? .into_iter() .map( |( profile_id, algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, )| { RoutingProfileMetadata { profile_id, algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, } }, ) .collect()) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_metadata_by_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RoutingAlgorithm_list_metadata_by_merchant_id_transaction_type
clm
method
// hyperswitch/crates/diesel_models/src/query/routing_algorithm.rs // impl for RoutingAlgorithm pub async fn list_metadata_by_merchant_id_transaction_type( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, transaction_type: &enums::TransactionType, limit: i64, offset: i64, ) -> StorageResult<Vec<RoutingProfileMetadata>> { Ok(Self::table() .select(( dsl::profile_id, dsl::algorithm_id, dsl::name, dsl::description, dsl::kind, dsl::created_at, dsl::modified_at, dsl::algorithm_for, )) .filter(dsl::merchant_id.eq(merchant_id.to_owned())) .filter(dsl::algorithm_for.eq(transaction_type.to_owned())) .limit(limit) .offset(offset) .order(dsl::modified_at.desc()) .load_async::<( common_utils::id_type::ProfileId, common_utils::id_type::RoutingId, String, Option<String>, enums::RoutingAlgorithmKind, PrimitiveDateTime, PrimitiveDateTime, enums::TransactionType, )>(conn) .await .change_context(DatabaseError::Others)? .into_iter() .map( |( profile_id, algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, )| { RoutingProfileMetadata { profile_id, algorithm_id, name, description, kind, created_at, modified_at, algorithm_for, } }, ) .collect()) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RoutingAlgorithm", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_metadata_by_merchant_id_transaction_type", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_SubscriptionNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/subscription.rs // impl for SubscriptionNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Subscription> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "SubscriptionNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Subscription_find_by_merchant_id_subscription_id
clm
method
// hyperswitch/crates/diesel_models/src/query/subscription.rs // impl for Subscription pub async fn find_by_merchant_id_subscription_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, id: String, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::id.eq(id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Subscription", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_subscription_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Subscription_update_subscription_entry
clm
method
// hyperswitch/crates/diesel_models/src/query/subscription.rs // impl for Subscription pub async fn update_subscription_entry( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, id: String, subscription_update: SubscriptionUpdate, ) -> StorageResult<Self> { generics::generic_update_with_results::< <Self as HasTable>::Table, SubscriptionUpdate, _, _, >( conn, dsl::id .eq(id.to_owned()) .and(dsl::merchant_id.eq(merchant_id.to_owned())), subscription_update, ) .await? .first() .cloned() .ok_or_else(|| { report!(errors::DatabaseError::NotFound) .attach_printable("Error while updating subscription entry") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Subscription", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_subscription_entry", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_AddressNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for AddressNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Address> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "AddressNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_find_by_address_id
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn find_by_address_id(conn: &PgPooledConn, address_id: &str) -> StorageResult<Self> { generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>(conn, address_id.to_owned()) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_address_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_update_by_address_id
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn update_by_address_id( conn: &PgPooledConn, address_id: String, address: AddressUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, address_id.clone(), address, ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NotFound => { Err(error.attach_printable("Address with the given ID doesn't exist")) } errors::DatabaseError::NoFieldsToUpdate => { generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>( conn, address_id.clone(), ) .await } _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_address_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_update
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn update( self, conn: &PgPooledConn, address_update_internal: AddressUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Table, _, _, _, >( conn, dsl::address_id.eq(self.address_id.clone()), address_update_internal, ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_delete_by_address_id
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn delete_by_address_id( conn: &PgPooledConn, address_id: &str, ) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>( conn, dsl::address_id.eq(address_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_address_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_update_by_merchant_id_customer_id
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn update_by_merchant_id_customer_id( conn: &PgPooledConn, customer_id: &common_utils::id_type::CustomerId, merchant_id: &common_utils::id_type::MerchantId, address: AddressUpdateInternal, ) -> StorageResult<Vec<Self>> { generics::generic_update_with_results::<<Self as HasTable>::Table, _, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::customer_id.eq(customer_id.to_owned())), address, ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_merchant_id_customer_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_find_by_merchant_id_payment_id_address_id
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn find_by_merchant_id_payment_id_address_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, payment_id: &common_utils::id_type::PaymentId, address_id: &str, ) -> StorageResult<Self> { match generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::payment_id .eq(payment_id.to_owned()) .and(dsl::merchant_id.eq(merchant_id.to_owned())) .and(dsl::address_id.eq(address_id.to_owned())), ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NotFound => { generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>( conn, address_id.to_owned(), ) .await } _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_payment_id_address_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Address_find_optional_by_address_id
clm
method
// hyperswitch/crates/diesel_models/src/query/address.rs // impl for Address pub async fn find_optional_by_address_id( conn: &PgPooledConn, address_id: &str, ) -> StorageResult<Option<Self>> { generics::generic_find_by_id_optional::<<Self as HasTable>::Table, _, _>( conn, address_id.to_owned(), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Address", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_optional_by_address_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_BlocklistLookupNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist_lookup.rs // impl for BlocklistLookupNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<BlocklistLookup> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "BlocklistLookupNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_BlocklistLookup_find_by_merchant_id_fingerprint
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist_lookup.rs // impl for BlocklistLookup pub async fn find_by_merchant_id_fingerprint( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, fingerprint: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::fingerprint.eq(fingerprint.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "BlocklistLookup", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_fingerprint", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_BlocklistLookup_delete_by_merchant_id_fingerprint
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist_lookup.rs // impl for BlocklistLookup pub async fn delete_by_merchant_id_fingerprint( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, fingerprint: &str, ) -> StorageResult<Self> { generics::generic_delete_one_with_result::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::fingerprint.eq(fingerprint.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "BlocklistLookup", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_merchant_id_fingerprint", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_BlocklistNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist.rs // impl for BlocklistNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Blocklist> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "BlocklistNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Blocklist_find_by_merchant_id_fingerprint_id
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist.rs // impl for Blocklist pub async fn find_by_merchant_id_fingerprint_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, fingerprint_id: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::fingerprint_id.eq(fingerprint_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Blocklist", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_fingerprint_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Blocklist_list_by_merchant_id_data_kind
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist.rs // impl for Blocklist pub async fn list_by_merchant_id_data_kind( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, data_kind: common_enums::BlocklistDataKind, limit: i64, offset: i64, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::data_kind.eq(data_kind.to_owned())), Some(limit), Some(offset), Some(dsl::created_at.desc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Blocklist", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_by_merchant_id_data_kind", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Blocklist_list_by_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist.rs // impl for Blocklist pub async fn list_by_merchant_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<Vec<Self>> { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::merchant_id.eq(merchant_id.to_owned()), None, None, Some(dsl::created_at.desc()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Blocklist", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_by_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Blocklist_delete_by_merchant_id_fingerprint_id
clm
method
// hyperswitch/crates/diesel_models/src/query/blocklist.rs // impl for Blocklist pub async fn delete_by_merchant_id_fingerprint_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, fingerprint_id: &str, ) -> StorageResult<Self> { generics::generic_delete_one_with_result::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::fingerprint_id.eq(fingerprint_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Blocklist", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_merchant_id_fingerprint_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_UserNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for UserNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<User> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "UserNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_User_find_by_user_email
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for User pub async fn find_by_user_email( conn: &PgPooledConn, user_email: &pii::Email, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, users_dsl::email.eq(user_email.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "User", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_user_email", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_User_find_by_user_id
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for User pub async fn find_by_user_id(conn: &PgPooledConn, user_id: &str) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, users_dsl::user_id.eq(user_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "User", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_user_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_User_update_by_user_id
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for User pub async fn update_by_user_id( conn: &PgPooledConn, user_id: &str, user_update: UserUpdate, ) -> StorageResult<Self> { generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Table, _, _, _, >( conn, users_dsl::user_id.eq(user_id.to_owned()), UserUpdateInternal::from(user_update), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "User", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_user_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_User_update_by_user_email
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for User pub async fn update_by_user_email( conn: &PgPooledConn, user_email: &pii::Email, user_update: UserUpdate, ) -> StorageResult<Self> { generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Table, _, _, _, >( conn, users_dsl::email.eq(user_email.to_owned()), UserUpdateInternal::from(user_update), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "User", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_user_email", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_User_delete_by_user_id
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for User pub async fn delete_by_user_id(conn: &PgPooledConn, user_id: &str) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>( conn, users_dsl::user_id.eq(user_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "User", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_user_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_User_find_users_by_user_ids
clm
method
// hyperswitch/crates/diesel_models/src/query/user.rs // impl for User pub async fn find_users_by_user_ids( conn: &PgPooledConn, user_ids: Vec<String>, ) -> StorageResult<Vec<Self>> { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as diesel::Table>::PrimaryKey, _, >(conn, users_dsl::user_id.eq_any(user_ids), None, None, None) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "User", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_users_by_user_ids", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_UserRoleNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/user_role.rs // impl for UserRoleNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UserRole> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "UserRoleNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_LockerMockUpNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/locker_mock_up.rs // impl for LockerMockUpNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<LockerMockUp> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "LockerMockUpNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_LockerMockUp_find_by_card_id
clm
method
// hyperswitch/crates/diesel_models/src/query/locker_mock_up.rs // impl for LockerMockUp pub async fn find_by_card_id(conn: &PgPooledConn, card_id: &str) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::card_id.eq(card_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "LockerMockUp", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_card_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_LockerMockUp_delete_by_card_id
clm
method
// hyperswitch/crates/diesel_models/src/query/locker_mock_up.rs // impl for LockerMockUp pub async fn delete_by_card_id(conn: &PgPooledConn, card_id: &str) -> StorageResult<Self> { generics::generic_delete_one_with_result::<<Self as HasTable>::Table, _, _>( conn, dsl::card_id.eq(card_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "LockerMockUp", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_card_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_RefundNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/refund.rs // impl for RefundNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Refund> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "RefundNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Refund_find_by_merchant_id_connector_transaction_id
clm
method
// hyperswitch/crates/diesel_models/src/query/refund.rs // impl for Refund pub async fn find_by_merchant_id_connector_transaction_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, connector_transaction_id: &str, ) -> StorageResult<Vec<Self>> { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::connector_transaction_id.eq(connector_transaction_id.to_owned())), None, None, None, ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Refund", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_connector_transaction_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Refund_update_with_id
clm
method
// hyperswitch/crates/diesel_models/src/query/refund.rs // impl for Refund pub async fn update_with_id( self, conn: &PgPooledConn, refund: RefundUpdate, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.id.to_owned(), RefundUpdateInternal::from(refund), ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Refund", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_with_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Refund_find_by_global_id
clm
method
// hyperswitch/crates/diesel_models/src/query/refund.rs // impl for Refund pub async fn find_by_global_id( conn: &PgPooledConn, id: &common_utils::id_type::GlobalRefundId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::id.eq(id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Refund", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_global_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTrackerNew_insert_process
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTrackerNew pub async fn insert_process(self, conn: &PgPooledConn) -> StorageResult<ProcessTracker> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTrackerNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert_process", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTracker_update
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTracker pub async fn update( self, conn: &PgPooledConn, process: ProcessTrackerUpdate, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.id.clone(), ProcessTrackerUpdateInternal::from(process), ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTracker", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTracker_update_process_status_by_ids
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTracker pub async fn update_process_status_by_ids( conn: &PgPooledConn, task_ids: Vec<String>, task_update: ProcessTrackerUpdate, ) -> StorageResult<usize> { generics::generic_update::<<Self as HasTable>::Table, _, _>( conn, dsl::id.eq_any(task_ids), ProcessTrackerUpdateInternal::from(task_update), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTracker", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_process_status_by_ids", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTracker_find_process_by_id
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTracker pub async fn find_process_by_id(conn: &PgPooledConn, id: &str) -> StorageResult<Option<Self>> { generics::generic_find_by_id_optional::<<Self as HasTable>::Table, _, _>( conn, id.to_owned(), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTracker", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_process_by_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTracker_find_processes_by_time_status
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTracker pub async fn find_processes_by_time_status( conn: &PgPooledConn, time_lower_limit: PrimitiveDateTime, time_upper_limit: PrimitiveDateTime, status: enums::ProcessTrackerStatus, limit: Option<i64>, version: enums::ApiVersion, ) -> StorageResult<Vec<Self>> { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::schedule_time .between(time_lower_limit, time_upper_limit) .and(dsl::status.eq(status)) .and(dsl::version.eq(version)), limit, None, None, ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTracker", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_processes_by_time_status", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTracker_find_processes_to_clean
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTracker pub async fn find_processes_to_clean( conn: &PgPooledConn, time_lower_limit: PrimitiveDateTime, time_upper_limit: PrimitiveDateTime, runner: &str, limit: usize, ) -> StorageResult<Vec<Self>> { let mut x: Vec<Self> = generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::schedule_time .between(time_lower_limit, time_upper_limit) .and(dsl::status.eq(enums::ProcessTrackerStatus::ProcessStarted)) .and(dsl::runner.eq(runner.to_owned())), None, None, None, ) .await?; x.sort_by(|a, b| a.schedule_time.cmp(&b.schedule_time)); x.truncate(limit); Ok(x) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTracker", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_processes_to_clean", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProcessTracker_reinitialize_limbo_processes
clm
method
// hyperswitch/crates/diesel_models/src/query/process_tracker.rs // impl for ProcessTracker pub async fn reinitialize_limbo_processes( conn: &PgPooledConn, ids: Vec<String>, schedule_time: PrimitiveDateTime, ) -> StorageResult<usize> { generics::generic_update::<<Self as HasTable>::Table, _, _>( conn, dsl::status .eq(enums::ProcessTrackerStatus::ProcessStarted) .and(dsl::id.eq_any(ids)), ( dsl::status.eq(enums::ProcessTrackerStatus::Processing), dsl::schedule_time.eq(schedule_time), ), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProcessTracker", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "reinitialize_limbo_processes", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ProfileNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for ProfileNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Profile> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ProfileNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Profile_update_by_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for Profile pub async fn update_by_profile_id( self, conn: &PgPooledConn, business_profile: ProfileUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.get_id().to_owned(), business_profile, ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Profile", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Profile_find_by_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for Profile pub async fn find_by_profile_id( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl_identifier.eq(profile_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Profile", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Profile_find_by_merchant_id_profile_id
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for Profile pub async fn find_by_merchant_id_profile_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, profile_id: &common_utils::id_type::ProfileId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl_identifier.eq(profile_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Profile", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_merchant_id_profile_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Profile_find_by_profile_name_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for Profile pub async fn find_by_profile_name_merchant_id( conn: &PgPooledConn, profile_name: &str, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::profile_name .eq(profile_name.to_owned()) .and(dsl::merchant_id.eq(merchant_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Profile", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_profile_name_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Profile_list_profile_by_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for Profile pub async fn list_profile_by_merchant_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<Vec<Self>> { generics::generic_filter::< <Self as HasTable>::Table, _, <<Self as HasTable>::Table as Table>::PrimaryKey, _, >( conn, dsl::merchant_id.eq(merchant_id.to_owned()), None, None, None, ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Profile", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_profile_by_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Profile_delete_by_profile_id_merchant_id
clm
method
// hyperswitch/crates/diesel_models/src/query/business_profile.rs // impl for Profile pub async fn delete_by_profile_id_merchant_id( conn: &PgPooledConn, profile_id: &common_utils::id_type::ProfileId, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>( conn, dsl_identifier .eq(profile_id.to_owned()) .and(dsl::merchant_id.eq(merchant_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Profile", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_profile_id_merchant_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_PaymentLinkNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/payment_link.rs // impl for PaymentLinkNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<PaymentLink> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PaymentLinkNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_PaymentLink_find_link_by_payment_link_id
clm
method
// hyperswitch/crates/diesel_models/src/query/payment_link.rs // impl for PaymentLink pub async fn find_link_by_payment_link_id( conn: &PgPooledConn, payment_link_id: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::payment_link_id.eq(payment_link_id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PaymentLink", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_link_by_payment_link_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_InvoiceNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/invoice.rs // impl for InvoiceNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Invoice> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "InvoiceNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Invoice_find_invoice_by_id_invoice_id
clm
method
// hyperswitch/crates/diesel_models/src/query/invoice.rs // impl for Invoice pub async fn find_invoice_by_id_invoice_id( conn: &PgPooledConn, id: String, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::id.eq(id.to_owned()), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Invoice", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_invoice_by_id_invoice_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Invoice_update_invoice_entry
clm
method
// hyperswitch/crates/diesel_models/src/query/invoice.rs // impl for Invoice pub async fn update_invoice_entry( conn: &PgPooledConn, id: String, invoice_update: InvoiceUpdate, ) -> StorageResult<Self> { generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Table, _, _, _, >(conn, dsl::id.eq(id.to_owned()), invoice_update) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Invoice", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_invoice_entry", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Invoice_list_invoices_by_subscription_id
clm
method
// hyperswitch/crates/diesel_models/src/query/invoice.rs // impl for Invoice pub async fn list_invoices_by_subscription_id( conn: &PgPooledConn, subscription_id: String, limit: Option<i64>, offset: Option<i64>, order_by_ascending_order: bool, ) -> StorageResult<Vec<Self>> { if order_by_ascending_order { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::subscription_id.eq(subscription_id.to_owned()), limit, offset, Some(dsl::created_at.asc()), ) .await } else { generics::generic_filter::<<Self as HasTable>::Table, _, _, _>( conn, dsl::subscription_id.eq(subscription_id.to_owned()), limit, offset, Some(dsl::created_at.desc()), ) .await } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Invoice", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "list_invoices_by_subscription_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_Invoice_get_invoice_by_subscription_id_connector_invoice_id
clm
method
// hyperswitch/crates/diesel_models/src/query/invoice.rs // impl for Invoice pub async fn get_invoice_by_subscription_id_connector_invoice_id( conn: &PgPooledConn, subscription_id: String, connector_invoice_id: common_utils::id_type::InvoiceId, ) -> StorageResult<Option<Self>> { generics::generic_find_one_optional::<<Self as HasTable>::Table, _, _>( conn, dsl::subscription_id .eq(subscription_id.to_owned()) .and(dsl::connector_invoice_id.eq(connector_invoice_id.to_owned())), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "Invoice", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "get_invoice_by_subscription_id_connector_invoice_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_GenericLinkNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for GenericLinkNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<GenericLinkState> { generics::generic_insert(conn, self) .await .and_then(|res: GenericLink| { GenericLinkState::try_from(res) .change_context(db_errors::DatabaseError::Others) .attach_printable("failed to parse generic link data from DB") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "GenericLinkNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_GenericLinkNew_insert_pm_collect_link
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for GenericLinkNew pub async fn insert_pm_collect_link( self, conn: &PgPooledConn, ) -> StorageResult<PaymentMethodCollectLink> { generics::generic_insert(conn, self) .await .and_then(|res: GenericLink| { PaymentMethodCollectLink::try_from(res) .change_context(db_errors::DatabaseError::Others) .attach_printable("failed to parse payment method collect link data from DB") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "GenericLinkNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert_pm_collect_link", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_GenericLinkNew_insert_payout_link
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for GenericLinkNew pub async fn insert_payout_link(self, conn: &PgPooledConn) -> StorageResult<PayoutLink> { generics::generic_insert(conn, self) .await .and_then(|res: GenericLink| { PayoutLink::try_from(res) .change_context(db_errors::DatabaseError::Others) .attach_printable("failed to parse payout link data from DB") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "GenericLinkNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert_payout_link", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_GenericLink_find_generic_link_by_link_id
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for GenericLink pub async fn find_generic_link_by_link_id( conn: &PgPooledConn, link_id: &str, ) -> StorageResult<GenericLinkState> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::link_id.eq(link_id.to_owned()), ) .await .and_then(|res: Self| { GenericLinkState::try_from(res) .change_context(db_errors::DatabaseError::Others) .attach_printable("failed to parse generic link data from DB") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "GenericLink", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_generic_link_by_link_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_GenericLink_find_pm_collect_link_by_link_id
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for GenericLink pub async fn find_pm_collect_link_by_link_id( conn: &PgPooledConn, link_id: &str, ) -> StorageResult<PaymentMethodCollectLink> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::link_id.eq(link_id.to_owned()), ) .await .and_then(|res: Self| { PaymentMethodCollectLink::try_from(res) .change_context(db_errors::DatabaseError::Others) .attach_printable("failed to parse payment method collect link data from DB") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "GenericLink", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_pm_collect_link_by_link_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_GenericLink_find_payout_link_by_link_id
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for GenericLink pub async fn find_payout_link_by_link_id( conn: &PgPooledConn, link_id: &str, ) -> StorageResult<PayoutLink> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::link_id.eq(link_id.to_owned()), ) .await .and_then(|res: Self| { PayoutLink::try_from(res) .change_context(db_errors::DatabaseError::Others) .attach_printable("failed to parse payout link data from DB") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "GenericLink", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_payout_link_by_link_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_PayoutLink_update_payout_link
clm
method
// hyperswitch/crates/diesel_models/src/query/generic_link.rs // impl for PayoutLink pub async fn update_payout_link( self, conn: &PgPooledConn, payout_link_update: PayoutLinkUpdate, ) -> StorageResult<Self> { generics::generic_update_with_results::<<Self as HasTable>::Table, _, _, _>( conn, dsl::link_id.eq(self.link_id.to_owned()), GenericLinkUpdateInternal::from(payout_link_update), ) .await .and_then(|mut payout_links| { payout_links .pop() .ok_or(error_stack::report!(db_errors::DatabaseError::NotFound)) }) .or_else(|error| match error.current_context() { db_errors::DatabaseError::NoFieldsToUpdate => Ok(self), _ => Err(error), }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "PayoutLink", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_payout_link", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_UnifiedTranslationsNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/unified_translations.rs // impl for UnifiedTranslationsNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UnifiedTranslations> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "UnifiedTranslationsNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_UnifiedTranslations_find_by_unified_code_unified_message_locale
clm
method
// hyperswitch/crates/diesel_models/src/query/unified_translations.rs // impl for UnifiedTranslations pub async fn find_by_unified_code_unified_message_locale( conn: &PgPooledConn, unified_code: String, unified_message: String, locale: String, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::unified_code .eq(unified_code) .and(dsl::unified_message.eq(unified_message)) .and(dsl::locale.eq(locale)), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "UnifiedTranslations", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "find_by_unified_code_unified_message_locale", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_UnifiedTranslations_update_by_unified_code_unified_message_locale
clm
method
// hyperswitch/crates/diesel_models/src/query/unified_translations.rs // impl for UnifiedTranslations pub async fn update_by_unified_code_unified_message_locale( conn: &PgPooledConn, unified_code: String, unified_message: String, locale: String, data: UnifiedTranslationsUpdate, ) -> StorageResult<Self> { generics::generic_update_with_results::< <Self as HasTable>::Table, UnifiedTranslationsUpdateInternal, _, _, >( conn, dsl::unified_code .eq(unified_code) .and(dsl::unified_message.eq(unified_message)) .and(dsl::locale.eq(locale)), data.into(), ) .await? .first() .cloned() .ok_or_else(|| { report!(errors::DatabaseError::NotFound) .attach_printable("Error while updating unified_translations entry") }) }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "UnifiedTranslations", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_unified_code_unified_message_locale", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_UnifiedTranslations_delete_by_unified_code_unified_message_locale
clm
method
// hyperswitch/crates/diesel_models/src/query/unified_translations.rs // impl for UnifiedTranslations pub async fn delete_by_unified_code_unified_message_locale( conn: &PgPooledConn, unified_code: String, unified_message: String, locale: String, ) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>( conn, dsl::unified_code .eq(unified_code) .and(dsl::unified_message.eq(unified_message)) .and(dsl::locale.eq(locale)), ) .await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "UnifiedTranslations", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "delete_by_unified_code_unified_message_locale", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ApiKeyNew_insert
clm
method
// hyperswitch/crates/diesel_models/src/query/api_keys.rs // impl for ApiKeyNew pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<ApiKey> { generics::generic_insert(conn, self).await }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ApiKeyNew", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "insert", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }
hyperswitch_method_diesel_models_ApiKey_update_by_merchant_id_key_id
clm
method
// hyperswitch/crates/diesel_models/src/query/api_keys.rs // impl for ApiKey pub async fn update_by_merchant_id_key_id( conn: &PgPooledConn, merchant_id: common_utils::id_type::MerchantId, key_id: common_utils::id_type::ApiKeyId, api_key_update: ApiKeyUpdate, ) -> StorageResult<Self> { match generics::generic_update_with_unique_predicate_get_result::< <Self as HasTable>::Table, _, _, _, >( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::key_id.eq(key_id.to_owned())), ApiKeyUpdateInternal::from(api_key_update), ) .await { Err(error) => match error.current_context() { errors::DatabaseError::NotFound => { Err(error.attach_printable("API key with the given key ID does not exist")) } errors::DatabaseError::NoFieldsToUpdate => { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id .eq(merchant_id.to_owned()) .and(dsl::key_id.eq(key_id.to_owned())), ) .await } _ => Err(error), }, result => result, } }
{ "chunk": null, "crate": "diesel_models", "enum_name": null, "file_size": null, "for_type": "ApiKey", "function_name": null, "is_async": null, "is_pub": null, "lines": null, "method_name": "update_by_merchant_id_key_id", "num_enums": null, "num_items": null, "num_structs": null, "repo": "hyperswitch", "start_line": null, "struct_name": null, "total_crates": null, "trait_name": null }