Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 09cc45a

Browse files
committed
Fixing
1 parent f98a65e commit 09cc45a

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

src/fn_impl_where_data/fn_get_field_value.rs

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,37 +58,33 @@ fn fill_option_of(result: &mut String, struct_propery: &StructProperty, sub_type
5858
types_reader::PropertyType::Str => fill_option_of_sql_value(result, struct_propery),
5959
types_reader::PropertyType::DateTime => fill_option_of_sql_value(result, struct_propery),
6060
types_reader::PropertyType::VecOf(sub_type) => {
61-
get_field_value_of_option_of_vec(result, struct_propery, sub_type)
61+
fill_option_of_vec(result, struct_propery, sub_type)
6262
}
6363
_ => panic!("{} is not supported", struct_propery.ty.as_str()),
6464
}
6565
}
6666

67-
fn get_field_value_of_option_of_vec(
67+
fn fill_option_of_vec(
6868
result: &mut String,
6969
struct_propery: &StructProperty,
7070
sub_type: &PropertyType,
7171
) {
7272
match sub_type {
73-
types_reader::PropertyType::U8 => fill_option_of_vec_of_sql_value(result, struct_propery),
74-
types_reader::PropertyType::I8 => fill_option_of_vec_of_sql_value(result, struct_propery),
75-
types_reader::PropertyType::U16 => fill_option_of_vec_of_sql_value(result, struct_propery),
76-
types_reader::PropertyType::I16 => fill_option_of_vec_of_sql_value(result, struct_propery),
77-
types_reader::PropertyType::U32 => fill_option_of_vec_of_sql_value(result, struct_propery),
78-
types_reader::PropertyType::I32 => fill_option_of_vec_of_sql_value(result, struct_propery),
79-
types_reader::PropertyType::U64 => fill_option_of_vec_of_sql_value(result, struct_propery),
80-
types_reader::PropertyType::I64 => fill_option_of_vec_of_sql_value(result, struct_propery),
81-
types_reader::PropertyType::F32 => fill_option_of_vec_of_sql_value(result, struct_propery),
82-
types_reader::PropertyType::F64 => fill_option_of_vec_of_sql_value(result, struct_propery),
83-
types_reader::PropertyType::String => {
84-
fill_option_of_vec_of_sql_value(result, struct_propery)
85-
}
86-
types_reader::PropertyType::Str => fill_option_of_vec_of_sql_value(result, struct_propery),
87-
types_reader::PropertyType::DateTime => {
88-
fill_option_of_vec_of_sql_value(result, struct_propery)
89-
}
73+
types_reader::PropertyType::U8 => fill_option_of_vec_of_value(result, struct_propery),
74+
types_reader::PropertyType::I8 => fill_option_of_vec_of_value(result, struct_propery),
75+
types_reader::PropertyType::U16 => fill_option_of_vec_of_value(result, struct_propery),
76+
types_reader::PropertyType::I16 => fill_option_of_vec_of_value(result, struct_propery),
77+
types_reader::PropertyType::U32 => fill_option_of_vec_of_value(result, struct_propery),
78+
types_reader::PropertyType::I32 => fill_option_of_vec_of_value(result, struct_propery),
79+
types_reader::PropertyType::U64 => fill_option_of_vec_of_value(result, struct_propery),
80+
types_reader::PropertyType::I64 => fill_option_of_vec_of_value(result, struct_propery),
81+
types_reader::PropertyType::F32 => fill_option_of_vec_of_value(result, struct_propery),
82+
types_reader::PropertyType::F64 => fill_option_of_vec_of_value(result, struct_propery),
83+
types_reader::PropertyType::String => fill_option_of_vec_of_value(result, struct_propery),
84+
types_reader::PropertyType::Str => fill_option_of_vec_of_value(result, struct_propery),
85+
types_reader::PropertyType::DateTime => fill_option_of_vec_of_value(result, struct_propery),
9086
types_reader::PropertyType::Struct(_) => {
91-
fill_option_of_vec_of_sql_value(result, struct_propery)
87+
fill_option_of_vec_of_value(result, struct_propery)
9288
}
9389
_ => panic!("Vec<{}> is not supported", sub_type.as_str()),
9490
}
@@ -138,7 +134,7 @@ fn fill_option_of_sql_value(result: &mut String, struct_propery: &StructProperty
138134
result.push_str("}");
139135
}
140136

141-
fn fill_option_of_vec_of_sql_value(result: &mut String, struct_propery: &StructProperty) {
137+
fn fill_option_of_vec_of_value(result: &mut String, struct_propery: &StructProperty) {
142138
result.push_str("my_postgres::SqlWhereValue::to_in_operator(\"");
143139
result.push_str(struct_propery.get_db_field_name());
144140
result.push_str("\", &self.");

0 commit comments

Comments
 (0)