pub struct ODCSExporter;Expand description
Exporter for ODCS (Open Data Contract Standard) v3.1.0 YAML format.
Implementations§
Source§impl ODCSExporter
impl ODCSExporter
Sourcepub fn export_table(table: &Table, _format: &str) -> String
pub fn export_table(table: &Table, _format: &str) -> String
Export a table to ODCS v3.1.0 YAML format.
Note: Only ODCS v3.1.0 format is supported. Legacy formats have been removed.
§Arguments
table- The table to export_format- Format parameter (ignored, always uses ODCS v3.1.0)
§Returns
A YAML string in ODCS v3.1.0 format.
§Example
use data_modelling_core::export::odcs::ODCSExporter;
use data_modelling_core::models::{Table, Column};
let table = Table::new(
"users".to_string(),
vec![Column::new("id".to_string(), "BIGINT".to_string())],
);
let yaml = ODCSExporter::export_table(&table, "odcs_v3_1_0");
assert!(yaml.contains("apiVersion: v3.1.0"));
assert!(yaml.contains("kind: DataContract"));Sourcepub fn export(
&self,
tables: &[Table],
_format: &str,
) -> Result<HashMap<String, ExportResult>, ExportError>
pub fn export( &self, tables: &[Table], _format: &str, ) -> Result<HashMap<String, ExportResult>, ExportError>
Export tables to ODCS v3.1.0 YAML format (SDK interface).
Auto Trait Implementations§
impl Freeze for ODCSExporter
impl RefUnwindSafe for ODCSExporter
impl Send for ODCSExporter
impl Sync for ODCSExporter
impl Unpin for ODCSExporter
impl UnwindSafe for ODCSExporter
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