pub struct TableToModel { /* private fields */ }Expand description
Expression template for converting table rows into model records.
Contains one expression per model field. Each expression references table
columns and produces the corresponding model field value. During lowering,
these expressions construct SELECT clauses that return model-shaped data.
Implementations§
Source§impl TableToModel
impl TableToModel
Sourcepub fn new(expr: ExprRecord) -> TableToModel
pub fn new(expr: ExprRecord) -> TableToModel
Creates a new TableToModel from the given expression record.
Sourcepub fn lower_returning_model(&self) -> Expr
pub fn lower_returning_model(&self) -> Expr
Returns the complete expression record for use in a RETURNING clause.
Trait Implementations§
Source§impl Clone for TableToModel
impl Clone for TableToModel
Source§fn clone(&self) -> TableToModel
fn clone(&self) -> TableToModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableToModel
impl Debug for TableToModel
Source§impl Default for TableToModel
impl Default for TableToModel
Source§fn default() -> TableToModel
fn default() -> TableToModel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TableToModel
impl RefUnwindSafe for TableToModel
impl Send for TableToModel
impl Sync for TableToModel
impl Unpin for TableToModel
impl UnwindSafe for TableToModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more