pub struct RelationshipMapping {
pub relationship_type: String,
pub source_id_field: String,
pub target_id_field: String,
pub type_field: Option<String>,
pub property_fields: Vec<String>,
pub filter_conditions: Option<String>,
}Expand description
Configuration for mapping relationship types to dataset fields
Fields§
§relationship_type: StringThe relationship type (e.g., “KNOWS”, “PURCHASED”)
source_id_field: StringField containing the source node ID
target_id_field: StringField containing the target node ID
type_field: Option<String>Optional field containing the relationship type
property_fields: Vec<String>Optional fields that define relationship properties
filter_conditions: Option<String>Optional filter conditions for this relationship type
Implementations§
Source§impl RelationshipMapping
impl RelationshipMapping
Sourcepub fn new<S: Into<String>>(
rel_type: S,
source_field: S,
target_field: S,
) -> Self
pub fn new<S: Into<String>>( rel_type: S, source_field: S, target_field: S, ) -> Self
Create a new relationship mapping
Sourcepub fn with_type_field<S: Into<String>>(self, type_field: S) -> Self
pub fn with_type_field<S: Into<String>>(self, type_field: S) -> Self
Set the type field for this relationship
Sourcepub fn with_properties(self, fields: Vec<String>) -> Self
pub fn with_properties(self, fields: Vec<String>) -> Self
Add property fields to the mapping
Sourcepub fn with_filter<S: Into<String>>(self, filter: S) -> Self
pub fn with_filter<S: Into<String>>(self, filter: S) -> Self
Add filter conditions for this relationship type
Trait Implementations§
Source§impl Clone for RelationshipMapping
impl Clone for RelationshipMapping
Source§fn clone(&self) -> RelationshipMapping
fn clone(&self) -> RelationshipMapping
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelationshipMapping
impl Debug for RelationshipMapping
Source§impl<'de> Deserialize<'de> for RelationshipMapping
impl<'de> Deserialize<'de> for RelationshipMapping
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RelationshipMapping
impl RefUnwindSafe for RelationshipMapping
impl Send for RelationshipMapping
impl Sync for RelationshipMapping
impl Unpin for RelationshipMapping
impl UnwindSafe for RelationshipMapping
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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