repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/hyperswitch_ai_interaction.rs | crates/diesel_models/src/hyperswitch_ai_interaction.rs | use common_utils::encryption::Encryption;
use diesel::{self, Identifiable, Insertable, Queryable, Selectable};
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
use crate::schema::hyperswitch_ai_interaction;
#[derive(
Clone,
Debug,
Deserialize,
Identifiable,
Queryable,
Selectab... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/reverse_lookup.rs | crates/diesel_models/src/reverse_lookup.rs | use diesel::{Identifiable, Insertable, Queryable, Selectable};
use crate::schema::reverse_lookup;
/// This reverse lookup table basically looks up id's and get result_id that you want. This is
/// useful for KV where you can't lookup without key
#[derive(
Clone,
Debug,
serde::Serialize,
serde::Deseria... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/merchant_key_store.rs | crates/diesel_models/src/merchant_key_store.rs | use common_utils::{custom_serde, encryption::Encryption};
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use time::PrimitiveDateTime;
use crate::schema::merchant_key_store;
#[derive(
Clone,
Debug,
serde::Serialize,
serde::Deserialize,
Identifiable,
Queryable,
S... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/tokenization.rs | crates/diesel_models/src/tokenization.rs | #[cfg(feature = "v2")]
use common_utils::id_type;
#[cfg(feature = "v2")]
use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
#[cfg(feature = "v2")]
use serde::{Deserialize, Serialize};
#[cfg(feature = "v2")]
use time::PrimitiveDateTime;
#[cfg(feature = "v2")]
use crate::schema_v2::tokenization;
#[cfg(all(... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/api_keys.rs | crates/diesel_models/src/query/api_keys.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
api_keys::{ApiKey, ApiKeyNew, ApiKeyUpdate, ApiKeyUpdateInternal, HashedApiKey},
errors,
schema::api_keys::dsl,
PgPooledConn, StorageResult,
};
impl ApiKeyNew {
pub async fn insert(sel... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/locker_mock_up.rs | crates/diesel_models/src/query/locker_mock_up.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
locker_mock_up::{LockerMockUp, LockerMockUpNew},
schema::locker_mock_up::dsl,
PgPooledConn, StorageResult,
};
impl LockerMockUpNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<LockerMockUp> ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/user.rs | crates/diesel_models/src/query/user.rs | use common_utils::pii;
use diesel::{associations::HasTable, ExpressionMethods};
pub mod sample_data;
pub mod theme;
use crate::{
query::generics, schema::users::dsl as users_dsl, user::*, PgPooledConn, StorageResult,
};
impl UserNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<User> {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/blocklist_fingerprint.rs | crates/diesel_models/src/query/blocklist_fingerprint.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
blocklist_fingerprint::{BlocklistFingerprint, BlocklistFingerprintNew},
schema::blocklist_fingerprint::dsl,
PgPooledConn, StorageResult,
};
impl BlocklistFingerprintNew {
pub async fn inse... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/blocklist.rs | crates/diesel_models/src/query/blocklist.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
blocklist::{Blocklist, BlocklistNew},
schema::blocklist::dsl,
PgPooledConn, StorageResult,
};
impl BlocklistNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Blocklist>... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/payment_attempt.rs | crates/diesel_models/src/query/payment_attempt.rs | #[cfg(feature = "v1")]
use std::collections::HashSet;
use async_bb8_diesel::AsyncRunQueryDsl;
#[cfg(feature = "v1")]
use diesel::Table;
use diesel::{
associations::HasTable, debug_query, pg::Pg, BoolExpressionMethods, ExpressionMethods, QueryDsl,
};
use error_stack::{report, ResultExt};
use super::generics;
#[cfg... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/fraud_check.rs | crates/diesel_models/src/query/fraud_check.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use crate::{
errors, fraud_check::*, query::generics, schema::fraud_check::dsl, PgPooledConn, StorageResult,
};
impl FraudCheckNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<FraudCheck> {
generics::g... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/callback_mapper.rs | crates/diesel_models/src/query/callback_mapper.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
callback_mapper::CallbackMapper, schema::callback_mapper::dsl, PgPooledConn, StorageResult,
};
impl CallbackMapper {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Self> {
generics::generic_inse... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/dynamic_routing_stats.rs | crates/diesel_models/src/query/dynamic_routing_stats.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use error_stack::report;
use super::generics;
use crate::{
dynamic_routing_stats::{
DynamicRoutingStats, DynamicRoutingStatsNew, DynamicRoutingStatsUpdate,
},
errors,
schema::dynamic_routing_stats::dsl,
PgPooled... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/address.rs | crates/diesel_models/src/query/address.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
address::{Address, AddressNew, AddressUpdateInternal},
errors,
schema::address::dsl,
PgPooledConn, StorageResult,
};
impl AddressNew {
pub async fn insert(self, conn: &PgPooledConn) ->... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/customers.rs | crates/diesel_models/src/query/customers.rs | use common_utils::id_type;
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::customers::dsl;
#[cfg(feature = "v2")]
use crate::schema_v2::customers::dsl;
use crate::{
customers::{Customer, CustomerNew, CustomerUpdateIntern... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/user_authentication_method.rs | crates/diesel_models/src/query/user_authentication_method.rs | use diesel::{associations::HasTable, ExpressionMethods};
use crate::{
query::generics, schema::user_authentication_methods::dsl, user_authentication_method::*,
PgPooledConn, StorageResult,
};
impl UserAuthenticationMethodNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UserAuthenticat... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/capture.rs | crates/diesel_models/src/query/capture.rs | use common_utils::types::ConnectorTransactionIdTrait;
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
capture::{Capture, CaptureNew, CaptureUpdate, CaptureUpdateInternal},
errors,
schema::captures::dsl,
PgPooledConn, StorageResult,
};
i... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/payment_link.rs | crates/diesel_models/src/query/payment_link.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
payment_link::{PaymentLink, PaymentLinkNew},
schema::payment_link::dsl,
PgPooledConn, StorageResult,
};
impl PaymentLinkNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<PaymentLink> {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/dispute.rs | crates/diesel_models/src/query/dispute.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, Table};
use super::generics;
use crate::{
dispute::{Dispute, DisputeNew, DisputeUpdate, DisputeUpdateInternal},
errors,
schema::dispute::dsl,
PgPooledConn, StorageResult,
};
impl DisputeNew {
pub async fn insert(self, c... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/process_tracker.rs | crates/diesel_models/src/query/process_tracker.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, Table};
use router_env::{instrument, tracing};
use time::PrimitiveDateTime;
use super::generics;
use crate::{
enums, errors,
process_tracker::{
ProcessTracker, ProcessTrackerNew, ProcessTrackerUpdate, ProcessTrackerUpdateInt... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/payout_attempt.rs | crates/diesel_models/src/query/payout_attempt.rs | use std::collections::HashSet;
use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{
associations::HasTable,
query_dsl::methods::{DistinctDsl, FilterDsl, SelectDsl},
BoolExpressionMethods, ExpressionMethods,
};
use error_stack::{report, ResultExt};
use super::generics;
use crate::{
enums,
errors::... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/organization.rs | crates/diesel_models/src/query/organization.rs | use common_utils::id_type;
use diesel::{associations::HasTable, ExpressionMethods};
#[cfg(feature = "v1")]
use crate::schema::organization::dsl::org_id as dsl_identifier;
#[cfg(feature = "v2")]
use crate::schema_v2::organization::dsl::id as dsl_identifier;
use crate::{organization::*, query::generics, PgPooledConn, St... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/payment_intent.rs | crates/diesel_models/src/query/payment_intent.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::payment_intent::dsl;
#[cfg(feature = "v2")]
use crate::schema_v2::payment_intent::dsl;
use crate::{
errors,
payment_intent::{self, PaymentIntent, PaymentIntentNew},
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/cards_info.rs | crates/diesel_models/src/query/cards_info.rs | use diesel::{associations::HasTable, ExpressionMethods};
use error_stack::report;
use crate::{
cards_info::{CardInfo, UpdateCardInfo},
errors,
query::generics,
schema::cards_info::dsl,
PgPooledConn, StorageResult,
};
impl CardInfo {
pub async fn find_by_iin(conn: &PgPooledConn, card_iin: &str)... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/merchant_account.rs | crates/diesel_models/src/query/merchant_account.rs | #[cfg(feature = "v1")]
use common_types::consts::API_VERSION;
#[cfg(feature = "v1")]
use diesel::BoolExpressionMethods;
use diesel::{associations::HasTable, ExpressionMethods, Table};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::merchant_account::dsl;
#[cfg(feature = "v2")]
use crate::schema_v2::merc... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/user_key_store.rs | crates/diesel_models/src/query/user_key_store.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
schema::user_key_store::dsl,
user_key_store::{UserKeyStore, UserKeyStoreNew},
PgPooledConn, StorageResult,
};
impl UserKeyStoreNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UserKeyStore> ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/generic_link.rs | crates/diesel_models/src/query/generic_link.rs | use common_utils::{errors, ext_traits::ValueExt, link_utils::GenericLinkStatus};
use diesel::{associations::HasTable, ExpressionMethods};
use error_stack::{report, Report, ResultExt};
use super::generics;
use crate::{
errors as db_errors,
generic_link::{
GenericLink, GenericLinkData, GenericLinkNew, Ge... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/subscription.rs | crates/diesel_models/src/query/subscription.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use error_stack::report;
use super::generics;
use crate::{
errors,
schema::subscription::dsl,
subscription::{Subscription, SubscriptionNew, SubscriptionUpdate},
PgPooledConn, StorageResult,
};
impl SubscriptionNew {
pu... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/user_role.rs | crates/diesel_models/src/query/user_role.rs | use async_bb8_diesel::AsyncRunQueryDsl;
use common_enums::EntityType;
use common_utils::id_type;
use diesel::{
associations::HasTable,
debug_query,
pg::Pg,
result::Error as DieselError,
sql_types::{Bool, Nullable},
BoolExpressionMethods, ExpressionMethods, QueryDsl,
};
use error_stack::{report, ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/invoice.rs | crates/diesel_models/src/query/invoice.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
invoice::{Invoice, InvoiceNew, InvoiceUpdate},
schema::invoice::dsl,
PgPooledConn, StorageResult,
};
impl InvoiceNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Invoi... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/relay.rs | crates/diesel_models/src/query/relay.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
errors,
relay::{Relay, RelayNew, RelayUpdateInternal},
schema::relay::dsl,
PgPooledConn, StorageResult,
};
impl RelayNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResu... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/generics.rs | crates/diesel_models/src/query/generics.rs | use std::fmt::Debug;
use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{
associations::HasTable,
debug_query,
dsl::{count_star, Find, IsNotNull, Limit},
helper_types::{Filter, IntoBoxed},
insertable::CanInsertInSingleQuery,
pg::{Pg, PgConnection},
query_builder::{
AsChangeset, AsQ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/file.rs | crates/diesel_models/src/query/file.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
errors,
file::{FileMetadata, FileMetadataNew, FileMetadataUpdate, FileMetadataUpdateInternal},
schema::file_metadata::dsl,
PgPooledConn, StorageResult,
};
impl FileMetadataNew {
pub as... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/merchant_connector_account.rs | crates/diesel_models/src/query/merchant_connector_account.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, Table};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::merchant_connector_account::dsl;
#[cfg(feature = "v2")]
use crate::schema_v2::merchant_connector_account::dsl;
use crate::{
errors,
merchant_connector_account::{... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/blocklist_lookup.rs | crates/diesel_models/src/query/blocklist_lookup.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
blocklist_lookup::{BlocklistLookup, BlocklistLookupNew},
schema::blocklist_lookup::dsl,
PgPooledConn, StorageResult,
};
impl BlocklistLookupNew {
pub async fn insert(self, conn: &PgPooledC... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/payment_method.rs | crates/diesel_models/src/query/payment_method.rs | use async_bb8_diesel::AsyncRunQueryDsl;
#[cfg(feature = "v1")]
use diesel::Table;
use diesel::{
associations::HasTable, debug_query, pg::Pg, BoolExpressionMethods, ExpressionMethods, QueryDsl,
};
use error_stack::ResultExt;
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::payment_methods::dsl;
#[cfg(... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/payouts.rs | crates/diesel_models/src/query/payouts.rs | use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{
associations::HasTable, debug_query, pg::Pg, BoolExpressionMethods, ExpressionMethods,
JoinOnDsl, QueryDsl,
};
use error_stack::{report, ResultExt};
use super::generics;
use crate::{
enums, errors,
payouts::{Payouts, PayoutsNew, PayoutsUpdate, Payou... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/unified_translations.rs | crates/diesel_models/src/query/unified_translations.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use error_stack::report;
use crate::{
errors,
query::generics,
schema::unified_translations::dsl,
unified_translations::{UnifiedTranslationsUpdateInternal, *},
PgPooledConn, StorageResult,
};
impl UnifiedTranslationsNe... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/utils.rs | crates/diesel_models/src/query/utils.rs | use crate::{schema, schema_v2};
/// This trait will return a single column as primary key even in case of composite primary key.
///
/// In case of composite key, it will return the column that is used as local unique.
pub(super) trait GetPrimaryKey: diesel::Table {
type PK: diesel::ExpressionMethods;
fn get_p... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/gsm.rs | crates/diesel_models/src/query/gsm.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use error_stack::report;
use crate::{
errors, gsm::*, query::generics, schema::gateway_status_map::dsl, PgPooledConn, StorageResult,
};
impl GatewayStatusMappingNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/authentication.rs | crates/diesel_models/src/query/authentication.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
authentication::{
Authentication, AuthenticationNew, AuthenticationUpdate, AuthenticationUpdateInternal,
},
errors,
schema::authentication::dsl,
PgPooledConn, StorageResult,
};
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/business_profile.rs | crates/diesel_models/src/query/business_profile.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, Table};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::business_profile::dsl::{self, profile_id as dsl_identifier};
#[cfg(feature = "v2")]
use crate::schema_v2::business_profile::dsl::{self, id as dsl_identifier};
use crate:... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/mandate.rs | crates/diesel_models/src/query/mandate.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, Table};
use error_stack::report;
use super::generics;
use crate::{errors, mandate::*, schema::mandate::dsl, PgPooledConn, StorageResult};
impl MandateNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Mandate> {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/role.rs | crates/diesel_models/src/query/role.rs | use async_bb8_diesel::AsyncRunQueryDsl;
use common_enums::EntityType;
use common_utils::id_type;
use diesel::{
associations::HasTable, debug_query, pg::Pg, result::Error as DieselError,
BoolExpressionMethods, ExpressionMethods, QueryDsl,
};
use error_stack::{report, ResultExt};
use strum::IntoEnumIterator;
use... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/events.rs | crates/diesel_models/src/query/events.rs | use std::collections::HashSet;
use diesel::{
associations::HasTable, BoolExpressionMethods, ExpressionMethods, NullableExpressionMethods,
};
use error_stack::ResultExt;
use super::generics;
use crate::{
errors::DatabaseError,
events::{Event, EventNew, EventUpdateInternal},
schema::events::dsl,
PgP... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/authorization.rs | crates/diesel_models/src/query/authorization.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
use crate::{
authorization::{
Authorization, AuthorizationNew, AuthorizationUpdate, AuthorizationUpdateInternal,
},
errors,
schema::incremental_authorization::dsl,
PgPooledConn, StorageResul... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/dashboard_metadata.rs | crates/diesel_models/src/query/dashboard_metadata.rs | use common_utils::id_type;
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use crate::{
enums,
query::generics,
schema::dashboard_metadata::dsl,
user::dashboard_metadata::{
DashboardMetadata, DashboardMetadataNew, DashboardMetadataUpdate,
DashboardMetadat... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/refund.rs | crates/diesel_models/src/query/refund.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, Table};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::refund::dsl;
#[cfg(feature = "v2")]
use crate::schema_v2::refund::dsl;
use crate::{
errors,
refund::{Refund, RefundNew, RefundUpdate, RefundUpdateInternal},
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/routing_algorithm.rs | crates/diesel_models/src/query/routing_algorithm.rs | use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, QueryDsl};
use error_stack::{report, ResultExt};
use time::PrimitiveDateTime;
use crate::{
enums,
errors::DatabaseError,
query::generics,
routing_algorithm::{RoutingAlgorithm, RoutingP... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/connector_response.rs | crates/diesel_models/src/query/connector_response.rs | use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use router_env::{instrument, logger, tracing};
use super::generics;
use crate::{
connector_response::{
ConnectorResponse, ConnectorResponseNew, ConnectorResponseUpdate,
ConnectorResponseUpdateInternal,
},
errors... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/configs.rs | crates/diesel_models/src/query/configs.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
configs::{Config, ConfigNew, ConfigUpdate, ConfigUpdateInternal},
errors,
schema::configs::dsl,
PgPooledConn, StorageResult,
};
impl ConfigNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResul... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/hyperswitch_ai_interaction.rs | crates/diesel_models/src/query/hyperswitch_ai_interaction.rs | use diesel::{associations::HasTable, ExpressionMethods};
use crate::{
hyperswitch_ai_interaction::{HyperswitchAiInteraction, HyperswitchAiInteractionNew},
query::generics,
schema::hyperswitch_ai_interaction::dsl,
PgPooledConn, StorageResult,
};
impl HyperswitchAiInteractionNew {
pub async fn inser... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/reverse_lookup.rs | crates/diesel_models/src/query/reverse_lookup.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
reverse_lookup::{ReverseLookup, ReverseLookupNew},
schema::reverse_lookup::dsl,
PgPooledConn, StorageResult,
};
impl ReverseLookupNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<ReverseLook... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/merchant_key_store.rs | crates/diesel_models/src/query/merchant_key_store.rs | use diesel::{associations::HasTable, ExpressionMethods};
use super::generics;
use crate::{
merchant_key_store::{MerchantKeyStore, MerchantKeyStoreNew},
schema::merchant_key_store::dsl,
PgPooledConn, StorageResult,
};
impl MerchantKeyStoreNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageR... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/tokenization.rs | crates/diesel_models/src/query/tokenization.rs | #[cfg(feature = "v2")]
use diesel::associations::HasTable;
#[cfg(feature = "v2")]
use diesel::ExpressionMethods;
#[cfg(feature = "v2")]
use crate::{
errors, query::generics, schema_v2::tokenization, tokenization as tokenization_diesel,
PgPooledConn, StorageResult,
};
#[cfg(all(feature = "v2", feature = "token... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/user/theme.rs | crates/diesel_models/src/query/user/theme.rs | use async_bb8_diesel::AsyncRunQueryDsl;
use common_utils::types::user::ThemeLineage;
use diesel::{
associations::HasTable,
debug_query,
pg::Pg,
result::Error as DieselError,
sql_types::{Bool, Nullable},
BoolExpressionMethods, ExpressionMethods, NullableExpressionMethods, QueryDsl,
};
use error_s... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/query/user/sample_data.rs | crates/diesel_models/src/query/user/sample_data.rs | use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{associations::HasTable, debug_query, ExpressionMethods, TextExpressionMethods};
use error_stack::ResultExt;
use router_env::logger;
#[cfg(feature = "v1")]
use crate::schema::{
payment_attempt::dsl as payment_attempt_dsl, payment_intent::dsl as payment_intent_dsl... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/user/theme.rs | crates/diesel_models/src/user/theme.rs | use common_enums::EntityType;
use common_utils::{
date_time, id_type,
types::user::{EmailThemeConfig, ThemeLineage},
};
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use router_derive::DebugAsDisplay;
use time::PrimitiveDateTime;
use crate::schema::themes;
#[derive(Clone, Debug, ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/user/sample_data.rs | crates/diesel_models/src/user/sample_data.rs | #[cfg(feature = "v1")]
use common_enums::{
AttemptStatus, AuthenticationType, CaptureMethod, Currency, PaymentExperience, PaymentMethod,
PaymentMethodType,
};
#[cfg(feature = "v1")]
use common_types::primitive_wrappers::{
ExtendedAuthorizationAppliedBool, RequestExtendedAuthorizationBool,
};
#[cfg(feature =... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/diesel_models/src/user/dashboard_metadata.rs | crates/diesel_models/src/user/dashboard_metadata.rs | use common_utils::id_type;
use diesel::{query_builder::AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use masking::Secret;
use time::PrimitiveDateTime;
use crate::{enums, schema::dashboard_metadata};
#[derive(Clone, Debug, Identifiable, Queryable, Selectable)]
#[diesel(table_name = dashboard_metadata,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/events/src/actix.rs | crates/events/src/actix.rs | use router_env::RequestId;
use crate::EventInfo;
impl EventInfo for RequestId {
type Data = String;
fn data(&self) -> error_stack::Result<String, crate::EventsError> {
Ok(self.to_string())
}
fn key(&self) -> String {
"request_id".to_string()
}
}
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/events/src/lib.rs | crates/events/src/lib.rs | #![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide))]
#![cfg_attr(docsrs, doc(cfg_hide(doc)))]
#![warn(missing_docs)]
//! A generic event handler system.
//! This library consists of 4 parts:
//! Event Sink: A trait that defines how events are published. This could be a simple logger, a message queue, or a databas... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/kgraph_utils/src/lib.rs | crates/kgraph_utils/src/lib.rs | pub mod error;
pub mod mca;
pub mod transformers;
pub mod types;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/kgraph_utils/src/error.rs | crates/kgraph_utils/src/error.rs | #[cfg(feature = "v2")]
use common_enums::connector_enums;
use euclid::{dssa::types::AnalysisErrorType, frontend::dir};
#[derive(Debug, thiserror::Error, serde::Serialize)]
#[serde(tag = "type", content = "info", rename_all = "snake_case")]
pub enum KgraphError {
#[error("Invalid connector name encountered: '{0}'")]... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/kgraph_utils/src/types.rs | crates/kgraph_utils/src/types.rs | use std::collections::{HashMap, HashSet};
use api_models::enums as api_enums;
use serde::Deserialize;
#[derive(Debug, Deserialize, Clone, Default)]
pub struct CountryCurrencyFilter {
pub connector_configs: HashMap<api_enums::RoutableConnectors, PaymentMethodFilters>,
pub default_configs: Option<PaymentMethodF... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/kgraph_utils/src/transformers.rs | crates/kgraph_utils/src/transformers.rs | use api_models::enums as api_enums;
use euclid::{
backend::BackendInput,
dirval,
dssa::types::AnalysisErrorType,
frontend::{ast, dir},
types::{NumValue, StrValue},
};
use crate::error::KgraphError;
pub trait IntoContext {
fn into_context(self) -> Result<Vec<dir::DirValue>, KgraphError>;
}
imp... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/kgraph_utils/src/mca.rs | crates/kgraph_utils/src/mca.rs | #[cfg(feature = "v1")]
use std::str::FromStr;
#[cfg(feature = "v1")]
use api_models::payment_methods::RequestPaymentMethodTypes;
use api_models::{admin as admin_api, enums as api_enums, refunds::MinorUnit};
use euclid::{
dirval,
frontend::{ast, dir},
types::{NumValue, NumValueRefinement},
};
use hyperswitc... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/kgraph_utils/benches/evaluation.rs | crates/kgraph_utils/benches/evaluation.rs | #![allow(unused, clippy::expect_used)]
use std::{collections::HashMap, str::FromStr};
use api_models::{
admin as admin_api, enums as api_enums, payment_methods::RequestPaymentMethodTypes,
};
use common_utils::types::MinorUnit;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use euclid::{
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid_macros/src/lib.rs | crates/euclid_macros/src/lib.rs | mod inner;
use proc_macro::TokenStream;
#[proc_macro_derive(EnumNums)]
pub fn enum_nums(ts: TokenStream) -> TokenStream {
inner::enum_nums_inner(ts)
}
#[proc_macro]
pub fn knowledge(ts: TokenStream) -> TokenStream {
match inner::knowledge_inner(ts.into()) {
Ok(ts) => ts.into(),
Err(e) => e.in... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid_macros/src/inner.rs | crates/euclid_macros/src/inner.rs | mod enum_nums;
mod knowledge;
pub(crate) use enum_nums::enum_nums_inner;
pub(crate) use knowledge::knowledge_inner;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid_macros/src/inner/enum_nums.rs | crates/euclid_macros/src/inner/enum_nums.rs | use proc_macro::TokenStream;
use proc_macro2::{Span, TokenStream as TokenStream2};
use quote::quote;
fn error() -> TokenStream2 {
syn::Error::new(
Span::call_site(),
"'EnumNums' can only be derived on enums with unit variants".to_string(),
)
.to_compile_error()
}
pub(crate) fn enum_nums_in... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid_macros/src/inner/knowledge.rs | crates/euclid_macros/src/inner/knowledge.rs | use std::{
fmt::{Display, Formatter},
hash::Hash,
rc::Rc,
};
use proc_macro2::{Span, TokenStream};
use quote::{format_ident, quote};
use rustc_hash::{FxHashMap, FxHashSet};
use syn::{parse::Parse, Token};
mod strength {
syn::custom_punctuation!(Normal, ->);
syn::custom_punctuation!(Strong, ->>);
}... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_constraint_graph/src/builder.rs | crates/hyperswitch_constraint_graph/src/builder.rs | use std::sync::Arc;
use rustc_hash::{FxHashMap, FxHashSet};
use crate::{
dense_map::DenseMap,
error::GraphError,
graph::ConstraintGraph,
types::{
DomainId, DomainIdentifier, DomainInfo, Edge, EdgeId, Metadata, Node, NodeId, NodeType,
NodeValue, Relation, Strength, ValueNode,
},
};
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_constraint_graph/src/lib.rs | crates/hyperswitch_constraint_graph/src/lib.rs | pub mod builder;
mod dense_map;
pub mod error;
pub mod graph;
pub mod types;
pub use builder::ConstraintGraphBuilder;
pub use error::{AnalysisTrace, GraphError};
pub use graph::ConstraintGraph;
#[cfg(feature = "viz")]
pub use types::NodeViz;
pub use types::{
CheckingContext, CycleCheck, DomainId, DomainIdentifier,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_constraint_graph/src/dense_map.rs | crates/hyperswitch_constraint_graph/src/dense_map.rs | use std::{fmt, iter, marker::PhantomData, ops, slice, vec};
pub trait EntityId {
fn get_id(&self) -> usize;
fn with_id(id: usize) -> Self;
}
macro_rules! impl_entity {
($name:ident) => {
impl $crate::dense_map::EntityId for $name {
#[inline]
fn get_id(&self) -> usize {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_constraint_graph/src/error.rs | crates/hyperswitch_constraint_graph/src/error.rs | use std::sync::{Arc, Weak};
use crate::types::{Metadata, NodeValue, Relation, RelationResolution, ValueNode};
#[derive(Debug, Clone, serde::Serialize)]
#[serde(tag = "type", content = "predecessor", rename_all = "snake_case")]
pub enum ValueTracePredecessor<V: ValueNode> {
Mandatory(Box<Weak<AnalysisTrace<V>>>),
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_constraint_graph/src/types.rs | crates/hyperswitch_constraint_graph/src/types.rs | use std::{
any::Any,
fmt, hash,
ops::{Deref, DerefMut},
sync::Arc,
};
use rustc_hash::{FxHashMap, FxHashSet};
use crate::{dense_map::impl_entity, error::AnalysisTrace};
pub trait KeyNode: fmt::Debug + Clone + hash::Hash + serde::Serialize + PartialEq + Eq {}
pub trait ValueNode: fmt::Debug + Clone +... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_constraint_graph/src/graph.rs | crates/hyperswitch_constraint_graph/src/graph.rs | use std::sync::{Arc, Weak};
use rustc_hash::{FxHashMap, FxHashSet};
use crate::{
builder,
dense_map::DenseMap,
error::{self, AnalysisTrace, GraphError},
types::{
CheckingContext, CycleCheck, DomainId, DomainIdentifier, DomainInfo, Edge, EdgeId,
Memoization, Metadata, Node, NodeId, Node... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/redis_interface/src/errors.rs | crates/redis_interface/src/errors.rs | //! Errors specific to this custom redis interface
#[derive(Debug, thiserror::Error, PartialEq)]
pub enum RedisError {
#[error("Invalid Redis configuration: {0}")]
InvalidConfiguration(String),
#[error("Failed to set key value in Redis")]
SetFailed,
#[error("Failed to set key value in Redis. Duplic... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/redis_interface/src/lib.rs | crates/redis_interface/src/lib.rs | //! Intermediate module for encapsulate all the redis related functionality
//!
//! Provides structs to represent redis connection and all functions that redis provides and
//! are used in the `router` crate. Abstractions for creating a new connection while also facilitating
//! redis connection pool and configuration ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/redis_interface/src/types.rs | crates/redis_interface/src/types.rs | //! Data types and type conversions
//! from `fred`'s internal data-types to custom data-types
use common_utils::errors::CustomResult;
use fred::types::RedisValue as FredRedisValue;
use crate::{errors, RedisConnectionPool};
pub struct RedisValue {
inner: FredRedisValue,
}
impl std::ops::Deref for RedisValue {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/redis_interface/src/commands.rs | crates/redis_interface/src/commands.rs | //! An interface to abstract the `fred` commands
//!
//! The folder provides generic functions for providing serialization
//! and deserialization while calling redis.
//! It also includes instruments to provide tracing.
use std::fmt::Debug;
use common_utils::{
errors::CustomResult,
ext_traits::{AsyncExt, Byt... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/build.rs | crates/router/build.rs | fn main() {
// Set thread stack size to 11 MiB for debug builds
// Reference: https://doc.rust-lang.org/std/thread/#stack-size
#[cfg(debug_assertions)]
println!("cargo:rustc-env=RUST_MIN_STACK=11534336"); // 11 * 1024 * 1024 = 11 MiB
#[cfg(feature = "vergen")]
router_env::vergen::generate_cargo... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db.rs | crates/router/src/db.rs | pub mod address;
pub mod api_keys;
pub mod authentication;
pub mod authorization;
pub mod blocklist;
pub mod blocklist_fingerprint;
pub mod blocklist_lookup;
pub mod business_profile;
pub mod callback_mapper;
pub mod capture;
pub mod configs;
pub mod customers;
pub mod dashboard_metadata;
pub mod dispute;
pub mod dynam... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/consts.rs | crates/router/src/consts.rs | pub mod oidc;
pub mod opensearch;
#[cfg(feature = "olap")]
pub mod user;
pub mod user_role;
use std::{collections::HashSet, str::FromStr, sync};
use api_models::enums::Country;
use common_utils::{consts, id_type};
pub use hyperswitch_domain_models::consts::{
CONNECTOR_MANDATE_REQUEST_REFERENCE_ID_LENGTH, ROUTING_E... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/compatibility.rs | crates/router/src/compatibility.rs | pub mod stripe;
pub mod wrap;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services.rs | crates/router/src/services.rs | pub mod api;
pub mod authentication;
pub mod authorization;
pub mod connector_integration_interface;
#[cfg(feature = "email")]
pub mod email;
pub mod encryption;
#[cfg(feature = "olap")]
pub mod jwt;
pub mod kafka;
pub mod logger;
pub mod pm_auth;
pub mod card_testing_guard;
#[cfg(feature = "olap")]
pub mod oidc_provi... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/lib.rs | crates/router/src/lib.rs | #[cfg(all(feature = "stripe", feature = "v1"))]
pub mod compatibility;
pub mod configs;
pub mod connection;
pub mod connector;
pub mod consts;
pub mod core;
pub mod cors;
pub mod db;
pub mod env;
pub mod locale;
pub(crate) mod macros;
pub mod routes;
pub mod workflows;
#[cfg(feature = "olap")]
pub mod analytics;
pub ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/connector.rs | crates/router/src/connector.rs | pub mod utils;
#[cfg(feature = "dummy_connector")]
pub use hyperswitch_connectors::connectors::DummyConnector;
pub use hyperswitch_connectors::connectors::{
aci, aci::Aci, adyen, adyen::Adyen, adyenplatform, adyenplatform::Adyenplatform, affirm,
affirm::Affirm, airwallex, airwallex::Airwallex, amazonpay, amazo... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/core.rs | crates/router/src/core.rs | pub mod admin;
pub mod api_keys;
pub mod api_locking;
#[cfg(feature = "v1")]
pub mod apple_pay_certificates_migration;
pub mod authentication;
#[cfg(feature = "v1")]
pub mod blocklist;
pub mod cache;
pub mod card_testing_guard;
pub mod cards_info;
pub mod chat;
pub mod conditional_config;
pub mod configs;
#[cfg(feature... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/env.rs | crates/router/src/env.rs | #[doc(inline)]
pub use router_env::*;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows.rs | crates/router/src/workflows.rs | #[cfg(feature = "email")]
pub mod api_key_expiry;
#[cfg(feature = "payouts")]
pub mod attach_payout_account_workflow;
pub mod outgoing_webhook_retry;
pub mod payment_method_status_update;
pub mod payment_sync;
pub mod refund_router;
pub mod tokenized_data;
pub mod revenue_recovery;
pub mod process_dispute;
pub mod... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/middleware.rs | crates/router/src/middleware.rs | use common_utils::consts::TENANT_HEADER;
use futures::StreamExt;
// Re-export RequestId from router_env for convenience
pub use router_env::RequestId;
use router_env::{
logger,
tracing::{field::Empty, Instrument},
};
use crate::{headers, routes::metrics};
/// Middleware for attaching default response headers.... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/connection.rs | crates/router/src/connection.rs | use bb8::PooledConnection;
use diesel::PgConnection;
use error_stack::ResultExt;
use storage_impl::errors as storage_errors;
use crate::errors;
pub type PgPool = bb8::Pool<async_bb8_diesel::ConnectionManager<PgConnection>>;
pub type PgPooledConn = async_bb8_diesel::Connection<PgConnection>;
/// Creates a Redis conn... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/cors.rs | crates/router/src/cors.rs | // use actix_web::http::header;
use crate::configs::settings;
pub fn cors(config: settings::CorsSettings) -> actix_cors::Cors {
let allowed_methods = config.allowed_methods.iter().map(|s| s.as_str());
let mut cors = actix_cors::Cors::default()
.allowed_methods(allowed_methods)
.allow_any_head... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/types.rs | crates/router/src/types.rs | // FIXME: Why were these data types grouped this way?
//
// Folder `types` is strange for Rust ecosystem, nevertheless it might be okay.
// But folder `enum` is even more strange I unlikely okay. Why should not we introduce folders `type`, `structs` and `traits`? :)
// Is it better to split data types according to busi... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/utils.rs | crates/router/src/utils.rs | pub mod chat;
#[cfg(feature = "olap")]
pub mod connector_onboarding;
pub mod currency;
pub mod db_utils;
pub mod ext_traits;
#[cfg(feature = "kv_store")]
pub mod storage_partitioning;
#[cfg(feature = "olap")]
pub mod user;
#[cfg(feature = "olap")]
pub mod user_role;
#[cfg(feature = "olap")]
pub mod verify_connector;
us... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/macros.rs | crates/router/src/macros.rs | pub use common_utils::newtype;
#[macro_export]
macro_rules! get_payment_link_config_value_based_on_priority {
($config:expr, $business_config:expr, $field:ident, $default:expr) => {
$config
.as_ref()
.and_then(|pc_config| pc_config.theme_config.$field.clone())
.or_else(|... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/analytics_validator.rs | crates/router/src/analytics_validator.rs | use analytics::errors::AnalyticsError;
use api_models::analytics::AnalyticsRequest;
use common_utils::errors::CustomResult;
use currency_conversion::types::ExchangeRates;
use router_env::logger;
use crate::core::currency::get_forex_exchange_rates;
pub async fn request_validator(
req_type: AnalyticsRequest,
st... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/events.rs | crates/router/src/events.rs | use std::collections::HashMap;
use common_utils::types::TenantConfig;
use error_stack::ResultExt;
use events::{EventsError, Message, MessagingInterface};
use hyperswitch_interfaces::events as events_interfaces;
use masking::ErasedMaskSerialize;
use router_env::logger;
use serde::{Deserialize, Serialize};
use storage_i... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.