pub struct View {
pub schema: Cow<'static, str>,
pub name: Cow<'static, str>,
pub definition: Option<Cow<'static, str>>,
pub materialized: bool,
pub with: Option<ViewWithOption>,
pub is_existing: bool,
pub with_no_data: Option<bool>,
pub using: Option<Cow<'static, str>>,
pub tablespace: Option<Cow<'static, str>>,
}Expand description
A view, as stored in migration snapshots.
Fields§
§schema: Cow<'static, str>Schema name
name: Cow<'static, str>View name
definition: Option<Cow<'static, str>>The view’s SELECT statement (the part after AS)
materialized: boolIs this a materialized view?
with: Option<ViewWithOption>WITH options
is_existing: boolWhether this is an existing view (not managed by drizzle)
with_no_data: Option<bool>WITH NO DATA (for materialized views)
using: Option<Cow<'static, str>>USING clause (for materialized views)
tablespace: Option<Cow<'static, str>>Tablespace (for materialized views)
Implementations§
Source§impl View
impl View
Sourcepub fn create_view_sql(&self) -> String
pub fn create_view_sql(&self) -> String
Renders CREATE [MATERIALIZED] VIEW ... AS definition; with its
options, or a SQL comment when the view has no definition.
Sourcepub fn drop_view_sql(&self) -> String
pub fn drop_view_sql(&self) -> String
Renders DROP [MATERIALIZED] VIEW ...;.
Trait Implementations§
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
Mutably borrows from an owned value. Read more