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
Sometimes I want to select a PartialModel DTO with complex query.
It would be very convenient if I could provide model columns to Query::select().columns(...).
Currently I'm using something like this:
#[derive(Debug, Default)]
struct ColumnsCollector {
vec: Vec<ColumnRef>,
}
impl<'a> SelectColumns for &'a mut ColumnsCollector {
fn select_column<C: ColumnTrait>(self, col: C) -> Self {
let (t, c) = col.as_column_ref();
self.vec.push(ColumnRef::Column(c));
self
}
}
But I believe that it should be a part of sea-orm.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Sometimes I want to select a PartialModel DTO with complex query.
It would be very convenient if I could provide model columns to
Query::select().columns(...)
.Currently I'm using something like this:
But I believe that it should be a part of sea-orm.
Beta Was this translation helpful? Give feedback.
All reactions