pub struct Defective<'a, R> { /* private fields */ }Expand description
A backend with one Defect injected. The wrapped backend does the work.
Implementations§
Trait Implementations§
Source§impl<R: RelationalBackend> Migrates for Defective<'_, R>
The known-bad migrator: no ledger, no checksum, no transaction. It runs each migration’s
statements (split on ;) straight on the wrapped backend every time it is asked.
impl<R: RelationalBackend> Migrates for Defective<'_, R>
The known-bad migrator: no ledger, no checksum, no transaction. It runs each migration’s
statements (split on ;) straight on the wrapped backend every time it is asked.
Source§async fn migrate(
&self,
migrations: &[Migration],
) -> Result<MigrateReport, MigrateError>
async fn migrate( &self, migrations: &[Migration], ) -> Result<MigrateReport, MigrateError>
Apply
migrations in version order, skipping those already applied. Each migration runs in
its own transaction where the database can; refuses (applying nothing further) if an applied
migration’s text has changed, if the database has applied a version the program does not
know, or if a migration is recorded as dirty.Source§async fn applied_versions(&self) -> Result<Vec<i64>, MigrateError>
async fn applied_versions(&self) -> Result<Vec<i64>, MigrateError>
The versions the ledger says succeeded, ascending; empty if there is no ledger yet.
Source§impl<R: RelationalBackend> RelationalBackend for Defective<'_, R>
impl<R: RelationalBackend> RelationalBackend for Defective<'_, R>
Source§type Tx<'a> = DefectiveTx<'a, R>
where
Self: 'a
type Tx<'a> = DefectiveTx<'a, R> where Self: 'a
A transaction on this backend. Dropping it without
commit rolls it back.Source§async fn execute(&self, sql: &str, params: &[Value]) -> Result<u64, RelError>
async fn execute(&self, sql: &str, params: &[Value]) -> Result<u64, RelError>
Run a statement that returns no rows; the result is the number of rows affected.
Auto Trait Implementations§
impl<'a, R> Freeze for Defective<'a, R>
impl<'a, R> RefUnwindSafe for Defective<'a, R>where
&'a R: RefUnwindSafe,
impl<'a, R> Send for Defective<'a, R>
impl<'a, R> Sync for Defective<'a, R>
impl<'a, R> Unpin for Defective<'a, R>
impl<'a, R> UnsafeUnpin for Defective<'a, R>where
&'a R: UnsafeUnpin,
impl<'a, R> UnwindSafe for Defective<'a, R>where
&'a R: UnwindSafe,
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