generated from alecodes/base-template
feat: serialize database schema
This commit is contained in:
parent
fc0a9b4206
commit
0980c9b4d2
5 changed files with 430 additions and 8 deletions
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue