Skip to content

Commit fc93724

Browse files
committed
add comments
1 parent ebcf695 commit fc93724

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/common_types/src/payment_methods.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ use serde::{Deserialize, Serialize};
1111
use utoipa::ToSchema;
1212

1313
/// Details of all the payment methods enabled for the connector for the given merchant account
14+
15+
// sql_type for this can be json instead of jsonb. This is because validation at database is not required since it will always be written by the application.
16+
// This is a performance optimization to avoid json validation at database level.
17+
// jsonb enables faster querying on json columns, but it doesn't justify here since we are not querying on this column.
18+
// https://docs.rs/diesel/latest/diesel/sql_types/struct.Jsonb.html
1419
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, AsExpression)]
1520
#[serde(deny_unknown_fields)]
1621
#[diesel(sql_type = Json)]

0 commit comments

Comments
 (0)