pub struct CrossDomainConfig {
pub schema_version: String,
pub imported_tables: Vec<CrossDomainTableRef>,
pub imported_relationships: Vec<CrossDomainRelationshipRef>,
}Expand description
The cross-domain configuration for a domain
This is stored as cross_domain.yaml in each domain’s directory.
It defines which external tables and relationships should be visible
in this domain’s canvas view.
Fields§
§schema_version: StringSchema version for forward compatibility
imported_tables: Vec<CrossDomainTableRef>Tables imported from other domains
imported_relationships: Vec<CrossDomainRelationshipRef>Relationships imported from other domains (read-only display) These are automatically populated when both ends of a relationship from another domain are imported.
Implementations§
Source§impl CrossDomainConfig
impl CrossDomainConfig
Sourcepub fn add_table_ref(&mut self, source_domain: String, table_id: Uuid) -> usize
pub fn add_table_ref(&mut self, source_domain: String, table_id: Uuid) -> usize
Add a table reference from another domain Returns the index of the added or existing reference
Sourcepub fn get_table_ref(&self, idx: usize) -> Option<&CrossDomainTableRef>
pub fn get_table_ref(&self, idx: usize) -> Option<&CrossDomainTableRef>
Get a table reference by index
Sourcepub fn remove_table_ref(&mut self, table_id: Uuid) -> bool
pub fn remove_table_ref(&mut self, table_id: Uuid) -> bool
Remove a table reference
Sourcepub fn add_relationship_ref(
&mut self,
source_domain: String,
relationship_id: Uuid,
source_table_id: Uuid,
target_table_id: Uuid,
) -> usize
pub fn add_relationship_ref( &mut self, source_domain: String, relationship_id: Uuid, source_table_id: Uuid, target_table_id: Uuid, ) -> usize
Add a relationship reference (for read-only display) Returns the index of the added or existing reference
Sourcepub fn get_relationship_ref(
&self,
idx: usize,
) -> Option<&CrossDomainRelationshipRef>
pub fn get_relationship_ref( &self, idx: usize, ) -> Option<&CrossDomainRelationshipRef>
Get a relationship reference by index
Sourcepub fn remove_relationship_ref(&mut self, relationship_id: Uuid) -> bool
pub fn remove_relationship_ref(&mut self, relationship_id: Uuid) -> bool
Remove a relationship reference
Sourcepub fn get_tables_from_domain(&self, domain: &str) -> Vec<Uuid>
pub fn get_tables_from_domain(&self, domain: &str) -> Vec<Uuid>
Get all imported table IDs from a specific domain
Sourcepub fn is_table_imported(&self, table_id: Uuid) -> bool
pub fn is_table_imported(&self, table_id: Uuid) -> bool
Check if a table is imported from another domain
Sourcepub fn get_table_source_domain(&self, table_id: Uuid) -> Option<&str>
pub fn get_table_source_domain(&self, table_id: Uuid) -> Option<&str>
Get the source domain for an imported table
Trait Implementations§
Source§impl Clone for CrossDomainConfig
impl Clone for CrossDomainConfig
Source§fn clone(&self) -> CrossDomainConfig
fn clone(&self) -> CrossDomainConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more