pub enum ViewChange {
Create(View),
Drop(QualifiedName),
ReplaceBody {
source: View,
catalog: View,
strategy: BodyReplaceStrategy,
},
SetReloption {
qname: QualifiedName,
security_barrier: Option<bool>,
security_invoker: Option<bool>,
},
SetComment {
qname: QualifiedName,
comment: Option<String>,
},
SetColumnComment {
qname: QualifiedName,
column: Identifier,
comment: Option<String>,
},
}Expand description
A structural change to a single view.
Variants§
Create(View)
Create a new view.
Drop(QualifiedName)
Drop an existing view.
ReplaceBody
Replace the SELECT body of a view.
strategy is BodyReplaceStrategy::InPlace when Postgres’s CREATE OR REPLACE VIEW rules are satisfied (same column names and types at the
same indexes, with new columns only appended at the end). Otherwise it is
BodyReplaceStrategy::Recreate and the planner must DROP then
re-CREATE the view (and rebuild its dependents).
Fields
§
strategy: BodyReplaceStrategyHow the body change is applied (in-place vs. drop + recreate).
SetReloption
Change WITH (security_barrier = ..., security_invoker = ...) reloptions.
Fields
§
qname: QualifiedNameView qname.
SetComment
Set (or clear) the view-level COMMENT ON VIEW.
Fields
§
qname: QualifiedNameView qname.
SetColumnComment
Set (or clear) a COMMENT ON COLUMN view.col.
Trait Implementations§
Source§impl Clone for ViewChange
impl Clone for ViewChange
Source§fn clone(&self) -> ViewChange
fn clone(&self) -> ViewChange
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 Debug for ViewChange
impl Debug for ViewChange
Source§impl<'de> Deserialize<'de> for ViewChange
impl<'de> Deserialize<'de> for ViewChange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ViewChange
Source§impl PartialEq for ViewChange
impl PartialEq for ViewChange
Source§fn eq(&self, other: &ViewChange) -> bool
fn eq(&self, other: &ViewChange) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ViewChange
impl Serialize for ViewChange
impl StructuralPartialEq for ViewChange
Auto Trait Implementations§
impl Freeze for ViewChange
impl RefUnwindSafe for ViewChange
impl Send for ViewChange
impl Sync for ViewChange
impl Unpin for ViewChange
impl UnsafeUnpin for ViewChange
impl UnwindSafe for ViewChange
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more