MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / into_partial_model

Method into_partial_model

src/executor/select.rs:218–223  ·  view source on GitHub ↗

Return a [Selector] from `Self` that wraps a [SelectModel] with a [PartialModel](PartialModelTrait) ``` # #[cfg(feature = "macros")] # { use sea_orm::{ entity::*, query::*, tests_cfg::cake::{self, Entity as Cake}, DbBackend, DerivePartialModel, FromQueryResult, }; use sea_query::{Expr, Func, SimpleExpr}; #[derive(DerivePartialModel, FromQueryResult)] #[sea_orm(entity = "Cake")] struct PartialCak

(self)

Source from the content-addressed store, hash-verified

216 /// # }
217 /// ```
218 pub fn into_partial_model<M>(self) -> Selector<SelectModel<M>>
219 where
220 M: PartialModelTrait,
221 {
222 M::select_cols(QuerySelect::select_only(self)).into_model::<M>()
223 }
224
225 /// Get a selectable Model as a [JsonValue] for SQL JSON operations
226 #[cfg(feature = "with-json")]

Calls 2

select_onlyMethod · 0.80
into_modelMethod · 0.45