pub struct TypedAssignment {
pub column: String,
pub column_index: usize,
pub value: TypedExpr,
}Expand description
A typed assignment for UPDATE SET clauses.
Contains the column name, index, and the typed value expression.
§Examples
use alopex_sql::planner::typed_expr::{TypedAssignment, TypedExpr, TypedExprKind};
use alopex_sql::planner::types::ResolvedType;
use alopex_sql::ast::expr::Literal;
use alopex_sql::Span;
let assignment = TypedAssignment {
column: "name".to_string(),
column_index: 1,
value: TypedExpr {
kind: TypedExprKind::Literal(Literal::String("Bob".to_string())),
resolved_type: ResolvedType::Text,
span: Span::default(),
},
};Fields§
§column: StringThe column name being assigned.
column_index: usizeThe column index in the table’s column list (0-based).
value: TypedExprThe value expression (type-checked against the column type).
Implementations§
Trait Implementations§
Source§impl Clone for TypedAssignment
impl Clone for TypedAssignment
Source§fn clone(&self) -> TypedAssignment
fn clone(&self) -> TypedAssignment
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 moreAuto Trait Implementations§
impl Freeze for TypedAssignment
impl RefUnwindSafe for TypedAssignment
impl Send for TypedAssignment
impl Sync for TypedAssignment
impl Unpin for TypedAssignment
impl UnwindSafe for TypedAssignment
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