taitan-orm-parser 0.1.12

Next Generation ORM based on sqlx
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# [table(user)]
# [primary(a, b, c)]
# [serde_struct(entity, location)]
# [unique(name = uk1, fields = (f1, f2))]
# [unique(name = uk2, fields = (f3, f4))]
# [index(name = idx_1, fields = (f1, f2, f3))]
# [index(name = idx_2, fields = (f1, f2, f3))]
struct Foo < 'a, 'b > {
     a: & 'a str,
     b: Cow <'b, str >,
     c: String,
     d: Option < Cow < 'b, str > >,

     # [field(name = user_name, db_type = BIGINT, nullable = true, auto_inc = true)]
     e: Option < Cow < 'b, str > >
}