Derive Macro Insertable

Source
#[derive(Insertable)]
{
    // Attributes available to this derive:
    #[table]
    #[returning]
    #[sql_type]
}
Expand description

Derive macro for generating INSERT queries.

§Attributes

  • table: The name of the table to insert into
  • returning: The column to return after insert (optional)