pub struct ModelLoader<B: StorageBackend> { /* private fields */ }Expand description
Model loader that uses a storage backend
Implementations§
Source§impl<B: StorageBackend> ModelLoader<B>
impl<B: StorageBackend> ModelLoader<B>
Sourcepub async fn load_model(
&self,
workspace_path: &str,
) -> Result<ModelLoadResult, StorageError>
pub async fn load_model( &self, workspace_path: &str, ) -> Result<ModelLoadResult, StorageError>
Load a model from storage
For file-based backends (FileSystemStorageBackend, BrowserStorageBackend):
- Loads from
tables/subdirectory with YAML files - Loads from
relationships.yamlfile
For API backend (ApiStorageBackend), use load_model_from_api() instead.
Returns the loaded model data and a list of orphaned relationships (relationships that reference non-existent tables).
Sourcepub async fn load_domains(
&self,
workspace_path: &str,
) -> Result<DomainLoadResult, StorageError>
pub async fn load_domains( &self, workspace_path: &str, ) -> Result<DomainLoadResult, StorageError>
Load all domains from storage
Scans the workspace for domain directories and loads each domain along with its associated ODCS tables, ODPS products, and CADS assets.
Domain directories are identified by the presence of a domain.yaml file.
Sourcepub async fn load_domains_from_list(
&self,
workspace_path: &str,
domain_directory_names: &[String],
) -> Result<DomainLoadResult, StorageError>
pub async fn load_domains_from_list( &self, workspace_path: &str, domain_directory_names: &[String], ) -> Result<DomainLoadResult, StorageError>
Load domains from explicit domain directory names
This is more reliable than load_domains() when you know the domain directory names,
as it doesn’t rely on directory discovery which may be limited by the storage backend.