pub enum RowMapping {
Node {
label: String,
id_column: Option<String>,
id_property: Option<String>,
properties: Vec<ColumnSpec>,
},
Relationship {
rel_type: String,
start_label: String,
start_column: String,
start_match_property: String,
end_label: String,
end_column: String,
end_match_property: String,
properties: Vec<ColumnSpec>,
},
}Expand description
Top-level mapping: how to turn a stream of decoded rows into Cypher inserts. Carries enough information for the playground’s auto-detect / preview path; users can edit this in the import dialog before running.
Variants§
Node
Each row becomes a node of label with the listed properties.
Fields
id_column: Option<String>Optional file column whose value becomes a unique property later referenced by relationship imports. When set, the generated statement includes a property literal; when omitted, the node has no identity beyond Cypher’s auto-allocated node id.
id_property: Option<String>Property name to store the id column under (defaults to
id when [Self::id_column] is set).
properties: Vec<ColumnSpec>Source column → property name mappings.
Relationship
Each row becomes a relationship between two nodes located by
(start_label, start_match_property) and the corresponding
end_* fields.
Implementations§
Trait Implementations§
Source§impl Clone for RowMapping
impl Clone for RowMapping
Source§fn clone(&self) -> RowMapping
fn clone(&self) -> RowMapping
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RowMapping
impl Debug for RowMapping
Source§impl<'de> Deserialize<'de> for RowMapping
impl<'de> Deserialize<'de> for RowMapping
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RowMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RowMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for RowMapping
impl Serialize for RowMapping
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for RowMapping
impl RefUnwindSafe for RowMapping
impl Send for RowMapping
impl Sync for RowMapping
impl Unpin for RowMapping
impl UnsafeUnpin for RowMapping
impl UnwindSafe for RowMapping
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<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