I have set of primary keys prepared for SQL request:
let mut ids: Vec<i64> = ...;
ids.sort_unstable();
ids.dedup();
it would be nice if I can pass Vec<i64> directly to Statement::query_and_then:
let mut stmt = conn.prepare(&format!("SELECT {all_sql_fields} FROM {tbl_name} WHERE id_key IN rarray(?)"))?;
stmt.query_and_then([ids], ...)?;
for now I have to make two allocation and copy ids to Vec<Value> to pass ids to Statement::query_and_then:
let ids = Rc::new(ids.into_iter().map(Value::from).collect::<Vec<Value>>());
But for example carray allow to pass array of i64 directly without any reallocation.
I have set of primary keys prepared for SQL request:
it would be nice if I can pass
Vec<i64>directly toStatement::query_and_then:for now I have to make two allocation and copy
idstoVec<Value>to passidstoStatement::query_and_then:But for example carray allow to pass array of
i64directly without any reallocation.