Attribute Macro mybatis_sql

Source
#[mybatis_sql]
Expand description

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

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