pub enum TableSource {
Name(String),
Subquery(Box<QueryExpr>),
Function {
name: String,
args: Vec<String>,
named_args: Vec<(String, f64)>,
},
InlineGraphFunction {
name: String,
nodes: Box<QueryExpr>,
edges: Box<QueryExpr>,
named_args: Vec<(String, f64)>,
},
}Expand description
Structured FROM source for a TableQuery. Additive alongside the
legacy TableQuery.table: String slot — callers that understand
this type can branch on subqueries; callers that only read table
fall back to the synthetic sentinel name and, for subqueries,
produce an “unknown table” error until they migrate.
Variants§
Name(String)
Plain table reference — equivalent to the legacy String form.
Subquery(Box<QueryExpr>)
A subquery in FROM position: FROM (SELECT …) AS alias.
Function
A table-valued function call in FROM position, e.g.
FROM components(g) (issue #795). name is the function
identifier; args are its positional identifier arguments;
named_args are key => <f64> named arguments such as
louvain(g, resolution => 0.5) (issue #796), preserved in source
order. Positional args always precede named args.
InlineGraphFunction
A graph-analytics table-valued function whose graph is supplied
inline as two subqueries instead of a graph-collection reference
(issue #799), e.g.
components(nodes => (SELECT id FROM hosts), edges => (SELECT src, dst FROM links)).
Structurally distinct from Function so the executor can tell the
inline form from the graph-collection form. nodes/edges are the
two materialization subqueries (the first column of nodes is the
node id; the first two-or-three columns of edges are
(source, target [, weight])). named_args carries any remaining
numeric named arguments (e.g. resolution => 0.5).
Trait Implementations§
Source§impl Clone for TableSource
impl Clone for TableSource
Source§fn clone(&self) -> TableSource
fn clone(&self) -> TableSource
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 TableSource
impl RefUnwindSafe for TableSource
impl Send for TableSource
impl Sync for TableSource
impl Unpin for TableSource
impl UnsafeUnpin for TableSource
impl UnwindSafe for TableSource
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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