pub struct MigrationContext<'connection> { /* private fields */ }Expand description
App SQL inside the transaction owned by the migration run. The context borrows its owner and cannot change the transaction or connection.
Implementations§
Source§impl<'connection> MigrationContext<'connection>
impl<'connection> MigrationContext<'connection>
Sourcepub fn execute<P: Params>(&self, sql: &str, params: P) -> Result<usize>
pub fn execute<P: Params>(&self, sql: &str, params: P) -> Result<usize>
Execute one app statement with parameters.
Sourcepub fn execute_batch(&self, sql: &str) -> Result<()>
pub fn execute_batch(&self, sql: &str) -> Result<()>
Execute app statements without escaping the migration transaction.
Auto Trait Implementations§
impl<'connection> !Freeze for MigrationContext<'connection>
impl<'connection> !RefUnwindSafe for MigrationContext<'connection>
impl<'connection> !Send for MigrationContext<'connection>
impl<'connection> !Sync for MigrationContext<'connection>
impl<'connection> Unpin for MigrationContext<'connection>
impl<'connection> UnsafeUnpin for MigrationContext<'connection>
impl<'connection> !UnwindSafe for MigrationContext<'connection>
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