pub struct Insert {
pub stmt: Statement,
pub ret: Option<Vec<Type>>,
}Expand description
Inserts one or more records into a table.
Contains a lowered stmt::Statement (always an insert statement) and an
optional return type describing the columns the driver should return after
the insert (e.g., auto-generated keys).
§Examples
ⓘ
use toasty_core::driver::operation::{Insert, Operation};
let op = Insert {
stmt: insert_statement,
ret: Some(vec![stmt::Type::I64]),
};
let operation: Operation = op.into();Fields§
§stmt: StatementThe insert statement to execute.
ret: Option<Vec<Type>>The types of columns to return from the insert. When Some, the driver
should return the inserted row(s) projected to these types (e.g.,
auto-increment IDs). When None, no rows are returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Insert
impl RefUnwindSafe for Insert
impl Send for Insert
impl Sync for Insert
impl Unpin for Insert
impl UnwindSafe for Insert
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