pub struct ViewDef {
pub schema: &'static str,
pub name: &'static str,
pub definition: Option<&'static str>,
pub materialized: bool,
pub with: Option<ViewWithOptionDef>,
pub is_existing: bool,
pub with_no_data: bool,
pub using: Option<&'static str>,
pub tablespace: Option<&'static str>,
}Expand description
Const-friendly view definition
Fields§
§schema: &'static strSchema name
name: &'static strView name
definition: Option<&'static str>View definition (AS SELECT …)
materialized: boolIs this a materialized view?
with: Option<ViewWithOptionDef>WITH options
is_existing: boolWhether this is an existing view (not managed by drizzle)
with_no_data: boolWITH NO DATA (for materialized views)
using: Option<&'static str>USING clause (for materialized views)
tablespace: Option<&'static str>Tablespace (for materialized views)
Implementations§
Source§impl ViewDef
impl ViewDef
Sourcepub const fn new(schema: &'static str, name: &'static str) -> Self
pub const fn new(schema: &'static str, name: &'static str) -> Self
Create a new view definition
Sourcepub const fn definition(self, sql: &'static str) -> Self
pub const fn definition(self, sql: &'static str) -> Self
Set the view definition
Sourcepub const fn materialized(self) -> Self
pub const fn materialized(self) -> Self
Mark as materialized view
Sourcepub const fn with_options(self, options: ViewWithOptionDef) -> Self
pub const fn with_options(self, options: ViewWithOptionDef) -> Self
Set WITH options
Sourcepub const fn with_no_data(self) -> Self
pub const fn with_no_data(self) -> Self
Set WITH NO DATA
Sourcepub const fn tablespace(self, space: &'static str) -> Self
pub const fn tablespace(self, space: &'static str) -> Self
Set tablespace
Trait Implementations§
impl Copy for ViewDef
impl Eq for ViewDef
impl StructuralPartialEq for ViewDef
Auto Trait Implementations§
impl Freeze for ViewDef
impl RefUnwindSafe for ViewDef
impl Send for ViewDef
impl Sync for ViewDef
impl Unpin for ViewDef
impl UnwindSafe for ViewDef
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