pub struct IrSource {
pub type_name: String,
pub table: String,
pub alias: String,
pub poly: Option<IrPolyFanout>,
}Expand description
The relation being queried: a resolved type with its PostgreSQL table name and a unique alias for this occurrence in the query.
Fields§
§type_name: StringQualified type name, e.g. catalog::Product.
table: StringPostgreSQL table name, e.g. catalog_product.
alias: StringAlias used in emitted SQL, e.g. t0.
poly: Option<IrPolyFanout>Set when type_name is an interface and the rows have to be read from
the implementors rather than the interface’s own view.
The view carries only the interface’s columns and no discriminator, so reading through it tags every row as the interface and hydrates the interface class instead of the concrete one. The SQL emitters get no schema of their own, so whether a source needs fanning out can only be decided here, while the IR is built.
None everywhere it would be wrong or pointless — a DML target cannot
be a union, and a concrete type has nothing to fan out to.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IrSource
impl RefUnwindSafe for IrSource
impl Send for IrSource
impl Sync for IrSource
impl Unpin for IrSource
impl UnsafeUnpin for IrSource
impl UnwindSafe for IrSource
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> 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>
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
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.