use alloc::string::String;
use alloc::vec::Vec;
use core::str::FromStr;
use super::*;
#[derive(Debug, Clone)]
pub enum DatabaseType {
PostgreSQL,
Unknown(String),
}
impl FromStr for DatabaseType {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"PostgreSQL" => Ok(Self::PostgreSQL),
_ => Ok(Self::Unknown(String::from(s))),
}
}
}
#[derive(Debug, Clone, Default)]
pub struct ProjectBlock {
pub span_range: SpanRange,
pub properties: Vec<Property>,
pub ident: Ident,
pub database_type: Option<DatabaseType>,
pub note: Option<NoteBlock>,
}