pub struct View {
pub qname: QualifiedName,
pub columns: Vec<ViewColumn>,
pub body_canonical: NormalizedBody,
pub body_dependencies: Vec<DepEdge>,
pub security_barrier: Option<bool>,
pub security_invoker: Option<bool>,
pub check_option: Option<CheckOption>,
pub comment: Option<String>,
pub raw_body: String,
pub owner: Option<Identifier>,
pub grants: Vec<Grant>,
}Expand description
A Postgres CREATE VIEW.
The body_canonical is the parsed-and-deparsed SELECT statement in
canonical form. body_dependencies lists the IR objects the body
references, extracted from the AST (v0.2 task 4; initially empty until
the AST-walk pass lands).
Fields§
§qname: QualifiedNameSchema-qualified 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.
security_barrier: Option<bool>WITH (security_barrier = ...) option, if present.
security_invoker: Option<bool>WITH (security_invoker = ...) option, if present.
check_option: Option<CheckOption>WITH [LOCAL | CASCADED] CHECK OPTION, when set in source.
None = unmanaged (lenient — operator may have set it out-of-band;
pgevolve neither sets nor resets unless source declares).
comment: Option<String>Optional COMMENT ON 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 VIEW ... OWNER TO role.
grants: Vec<Grant>Grants on this object. Empty = no grants. Canonicalized.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for View
impl<'de> Deserialize<'de> for View
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 View
impl Diff for View
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 View
impl StructuralPartialEq for View
Auto Trait Implementations§
impl Freeze for View
impl RefUnwindSafe for View
impl Send for View
impl Sync for View
impl Unpin for View
impl UnsafeUnpin for View
impl UnwindSafe for View
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