pub struct Select {
pub distinct: bool,
pub items: Vec<SelectItem>,
pub from: Option<TableRef>,
pub joins: Vec<Join>,
pub where_: Option<Expr>,
pub order_by: Vec<OrderBy>,
pub limit: Option<usize>,
pub offset: Option<usize>,
pub set_ops: Vec<SetArm>,
}Fields§
§distinct: bool§items: Vec<SelectItem>§from: Option<TableRef>§joins: Vec<Join>§where_: Option<Expr>§order_by: Vec<OrderBy>ORDER BY / LIMIT / OFFSET. On a compound query (set_ops
non-empty) these apply to the COMBINED result, as SQL says, and every
arm carries none of its own.
limit: Option<usize>§offset: Option<usize>§set_ops: Vec<SetArm>The further arms of a UNION / INTERSECT / EXCEPT. Empty for an
ordinary SELECT. This SELECT’s own clauses are the FIRST arm.
Implementations§
Source§impl Select
impl Select
Sourcepub fn base_relations(&self) -> Vec<String>
pub fn base_relations(&self) -> Vec<String>
Every base relation this query reads, at any depth: the FROM list, the joins, derived tables, and every subquery inside an expression or a further set-operation arm.
The caller that routes a statement to this engine decides by relation
name, so a name buried three levels down inside \dd’s derived table
has to surface here or the statement is routed to a path that cannot
parse it — and reports a confusing error from that path.
Trait Implementations§
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 UnsafeUnpin 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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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