pub struct EdgeTransform {
pub edge_type: String,
pub src: EndpointSpec,
pub dst: EndpointSpec,
pub properties: Vec<String>,
pub rename: HashMap<String, String>,
pub key: Vec<String>,
pub replace: Option<bool>,
}Expand description
Rows → relationships. src.column/dst.column become the src/dst
columns of the output batch; the properties columns ride along and the
sink folds them into the relationship’s props (SET e += r.props).
rename maps a source column to the relationship-property name it lands
under, mirroring VertexTransform; the endpoint columns always become
src/dst regardless of rename.
Fields§
§edge_type: String§src: EndpointSpec§dst: EndpointSpec§properties: Vec<String>§rename: HashMap<String, String>Optional source-column → property-name remapping for the property
columns (the endpoint columns are renamed to src/dst for free).
key: Vec<String>Source columns that tell parallel edges apart: they join the
relationship’s MERGE key (-[e:type {k: …}]->), so two rows with the same
endpoints and different keys are two edges. Empty (the default) keeps one
edge per (src, type, dst). A key column is written as a property too.
replace: Option<bool>One edge of this type per source node: an upsert first deletes the
source’s other outgoing edges of this type (see
EdgeSet::replace_outgoing). Unset means: yes for an fk_edges step
on an entity row — the table’s vertex step IS the edge’s source (label and
id column) — no for a junction table and for an edge step (their rows are
independent edges). Never with key.
Trait Implementations§
Source§impl Clone for EdgeTransform
impl Clone for EdgeTransform
Source§impl Debug for EdgeTransform
impl Debug for EdgeTransform
Source§impl<'de> Deserialize<'de> for EdgeTransform
impl<'de> Deserialize<'de> for EdgeTransform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for EdgeTransform
impl Serialize for EdgeTransform
Source§impl Transform for EdgeTransform
impl Transform for EdgeTransform
fn apply( &self, _ctx: &TableContext, batches: &[RecordBatch], ) -> Result<GraphMutation>
Source§fn apply_deletes(
&self,
ctx: &TableContext,
batches: &[RecordBatch],
) -> Result<GraphMutation>
fn apply_deletes( &self, ctx: &TableContext, batches: &[RecordBatch], ) -> Result<GraphMutation>
DELETE rows, whose nodes and
edges are then removed. Such a row may carry only its key — every other
column null — so a step that filters or computes on other columns must
not let that drop the delete. The default is Self::apply, right for
every step that only picks columns.Auto Trait Implementations§
impl Freeze for EdgeTransform
impl RefUnwindSafe for EdgeTransform
impl Send for EdgeTransform
impl Sync for EdgeTransform
impl Unpin for EdgeTransform
impl UnsafeUnpin for EdgeTransform
impl UnwindSafe for EdgeTransform
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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