Skip to main content

schema_core/common/
table_name.rs

1use nutype::nutype;
2
3#[nutype(
4    sanitize(trim, lowercase),
5    validate(len_char_max = 63, regex = r"^[a-z_][a-z0-9_]*$"),
6    derive(
7        Debug,
8        Clone,
9        Display,
10        AsRef,
11        Deref,
12        Hash,
13        Eq,
14        PartialEq,
15        Serialize,
16        Deserialize
17    )
18)]
19pub struct TableName(String);