#[py_sql]
Expand description
py sql create macro,this macro use RB.py_fetch and RB.py_exec
pub static RB:Lazy
or more example:
#[py_sql(“
SELECT * FROM biz_activity
if name != null:
AND delete_flag = #{del}
AND version = 1
if age!=1:
AND version = 1
AND version = 1
AND a = 0
AND version = 1
and id in (
trim ‘,’: for item in ids:
#{item},
)
and id in (
trim ‘,’: for index,item in ids:
#{item},
)
trim ‘AND’:
AND delete_flag = #{del2}
choose:
when age==27:
AND age = 27
otherwise:
AND age = 0
WHERE id = ‘2’“)]
pub async fn py_select_rb(rbatis: &Rbatis, name: &str) -> Option