[−][src]Struct wither::IntervalMigration
A migration type which allows execution until the specifed threshold
date. Then will no-op.
This migration type works nicely in environments where multiple instances of the system — in
which this migration is defined — are continuously running, even during deployment cycles.
With an IntervalMigration
, each instance will execute the migration at boottime, until the
threshold
date is passed. This will compensate for write-heavy workloads, as the final
instance to be updated will ensure schema convergence. As long as you ensure your
migrations are idempotent — WHICH YOU ALWAYS SHOULD — this will work quite nicely.
Fields
name: String
The name for this migration. Must be unique per collection.
threshold: DateTime<Utc>
The UTC datetime when this migration should no longer execute.
Use something like: chrono::Utc.ymd(2017, 11, 20).and_hms(22, 37, 34)
.
filter: Document
The filter to be used for selecting the documents to update.
set: Option<Document>
The document to be used for the $set
operation of the update.
unset: Option<Document>
The document to be used for the $unset
operation of the update.
Trait Implementations
impl Migration for IntervalMigration
[src]
Auto Trait Implementations
impl RefUnwindSafe for IntervalMigration
impl Send for IntervalMigration
impl Sync for IntervalMigration
impl Unpin for IntervalMigration
impl UnwindSafe for IntervalMigration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,