pub struct RefreshMaterializedView<'a, State = RefreshInitial> { /* private fields */ }Expand description
Builder for REFRESH MATERIALIZED VIEW statements
PostgreSQL syntax:
REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] view_name [ WITH [ NO ] DATA ]Note: CONCURRENTLY and WITH NO DATA are mutually exclusive in PostgreSQL.
CONCURRENTLY requires the materialized view to have a unique index.
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
Creates a new REFRESH MATERIALIZED VIEW builder for the given view
Sourcepub fn concurrently(self) -> RefreshMaterializedView<'a, RefreshConcurrently>
pub fn concurrently(self) -> RefreshMaterializedView<'a, RefreshConcurrently>
Adds the CONCURRENTLY option
This allows the view to be refreshed without locking out concurrent reads. Requires the materialized view to have at least one unique index.
Note: 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 the WITH NO DATA option
This causes the materialized view to be emptied rather than refreshed with data. The view cannot be queried until data is added with a subsequent REFRESH.
Note: 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§fn clone(&self) -> RefreshMaterializedView<'a, State>
fn clone(&self) -> RefreshMaterializedView<'a, State>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, State: Debug> Debug for RefreshMaterializedView<'a, State>
impl<'a, State: Debug> Debug for RefreshMaterializedView<'a, State>
Source§impl<'a, State> ToSQL<'a, PostgresValue<'a>> for RefreshMaterializedView<'a, State>
impl<'a, State> ToSQL<'a, PostgresValue<'a>> 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>
impl<'a, State> Send for RefreshMaterializedView<'a, State>where
State: Send,
impl<'a, State> Sync for RefreshMaterializedView<'a, State>where
State: Sync,
impl<'a, State> Unpin for RefreshMaterializedView<'a, State>where
State: Unpin,
impl<'a, State> UnsafeUnpin for RefreshMaterializedView<'a, State>
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