Skip to main content

SelectQuery

Trait SelectQuery 

Source
pub trait SelectQuery<From>
where From: Dataset,
{ // Required methods fn get_select(&self) -> impl Iterator<Item = impl Expression> + Clone; fn get_from<'s>(&'s self) -> &'s Option<From>; fn get_where<'s>(&'s self) -> &'s Option<impl Expression>; fn get_group_by(&self) -> impl Iterator<Item = impl Expression> + Clone; fn get_having(&self) -> &Option<impl Expression>; fn get_order_by(&self) -> impl Iterator<Item = impl Expression> + Clone; fn get_limit(&self) -> Option<u32>; fn build<D: Driver>(&self, driver: &D) -> DynQuery; fn build_into<D: Driver>(&self, driver: &D, out: &mut DynQuery); }
Expand description

SELECT query builder.

Use QueryBuilder::new().select(..) to start.

Required Methods§

Source

fn get_select(&self) -> impl Iterator<Item = impl Expression> + Clone

Get SELECT expressions.

Source

fn get_from<'s>(&'s self) -> &'s Option<From>

Get FROM clause dataset.

Source

fn get_where<'s>(&'s self) -> &'s Option<impl Expression>

Get WHERE clause expression.

Source

fn get_group_by(&self) -> impl Iterator<Item = impl Expression> + Clone

Get GROUP BY expressions.

Source

fn get_having(&self) -> &Option<impl Expression>

Get HAVING clause expression.

Source

fn get_order_by(&self) -> impl Iterator<Item = impl Expression> + Clone

Get ORDER BY expressions.

Source

fn get_limit(&self) -> Option<u32>

Get LIMIT value.

Source

fn build<D: Driver>(&self, driver: &D) -> DynQuery

Build query.

Source

fn build_into<D: Driver>(&self, driver: &D, out: &mut DynQuery)

Build query into existing buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, From, W, G, H, O, L> SelectQuery<From> for SelectQueryBuilder<S, From, W, G, H, O, L>