ergol
This crate provides the #[ergol] macro. It allows to persist the data in a
database. For example, you just have to write
use *;
and the #[ergol] macro will generate most of the code you will need. You'll
then be able to run code like the following:
// Drop the user table if it exists
drop_table.execute.await.ok;
// Create the user table
create_table.execute.await?;
// Create a user and save it into the database
let mut user: User = create.save.await?;
// Change some of its fields
*user.age.as_mut.unwrap += 1;
// Update the user in the database
user.save.await?;
// Fetch a user by its username thanks to the unique attribute
let user: = get_by_username.await?;
// Select all users
let users: = select.execute.await?;
See the book for more information.