Ivan Krivosheev
Ivan Krivosheev
A month has passed without a response, I close.
@negezor thank you for the issue! Do you want to create PR?)
@tyt2y3 @billy1624 Well, shall we add or is it too specific for postgres?
Hello! I created PR: https://github.com/SeaQL/sea-query/pull/473
@nahuakang maybe add associated type to trait? For work with: `TypeRef`, `TableRef`?
> Hey @ikrivosheev, nice one! > > I always want to do it but haven't start loll Can we also refactor all other `vec![]`? I believe most of them can...
@billy1624 @tyt2y3 , hello! I have a bad surprise. `trait ToSql` from `postgres-types` crate need: `Self: Sized`, but I cannot make `ValueTrait: Sized`, because I need `dyn ValueTrait`
It looks like instead of create our own `ValueTrait` make all types, which hold `Value` should be generic...
Hmmm another sought... Black magic with unsafe. This should work. I can store row pointer to data and then transmute it to value and type get from enum. Example: https://github.com/Diggsey/ijson/
Ah, one more problem... I try something like this: ```rust pub trait Sqlx + Type {} pub trait ValueTrait where Self: Debug, { fn to_sql_string(&self) -> String; #[cfg(feature = "with-postgres")]...