pub struct View {
pub name: Cow<'static, str>,
pub definition: Option<Cow<'static, str>>,
pub is_existing: bool,
pub error: Option<Cow<'static, str>>,
}Expand description
A view, as stored in migration snapshots.
Fields§
§name: Cow<'static, str>View name
definition: Option<Cow<'static, str>>The view’s SELECT statement (the part after AS)
is_existing: boolWhether this is an existing view (not managed by drizzle)
error: Option<Cow<'static, str>>Error message if the view failed to parse/validate
Implementations§
Source§impl View
impl View
Sourcepub fn create_view_sql(&self) -> String
pub fn create_view_sql(&self) -> String
Renders CREATE VIEW name AS definition;, 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 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