teaql-core 4.2.1

TeaQL core, SQL, runtime, dialect, and macro crates for model-driven data access
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub fn default_table_name(entity_name: &str) -> String {
    let mut out = String::with_capacity(entity_name.len() + 5);
    for (index, ch) in entity_name.chars().enumerate() {
        match ch.is_ascii_uppercase() {
            true => {
                if index > 0 {
                    out.push('_');
                }
                out.push(ch.to_ascii_lowercase());
            }
            false => out.push(ch),
        }
    }
    out.push_str("_data");
    out
}