pub struct RefreshMaterializedView<'a, State = RefreshInitial> { /* private fields */ }Expand description
Builds a REFRESH MATERIALIZED VIEW statement.
REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] view_name [ WITH [ NO ] DATA ]CONCURRENTLY and WITH NO DATA cannot be combined; the state parameter
enforces this. A view outside the public schema is schema-qualified.
See the module docs for examples.
Implementations§
Source§impl<'a> RefreshMaterializedView<'a, RefreshInitial>
impl<'a> RefreshMaterializedView<'a, RefreshInitial>
Sourcepub fn new<V: SQLViewInfo>(view: &'a V) -> Self
pub fn new<V: SQLViewInfo>(view: &'a V) -> Self
Starts REFRESH MATERIALIZED VIEW view.
Sourcepub fn concurrently(self) -> RefreshMaterializedView<'a, RefreshConcurrently>
pub fn concurrently(self) -> RefreshMaterializedView<'a, RefreshConcurrently>
Adds CONCURRENTLY: the view stays readable during the refresh.
PostgreSQL requires a unique index on the materialized view for this.
Cannot be combined with WITH NO DATA.
Sourcepub fn with_no_data(self) -> RefreshMaterializedView<'a, RefreshWithNoData>
pub fn with_no_data(self) -> RefreshMaterializedView<'a, RefreshWithNoData>
Adds WITH NO DATA: the view is emptied instead of refreshed.
The view cannot be queried until a later refresh fills it. Cannot be
combined with CONCURRENTLY.
Trait Implementations§
Source§impl<'a, State: Clone> Clone for RefreshMaterializedView<'a, State>
impl<'a, State: Clone> Clone for RefreshMaterializedView<'a, State>
Source§impl<'a, State: Debug> Debug for RefreshMaterializedView<'a, State>
impl<'a, State: Debug> Debug for RefreshMaterializedView<'a, State>
Auto Trait Implementations§
impl<'a, State = RefreshInitial> !RefUnwindSafe for RefreshMaterializedView<'a, State>
impl<'a, State = RefreshInitial> !UnwindSafe for RefreshMaterializedView<'a, State>
impl<'a, State> Freeze for RefreshMaterializedView<'a, State>where
PhantomData<State>: Freeze,
impl<'a, State> Send for RefreshMaterializedView<'a, State>where
PhantomData<State>: Send,
impl<'a, State> Sync for RefreshMaterializedView<'a, State>where
PhantomData<State>: Sync,
impl<'a, State> Unpin for RefreshMaterializedView<'a, State>where
PhantomData<State>: Unpin,
impl<'a, State> UnsafeUnpin for RefreshMaterializedView<'a, State>where
PhantomData<State>: UnsafeUnpin,
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