[][src]Struct elephantry::Projection

pub struct Projection { /* fields omitted */ }

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.