pub struct View {
pub name: Cow<'static, str>,
pub definition: Option<Cow<'static, str>>,
pub is_existing: bool,
pub error: Option<Cow<'static, str>>,
}Available on crate feature
std only.Expand description
Runtime view entity
Fields§
§name: Cow<'static, str>View name
definition: Option<Cow<'static, str>>View definition (AS SELECT …)
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
Available on crate features alloc or std only.
pub fn create_view_sql(&self) -> String
alloc or std only.Generate CREATE VIEW SQL
Sourcepub fn drop_view_sql(&self) -> String
Available on crate features alloc or std only.
pub fn drop_view_sql(&self) -> String
alloc or std only.Generate DROP VIEW SQL
Trait Implementations§
Source§impl<'de> Deserialize<'de> for View
impl<'de> Deserialize<'de> for View
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<View, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<View, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for View
Source§impl Serialize for View
impl Serialize for View
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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