Closed MrFoxPro closed 2 months ago
Problem:
use edgedb_protocol::{ value::{EnumValue, Value as EValue}, }; let args = indexmap! { "me_num" => (Some(EValue::Int64(user.num)), Cd::One), "activities" => (Some(EValue::Array(vec![EValue::Enum(EnumValue::from("Freelancer"))])), Cd::AtMostOne) }; let args = helpers::edge_object_from_pairs(m); let q = " update User filter .num = <int64>$me_num set { activities := <optional array<Activity>>$activities ?? .activities, } "; ctx.edb.execute(q, &args).await?;
Will fail with ClientEncodingError #298 Discord thread will full problem description: https://discord.com/channels/841451783728529451/1216718781846392852
ClientEncodingError
I rewrote solution of @hongquan (#289) without reformatting, so changes are more readable. We can discuss here more elegant solution
Should be fixed by https://github.com/edgedb/edgedb-rust/pull/304
Problem:
Will fail with
ClientEncodingError
#298 Discord thread will full problem description: https://discord.com/channels/841451783728529451/1216718781846392852I rewrote solution of @hongquan (#289) without reformatting, so changes are more readable. We can discuss here more elegant solution