pub struct SelectStmt {Show 15 fields
pub projections: Vec<Projection>,
pub values: Vec<Vec<Expr>>,
pub from: Option<FromClause>,
pub where: Option<Expr>,
pub group_by: Vec<Expr>,
pub grouping_sets: Vec<Vec<Expr>>,
pub having: Option<Expr>,
pub order_by: Vec<OrderBy>,
pub limit: Option<Expr>,
pub offset: Option<Expr>,
pub with: Vec<CTE>,
pub set_op: Option<Box<SetOp>>,
pub distinct: bool,
pub distinct_on: Vec<Expr>,
pub locking: Vec<LockingClause>,
}Fields§
§projections: Vec<Projection>§values: Vec<Vec<Expr>>Rows owned by a VALUES query body. PostgreSQL represents VALUES
through the same query node used for SELECT, so nested query bodies
such as CTEs and set-operation branches must retain them here.
from: Option<FromClause>§where: Option<Expr>§group_by: Vec<Expr>§grouping_sets: Vec<Vec<Expr>>Expanded GROUPING SETS / ROLLUP / CUBE specification. When
non-empty the executor produces one row per grouping set;
group_by is treated as a single grouping set in that case.
Each inner Vec lists the grouping-key expressions for that
set (an empty inner Vec means the global grand-total bucket).
having: Option<Expr>HAVING <expr>. Evaluated against each aggregated row and
filters out groups whose predicate is falsy. Mirrors PG’s
havingClause.
order_by: Vec<OrderBy>§limit: Option<Expr>LIMIT <expr>. Stored as an expression so LIMIT $1 and any
other constant-folding integer expression resolves at execute
time. None means no LIMIT clause was supplied.
offset: Option<Expr>OFFSET <expr>. Same shape as SelectStmt::limit.
with: Vec<CTE>Common table expressions defined with WITH [RECURSIVE] ....
set_op: Option<Box<SetOp>>Optional set operation: Some for UNION / INTERSECT / EXCEPT.
Parsed statements carry both operands in SetOp; left remains
optional only for backward-compatible deserialization.
distinct: boolSELECT DISTINCT – de-duplicate the final result rows. Set by
the compiler whenever the parsed distinct_clause is non-empty.
distinct_on: Vec<Expr>SELECT DISTINCT ON (<expr>, ...) keys. Empty for plain
SELECT DISTINCT.
locking: Vec<LockingClause>FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } row-locking clauses, in source order. Empty when the query does not lock rows.
Trait Implementations§
Source§impl Clone for SelectStmt
impl Clone for SelectStmt
Source§fn clone(&self) -> SelectStmt
fn clone(&self) -> SelectStmt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SelectStmt
impl Debug for SelectStmt
Source§impl<'de> Deserialize<'de> for SelectStmt
impl<'de> Deserialize<'de> for SelectStmt
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>,
Auto Trait Implementations§
impl Freeze for SelectStmt
impl RefUnwindSafe for SelectStmt
impl Send for SelectStmt
impl Sync for SelectStmt
impl Unpin for SelectStmt
impl UnsafeUnpin for SelectStmt
impl UnwindSafe for SelectStmt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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