You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating structs with #[derive(FromQueryResult)] it is annoying to translate them into MockRow, because the type is not really supportive to any implementations. To achive that, the only way is to create a BTreeMap<&str, Value> which implements IntoMockRow.
Proposed Solutions
I think the best idea would be to drop the trait IntoMockRow as it is hard to implement from the outside and instead automatically implement From<R: FromQueryResult> for IntoMockRow however it might be necessary to do that through derive.
The text was updated successfully, but these errors were encountered:
Motivation
When creating structs with
#[derive(FromQueryResult)]
it is annoying to translate them intoMockRow
, because the type is not really supportive to any implementations. To achive that, the only way is to create aBTreeMap<&str, Value>
which implementsIntoMockRow
.Proposed Solutions
I think the best idea would be to drop the trait
IntoMockRow
as it is hard to implement from the outside and instead automatically implementFrom<R: FromQueryResult> for IntoMockRow
however it might be necessary to do that through derive.The text was updated successfully, but these errors were encountered: