Attribute Macro rbatis::sql

source ·
#[sql]
Expand description

auto create sql macro,this macro use RB.query_prepare and RB.exec_prepare for example:

     use rbatis::plugin;
     use rbatis::executor::Executor;
     #[derive(serde::Serialize,serde::Deserialize)]
     pub struct MockTable{}

     #[sql("select * from biz_activity where id = ?")]
     async fn select(rb:&dyn Executor, name: &str) -> MockTable {}