[−][src]Struct elephantry::Projection
Define the content of SELECT or RETURNING (projection) statements.
Implementations
impl Projection
[src]
pub fn new(relation: &str, fields: &[&str]) -> Self
[src]
Create a new projection with fields
.
pub fn alias(self, alias: &str) -> Projection
[src]
Add alias for the relation name.
pub fn add_field(self, name: &str, row: &str) -> Projection
[src]
Add a field from the projection.
pub fn unset_field(self, name: &str) -> Projection
[src]
Unset an existing field.
pub fn fields(&self) -> &HashMap<String, String>
[src]
Return the list of fields.
pub fn field_names(&self) -> Vec<String>
[src]
Return fields names list.
pub fn has_field(&self, name: &str) -> bool
[src]
Return if the given field exist.
Trait Implementations
impl Debug for Projection
[src]
impl Display for Projection
[src]
Auto Trait Implementations
impl RefUnwindSafe for Projection
impl Send for Projection
impl Sync for Projection
impl Unpin for Projection
impl UnwindSafe for Projection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,