add TryGetableArray to DeriveValueType macros#2972
add TryGetableArray to DeriveValueType macros#2972sinder38 wants to merge 1 commit intoSeaQL:masterfrom
Conversation
|
umm, why is this even allowed? sea-orm/tests/common/features/value_type.rs Lines 72 to 73 in e36eea4 error[E0277]: the trait bound `Vec<Vec<std::string::String>>: TryGetable` is not satisfied
--> tests/common/features/value_type.rs:72:39
|
72 | #[derive(Clone, Debug, PartialEq, Eq, DeriveValueType)]
| ^^^^^^^^^^^^^^^ the trait `TryGetable` is not implemented for `Vec<Vec<std::string::String>>`
|
= help: the following other types implement trait `TryGetable`:
Vec<Braced>
Vec<Hyphenated>
Vec<JsonValue>
Vec<NaiveDate>
Vec<NaiveDateTime>
Vec<NaiveTime>
Vec<OffsetDateTime>
Vec<PrimitiveDateTime>
and 21 others
= note: this error originates in the derive macro `DeriveValueType` (in Nightly builds, run with -Z macro-backtrace for more info)There seems to be 2 ways to solve this:
|
why not readyThis is not ready to be merged, I handled only DeriveValueTypeStruct and didn't change DeriveValueTypeString. My reasoning behind it is that I don't fully understand the design goal yet, it could be either:
most likely the first one. |
PR Info
User wrapped types created by DeriveValueType macros don't implement TryGetableArray which results in them unusable in
FromQueryResultstructs when inVec<T>Bug Fixes
VecinsideFromQueryResultstructsBreaking Changes
if users implemented
TryGetableArraymanually it will require removalChanges
Adds missing implementation to macros