debil
ORM aims to provide Table macro and auto migration
Table macro
You need to specify sql_type
to be something that each DB crate provides.
This example derives some useful mapper functions for this struct. See functions in debil's docs.
Accessor macro
Accessor macro provides safe way to access to each column. This is useful for constructing a query.
// Use Accessor derive here!
// Use accessor! macro to access to a field with table_name prefixed
assert_eq!;
// If you only need field name, use accessor_name! macro
assert_eq!;
// Or you can just call the field name function directly, which is derived by Accessor derive
assert_eq!;
// accessor!(Ex1::foobar) <- compile error!