pub struct TableQuery {Show 16 fields
pub table: String,
pub source: Option<TableSource>,
pub alias: Option<String>,
pub select_items: Vec<SelectItem>,
pub columns: Vec<Projection>,
pub where_expr: Option<Expr>,
pub filter: Option<Filter>,
pub group_by_exprs: Vec<Expr>,
pub group_by: Vec<String>,
pub having_expr: Option<Expr>,
pub having: Option<Filter>,
pub order_by: Vec<OrderByClause>,
pub limit: Option<u64>,
pub offset: Option<u64>,
pub expand: Option<ExpandOptions>,
pub as_of: Option<AsOfClause>,
}Expand description
Table query: SELECT columns FROM table WHERE filter ORDER BY … LIMIT …
Fields§
§table: StringTable name. Legacy slot — still populated even when source
is set to a subquery so existing call sites that read
query.table.as_str() keep compiling. When source is
Some(TableSource::Subquery(…)), this field holds a synthetic
sentinel name ("__subq_NNNN") that runtime code must never
resolve against the real schema registry.
source: Option<TableSource>Fase 2 Week 3: structured table source. None means the
legacy table field is authoritative. Some(Name) is the
same information as table but in typed form. Some(Subquery)
wires a (SELECT …) AS alias in a FROM position — the Fase
1.7 unlock.
alias: Option<String>Optional table alias
select_items: Vec<SelectItem>Canonical SQL select list.
columns: Vec<Projection>Columns to select (empty = all)
where_expr: Option<Expr>Canonical SQL WHERE clause.
filter: Option<Filter>Filter condition
group_by_exprs: Vec<Expr>Canonical SQL GROUP BY items.
group_by: Vec<String>GROUP BY fields
having_expr: Option<Expr>Canonical SQL HAVING clause.
having: Option<Filter>HAVING filter (applied after grouping)
order_by: Vec<OrderByClause>Order by clauses
limit: Option<u64>Limit
offset: Option<u64>Offset
expand: Option<ExpandOptions>WITH EXPAND options (graph traversal, cross-ref following)
as_of: Option<AsOfClause>Time-travel anchor. When present the executor resolves this
to an MVCC xid and evaluates the query against that snapshot
instead of the current one. Mirrors git’s AS OF semantics.
Implementations§
Source§impl TableQuery
impl TableQuery
Sourcepub fn from_subquery(subquery: QueryExpr, alias: Option<String>) -> Self
pub fn from_subquery(subquery: QueryExpr, alias: Option<String>) -> Self
Create a TableQuery that wraps a subquery in FROM position.
The legacy table slot holds a synthetic sentinel so code that
only reads table.as_str() errors loudly with a
recognisable marker instead of silently treating it as a
real collection.
Trait Implementations§
Source§impl Clone for TableQuery
impl Clone for TableQuery
Source§fn clone(&self) -> TableQuery
fn clone(&self) -> TableQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TableQuery
impl RefUnwindSafe for TableQuery
impl Send for TableQuery
impl Sync for TableQuery
impl Unpin for TableQuery
impl UnsafeUnpin for TableQuery
impl UnwindSafe for TableQuery
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,
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request