kosame_dsl 0.3.0

Macro-based Rust ORM focused on developer ergonomics
Documentation
use std::str::FromStr;

pub enum Driver {
    Postgres,
    TokioPostgres,
    Mysql,
    Rusqlite,
}

impl FromStr for Driver {
    type Err = ();

    fn from_str(value: &str) -> Result<Self, ()> {
        match value {
            "postgres" => Ok(Self::Postgres),
            "tokio-postgres" => Ok(Self::TokioPostgres),
            "mysql" => Ok(Self::Mysql),
            "rusqlite" => Ok(Self::Rusqlite),
            _ => Err(()),
        }
    }
}