public static final Sql sql = Sql.create("select * from user where id in (select id from vips $vip_cnd ) and name in (select name from girls $girl_cnd )");
能做成单例模式么
1 回复
不能. 但可以用SqlManager 集中管理 http://nutzam.com/core/dao/customized_sql.html
var ioc={
dao : {
type : "....",
args : [....],
fields : {
sqlManager : {refer:'sqlManager'}
}
},
sqlManager : {
type : ".....FileSqlManager",
args : [.......]
}
}
添加回复
请先登陆