pub struct MaterializedView {
pub qname: QualifiedName,
pub columns: Vec<ViewColumn>,
pub body_canonical: NormalizedBody,
pub body_dependencies: Vec<DepEdge>,
pub comment: Option<String>,
pub raw_body: String,
pub owner: Option<Identifier>,
pub grants: Vec<Grant>,
pub storage: MaterializedViewStorageOptions,
}Expand description
A Postgres CREATE MATERIALIZED VIEW.
Unlike regular views, materialized views are physically stored.
They lack the security_barrier / security_invoker options of regular
views but are otherwise structurally similar.
Fields§
§qname: QualifiedNameSchema-qualified materialized view name.
columns: Vec<ViewColumn>Explicit column alias list (empty when none was provided).
body_canonical: NormalizedBodyCanonical form of the SELECT body.
body_dependencies: Vec<DepEdge>Dependency edges extracted from the body AST.
comment: Option<String>Optional COMMENT ON MATERIALIZED VIEW text.
raw_body: StringRaw SELECT body text from source SQL. Populated by the parser (T3);
consumed by the AST canonicalization pass (T4) to fill
body_canonical and body_dependencies. Not serialized to plan
output or JSON (T4 produces the canonical form which IS serialized).
owner: Option<Identifier>Object owner. None = unmanaged (the differ ignores ownership).
Some(role) = managed: diff emits ALTER MATERIALIZED VIEW ... OWNER TO role.
grants: Vec<Grant>Grants on this object. Empty = no grants. Canonicalized.
storage: MaterializedViewStorageOptionsStorage parameters. Same key set as Table.
Trait Implementations§
Source§impl Clone for MaterializedView
impl Clone for MaterializedView
Source§fn clone(&self) -> MaterializedView
fn clone(&self) -> MaterializedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaterializedView
impl Debug for MaterializedView
Source§impl<'de> Deserialize<'de> for MaterializedView
impl<'de> Deserialize<'de> for MaterializedView
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>,
Source§impl Diff for MaterializedView
impl Diff for MaterializedView
Source§fn diff(&self, other: &Self) -> Vec<Difference>
fn diff(&self, other: &Self) -> Vec<Difference>
self and other. Empty list = equivalent.Source§fn canonical_eq(&self, other: &Self) -> bool
fn canonical_eq(&self, other: &Self) -> bool
true iff self.diff(other).is_empty().impl Eq for MaterializedView
Source§impl Hash for MaterializedView
impl Hash for MaterializedView
Source§impl PartialEq for MaterializedView
impl PartialEq for MaterializedView
Source§fn eq(&self, other: &MaterializedView) -> bool
fn eq(&self, other: &MaterializedView) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for MaterializedView
impl Serialize for MaterializedView
impl StructuralPartialEq for MaterializedView
Auto Trait Implementations§
impl Freeze for MaterializedView
impl RefUnwindSafe for MaterializedView
impl Send for MaterializedView
impl Sync for MaterializedView
impl Unpin for MaterializedView
impl UnsafeUnpin for MaterializedView
impl UnwindSafe for MaterializedView
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
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>
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>
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