feat: serialize database schema

This commit is contained in:
Alexander Navarro 2025-01-24 15:52:44 -03:00
parent fc0a9b4206
commit 0980c9b4d2
5 changed files with 430 additions and 8 deletions

View file

@ -5,7 +5,10 @@ use url::Url;
use crate::error::{Error, Result};
use self::schema::SchemaDefinition;
mod postgres;
mod schema;
#[derive(ValueEnum, Clone)]
pub enum Database {
@ -59,7 +62,9 @@ pub async fn discover_scheme(url: String, schema: Option<String>) -> Result<()>
let schema = schema_discovery.discover().await?;
println!("{:#?}", schema);
let schema_definition = SchemaDefinition::from(schema);
println!("{}", schema_definition);
Ok(())
}