Attribute Macro rbatis::sql

source · []
#[sql]
Expand description

auto create sql macro,this macro use RB.fetch_prepare and RB.exec_prepare for example: pub static RB:Lazy = Lazy::new(||Rbatis::new()); #[sql(RB, “select * from biz_activity where id = ?”)] async fn select(name: &str) -> BizActivity {}

or: #[sql(“select * from biz_activity where id = ?”)] async fn select(rb:&Rbatis, name: &str) -> BizActivity {}