pub struct Select {
pub from_table: FromTable,
pub filter: Option<Expr>,
pub group_by: Option<Vec<Expr>>,
pub having: Option<Expr>,
pub projection: Option<Vec<ExprRename>>,
pub order_by: Option<Vec<Order>>,
pub range: Option<Range>,
}
Fields§
§from_table: FromTable
§filter: Option<Expr>
§group_by: Option<Vec<Expr>>
§having: Option<Expr>
§projection: Option<Vec<ExprRename>>
§order_by: Option<Vec<Order>>
§range: Option<Range>
Implementations§
Source§impl Select
impl Select
pub fn set_page(&mut self, page: i64, page_size: i64)
pub fn get_page(&self) -> Option<i64>
pub fn get_page_size(&self) -> Option<i64>
pub fn add_simple_filter( &mut self, column: ColumnName, operator: Operator, search_key: &str, )
pub fn into_sql_select( &self, table_lookup: Option<&TableLookup>, ) -> Result<Select, Error>
Sourcepub fn into_sql_query(
&self,
table_lookup: Option<&TableLookup>,
) -> Result<Query, Error>
pub fn into_sql_query( &self, table_lookup: Option<&TableLookup>, ) -> Result<Query, Error>
convert the restq ast representation into sql-ast ast representation
Sourcepub fn into_sql_statement(
&self,
table_lookup: Option<&TableLookup>,
) -> Result<Statement, Error>
pub fn into_sql_statement( &self, table_lookup: Option<&TableLookup>, ) -> Result<Statement, Error>
convert this ast into a sql-ast Statement representation
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Select
impl<'de> Deserialize<'de> for Select
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Select
Auto Trait Implementations§
impl Freeze for Select
impl RefUnwindSafe for Select
impl Send for Select
impl Sync for Select
impl Unpin for Select
impl UnwindSafe for Select
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more