pub struct View { /* private fields */ }Expand description
One view.
Implementations§
Source§impl View
impl View
Sourcepub fn new(name: QualifiedName, sql: String, aliases: Vec<String>) -> Self
pub fn new(name: QualifiedName, sql: String, aliases: Vec<String>) -> Self
A view over sql, whose columns answer to aliases as far as that list goes.
Sourcepub fn name(&self) -> &QualifiedName
pub fn name(&self) -> &QualifiedName
The three part name.
Sourcepub fn aliases(&self) -> &[String]
pub fn aliases(&self) -> &[String]
The column names the statement gave, which rename a prefix of what the body produces.
Shorter than the body’s output, or empty, is the ordinary case. CREATE VIEW v (a) AS SELECT 1, 2 answers under a and 2, which was measured, so a short list is a rename of the front
of the list and not a projection down to it. Longer is refused by the binder before a view
is ever made.
Trait Implementations§
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