pub struct TableRef {
pub name: String,
pub alias: Option<String>,
pub sub: Option<Box<Select>>,
pub args: Option<Vec<Expr>>,
pub col_aliases: Vec<String>,
pub lateral: bool,
}Fields§
§name: StringThe table name as written, minus quoting. A pg_catalog. qualifier is
preserved here and resolved by the caller, because information_schema
table names collide with plausible user collection names.
For a derived table this is the literal (subquery), and for a table
function it is the function’s bare name — both only ever shown in a
plan, never resolved as a relation.
alias: Option<String>§sub: Option<Box<Select>>FROM (SELECT ...) AS t — the relation is the subquery’s output.
psql’s \dd is one seven-arm UNION ALL wrapped exactly this way.
args: Option<Vec<Expr>>FROM generate_series(0, n) s / FROM unnest(arr) AS t(x) — a table
function with its arguments. Evaluated in the enclosing row’s scope,
because psql writes unnest(evttags) over the OUTER row’s column.
col_aliases: Vec<String>AS t(x, y) — column aliases for a derived table or table function.
lateral: boolLATERAL (SELECT ...) — the derived table may read the FROM items
before it, so it is re-evaluated once per row of those. psql’s \dP+
sizes each partitioned table this way.
Implementations§
Trait Implementations§
impl StructuralPartialEq for TableRef
Auto Trait Implementations§
impl Freeze for TableRef
impl RefUnwindSafe for TableRef
impl Send for TableRef
impl Sync for TableRef
impl Unpin for TableRef
impl UnsafeUnpin for TableRef
impl UnwindSafe for TableRef
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<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> ⓘ
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