1use alloc::string::String;
2use alloc::vec::Vec;
3use core::str::FromStr;
4
5use super::*;
6
7#[derive(Debug, Clone)]
9pub enum DatabaseType {
10 PostgreSQL,
11 Unknown(String)
12}
13
14impl FromStr for DatabaseType {
15 type Err = String;
16
17 fn from_str(s: &str) -> Result<Self, Self::Err> {
18 match s {
19 "PostgreSQL" => Ok(Self::PostgreSQL),
20 _ => Ok(Self::Unknown(String::from(s))),
21 }
22 }
23}
24
25#[derive(Debug, Clone, Default)]
27pub struct ProjectBlock {
28 pub span_range: SpanRange,
30 pub properties: Vec<Property>,
32 pub ident: Ident,
34 pub database_type: Option<DatabaseType>,
36 pub note: Option<NoteBlock>,
38}