We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b69c22 commit 4aca00dCopy full SHA for 4aca00d
editoast/editoast_derive/src/infra_model.rs
@@ -39,7 +39,9 @@ pub fn infra_model(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
39
// Work around a diesel limitation
40
// See https://github.com/diesel-rs/diesel/issues/2414
41
// Divided by 3 here because we are inserting three values
42
- const DIESEL_MAX_VALUES : usize = (2_usize.pow(16) - 1)/3;
+ // When using AsyncPgConnection, we divide must again
43
+ // Maybe its related to connexion pipelining
44
+ const DIESEL_MAX_VALUES : usize = (2_usize.pow(16) - 1)/3/2;
45
for data_chunk in datas.chunks(DIESEL_MAX_VALUES) {
46
diesel::insert_into(#table::table)
47
.values(data_chunk)
0 commit comments