Skip to main content

Module relationships

Module relationships 

Source
Expand description

Relationship generation module.

This module provides generators for creating relationships between entities, supporting configurable cardinality rules and property generation.

§Features

  • Cardinality Rules: OneToOne, OneToMany, ManyToOne, ManyToMany
  • Property Generation: Generate relationship properties from rules
  • Orphan Control: Allow/prevent orphan entities
  • Circular Detection: Detect and optionally prevent circular relationships

§Example

use datasynth_generators::relationships::{RelationshipGenerator, RelationshipConfig};

let config = RelationshipConfig::default();
let mut generator = RelationshipGenerator::new(config, 42);

// Generate relationships between nodes
let edges = generator.generate_relationships(&nodes);

Modules§

accounting
Common relationship type definitions for accounting domain.

Structs§

GeneratedRelationship
Generated relationship output.
NodeRef
Simple node representation for relationship generation.
PropertyGenerationRule
Property generation rule for relationships.
RelationshipConfig
Configuration for relationship generation.
RelationshipConfigBuilder
Builder for relationship configuration.
RelationshipGenerator
Generator for relationships between entities.
RelationshipMetadata
Metadata for a generated relationship.
RelationshipTypeConfig
Configuration for a specific relationship type.
RelationshipValidation
Relationship validation result.

Enums§

CardinalityRule
Cardinality rule for relationships.
PropertyGenerator
Property generator for relationship properties.
PropertyValueType
Property value type.