pub struct MySQLMutationResult { /* private fields */ }Expand description
The normalized result of executing a MySQL INSERT, UPDATE, or
DELETE statement.
Concrete adapters translate their client’s OK packet into this value so
application code never depends on mysql or mysql_async result types.
Implementations§
Source§impl MySQLMutationResult
impl MySQLMutationResult
Sourcepub const fn new(affected_rows: u64, last_insert_id: Option<u64>) -> Self
pub const fn new(affected_rows: u64, last_insert_id: Option<u64>) -> Self
Creates a normalized mutation result.
Sourcepub const fn affected_rows(self) -> u64
pub const fn affected_rows(self) -> u64
Number of rows affected according to MySQL’s OK packet.
Sourcepub const fn last_insert_id(self) -> Option<u64>
pub const fn last_insert_id(self) -> Option<u64>
First generated AUTO_INCREMENT value, when the server reported one.
This is execution metadata, not SQL RETURNING. It does not imply
that every inserted row received a contiguous generated identifier.
Trait Implementations§
Source§impl Clone for MySQLMutationResult
impl Clone for MySQLMutationResult
impl Copy for MySQLMutationResult
Source§impl Debug for MySQLMutationResult
impl Debug for MySQLMutationResult
Source§impl Default for MySQLMutationResult
impl Default for MySQLMutationResult
impl Eq for MySQLMutationResult
Source§impl PartialEq for MySQLMutationResult
impl PartialEq for MySQLMutationResult
impl StructuralPartialEq for MySQLMutationResult
Auto Trait Implementations§
impl Freeze for MySQLMutationResult
impl RefUnwindSafe for MySQLMutationResult
impl Send for MySQLMutationResult
impl Sync for MySQLMutationResult
impl Unpin for MySQLMutationResult
impl UnsafeUnpin for MySQLMutationResult
impl UnwindSafe for MySQLMutationResult
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