pub struct PropertyGraph {
pub name: String,
pub vertex_tables: Vec<VertexTable>,
pub edge_tables: Vec<EdgeTable>,
}Expand description
One graph, as CREATE PROPERTY GRAPH defined it: its vertex and edge
tables (SQL/PGQ’s element tables), with their keys resolved (#295).
MATCH spans every table. An algorithm runs on one vertex table and one
edge table, a GraphDef, as in DuckPGQ: see PropertyGraph::pair.
Fields§
§name: StringThe graph’s name: also the name of the schema holding its nodes and
edges tables (when it has one implied pair; see Self::pair).
vertex_tables: Vec<VertexTable>§edge_tables: Vec<EdgeTable>Implementations§
Source§impl PropertyGraph
impl PropertyGraph
Sourcepub fn tables(&self) -> impl Iterator<Item = &TableReference>
pub fn tables(&self) -> impl Iterator<Item = &TableReference>
Every table the graph reads, vertex tables first.
Sourcepub fn vertex_table(&self, label: &str) -> Option<&VertexTable>
pub fn vertex_table(&self, label: &str) -> Option<&VertexTable>
The vertex table called (or labelled) label.
Sourcepub fn edge_table(&self, label: &str) -> Option<&EdgeTable>
pub fn edge_table(&self, label: &str) -> Option<&EdgeTable>
The edge table called (or labelled) label.
Sourcepub fn endpoint_vertex(
&self,
edge: &EdgeTable,
source: bool,
) -> Option<&VertexTable>
pub fn endpoint_vertex( &self, edge: &EdgeTable, source: bool, ) -> Option<&VertexTable>
The vertex table an endpoint of edge refers to: its REFERENCES, or
without one, the graph’s only vertex table (None if it has none).
Sourcepub fn pair(&self, vertex: Option<&str>, edge: Option<&str>) -> Result<GraphDef>
pub fn pair(&self, vertex: Option<&str>, edge: Option<&str>) -> Result<GraphDef>
The pair an algorithm runs on: an edge table, and the vertex table both
its endpoints refer to (if any), as DuckPGQ’s pagerank(g, vertex, edge). With no labels the pair is implied when the graph has one edge
table: every graph before #295 has one.
Sourcepub fn default_pair(&self) -> Option<GraphDef>
pub fn default_pair(&self) -> Option<GraphDef>
The implied pair, when there is one: the graph’s nodes and edges
tables are this pair’s.
Trait Implementations§
Source§impl Clone for PropertyGraph
impl Clone for PropertyGraph
Source§impl Debug for PropertyGraph
impl Debug for PropertyGraph
impl Eq for PropertyGraph
Source§impl From<GraphDef> for PropertyGraph
A graph of one pair: what every graph was before #295.
impl From<GraphDef> for PropertyGraph
A graph of one pair: what every graph was before #295.
Source§impl PartialEq for PropertyGraph
impl PartialEq for PropertyGraph
impl StructuralPartialEq for PropertyGraph
Auto Trait Implementations§
impl Forget for PropertyGraph
impl Freeze for PropertyGraph
impl RefUnwindSafe for PropertyGraph
impl Send for PropertyGraph
impl Sync for PropertyGraph
impl Unpin for PropertyGraph
impl UnsafeUnpin for PropertyGraph
impl UnwindSafe for PropertyGraph
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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