pub struct SelectQuery {
pub distinct: bool,
pub targets: Vec<Target>,
pub from: Option<FromClause>,
pub where_clause: Option<Expr>,
pub group_by: Option<Vec<Expr>>,
pub having: Option<Expr>,
pub pivot_by: Option<Vec<Expr>>,
pub order_by: Option<Vec<OrderSpec>>,
pub limit: Option<u64>,
}Expand description
A SELECT query.
Fields§
§distinct: boolWhether DISTINCT was specified.
targets: Vec<Target>Target columns/expressions.
from: Option<FromClause>FROM clause (transaction-level filtering).
where_clause: Option<Expr>WHERE clause (posting-level filtering).
group_by: Option<Vec<Expr>>GROUP BY clause.
having: Option<Expr>HAVING clause (filter on aggregated results).
pivot_by: Option<Vec<Expr>>PIVOT BY clause (pivot table transformation).
order_by: Option<Vec<OrderSpec>>ORDER BY clause.
limit: Option<u64>LIMIT clause.
Implementations§
Source§impl SelectQuery
impl SelectQuery
Sourcepub const fn new(targets: Vec<Target>) -> Self
pub const fn new(targets: Vec<Target>) -> Self
Create a new SELECT query with the given targets.
Sourcepub fn from(self, from: FromClause) -> Self
pub fn from(self, from: FromClause) -> Self
Set the FROM clause.
Sourcepub fn where_clause(self, expr: Expr) -> Self
pub fn where_clause(self, expr: Expr) -> Self
Set the WHERE clause.
Trait Implementations§
Source§impl Clone for SelectQuery
impl Clone for SelectQuery
Source§fn clone(&self) -> SelectQuery
fn clone(&self) -> SelectQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectQuery
impl Debug for SelectQuery
Source§impl PartialEq for SelectQuery
impl PartialEq for SelectQuery
impl StructuralPartialEq for SelectQuery
Auto Trait Implementations§
impl Freeze for SelectQuery
impl RefUnwindSafe for SelectQuery
impl Send for SelectQuery
impl Sync for SelectQuery
impl Unpin for SelectQuery
impl UnwindSafe for SelectQuery
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.