rustorm_dao 0.20.0

Dao provides a flexible way to access data from the database
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
fn is_keyword(s: &str) -> bool {
    let keywords = ["user", "role"];
    keywords.contains(&s)
}

pub fn keywords_safe(s: &str) -> String {
    if is_keyword(s) {
        format!("\"{}\"", s)
    } else {
        s.to_string()
    }
}