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
null values hit the _ case since internally D1Result::results() returns a javascript array which will treat null values as their own type when deserialized through serde, making it incompatible with sea-query's Value enum, which requires to know the type ahead of time
a non-ideal solution i found was to make an Option<T> newtype that i use in my models, and in their TryGetable impls return Some(T) if the resulting value != T::default()
this comes with an obvious flaw in that T::default() may actually be a non-None value
i'm still fairly new to sea-orm, but seeing how we are given the names of columns it may be possible to extract type information from models using the column's name which can be used to map nulls to their actual Value variants
although at this point i guess it becomes a sea-orm issue and not a sea-query issue
trying to use cloudflare d1 with sea-orm through the example proxy integration, but
https://github.com/SeaQL/sea-orm/blob/5f1a9d2a46c9b0776c57311782e72dab8e5c6948/examples/proxy_cloudflare_worker_example/src/orm.rs#L63-L97
null values hit the
_
case since internallyD1Result::results()
returns a javascript array which will treat null values as their own type when deserialized through serde, making it incompatible with sea-query'sValue
enum, which requires to know the type ahead of timesea-query/src/value.rs
Lines 127 to 216 in b91ba14
is there a reasonable way to accommodate for this?
The text was updated successfully, but these errors were encountered: