Back

rust - diesel 中使用特殊的列,例如type, mod

发布时间: 2020-05-11 13:26:00

参考:https://docs.diesel.rs/diesel/macro.table.html

一般是修改schema.rs 

diesel::table! {
  posts{
    id -> Integer, 
    #[sql_name="type"]
    the_type -> Text
  }
}

Back