Skip to main content

SelectTreeBuilder

Struct SelectTreeBuilder 

Source
pub struct SelectTreeBuilder { /* private fields */ }
Expand description

Helper to build a SELECT query tree.

Implementations§

Source§

impl SelectTreeBuilder

Source

pub fn new() -> Self

Create a new SELECT tree builder.

Source

pub fn table(self, table: impl Into<String>) -> Self

Set the table name.

Source

pub fn columns( self, columns: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Set the columns.

Source

pub fn where_clause(self, clause: impl Into<String>) -> Self

Set the WHERE clause.

Source

pub fn order_by(self, order: impl Into<String>) -> Self

Set the ORDER BY clause.

Source

pub fn limit(self, limit: impl Into<String>) -> Self

Set the LIMIT.

Source

pub fn offset(self, offset: impl Into<String>) -> Self

Set the OFFSET.

Source

pub fn join( self, join_type: impl Into<String>, condition: impl Into<String>, ) -> Self

Add a JOIN.

Source

pub fn group_by(self, clause: impl Into<String>) -> Self

Set the GROUP BY clause.

Source

pub fn having(self, clause: impl Into<String>) -> Self

Set the HAVING clause.

Source

pub fn build(self) -> QueryTreeView

Build the query tree view.

Trait Implementations§

Source§

impl Debug for SelectTreeBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SelectTreeBuilder

Source§

fn default() -> SelectTreeBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.